• Welcome to MX Bikes Official Forum. Please login or sign up.
 
August 18, 2019, 04:58:51 pm

News:

MX Bikes beta11d available! :)


Trying to create a night track with spot lights.

Started by Sandbiter, November 12, 2018, 05:18:23 pm

Previous topic - Next topic

Sandbiter

I'm currently working on a night track with spot lights. The whole track should be dark, except for the areas around the lights. Does anyone have an idea on how to get this effect?

My idea was to create a new texture layer which would be a plain black texture which'll then be the top layer. That'll make the dark spots dark, and I can mask out the areas around the lights. The thing is though, with deformation, that layer will be ridden off. Once a couple of laps are ridden, the whole track would look lit and wouldn't look the way it's supposed to look. Obviously the shadow of the rider won't be right either way. We really need to be able to place more lighting sources so we can make proper night tracks.

This is the idea (image from Mx vs Atv twitter):


Tell me your ideas, be creative.
If you enjoy my work, please consider making a donation:


тғc

I've put a lot of thought into this over the years. You only currently have a few options.

Black fog. You can make it black and dense but that relies on the track being quite small.

Black layer. You can change the thickness so the texture doesn't erode and you can leave the physical thickness low so it deforms  properly. How you get the layers underneath to deform though is beyond me sorry.

You can use that prefix to stop an object from being shaded which is probably useful for light sources.

Not a lot else you can do.
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

PizzaChet

This would be awesome and it's important for tracks like Supercross and TNMX where 75% of the racing is under the lights. It looks really good in the MvA shot!  :-[
Quote from: YodaIf no mistake have you made, yet losing you are ... a different game you should play.

Sandbiter

Thanks TFC. A few things to try out there.

Lets all get @PiBoSo attention and ask him to add a 'non deformation' parameter for the HMF.
Idea would be that there's one additional parameter in a texture slot, like the mask parameter:
mask = masks/grassmask.tga;
deform = 0;

That way deformation would just 'skip' that layer.

Such a texture can actually be used for more than just a night track.

Does @forumname actually do anything? :-X
If you enjoy my work, please consider making a donation:


iNsane | WeekendWarriors



Your place for MX Bikes mods -> here

тғc

Quote from: Sandbiter on November 12, 2018, 06:32:43 pm
Thanks TFC. A few things to try out there.

Lets all get @PiBoSo attention and ask him to add a 'non deformation' parameter for the HMF.
Idea would be that there's one additional parameter in a texture slot, like the mask parameter:
mask = masks/grassmask.tga;
deform = 0;

That way deformation would just 'skip' that layer.

Such a texture can actually be used for more than just a night track.

Does @forumname actually do anything? :-X


Sounds good to me.
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

Asdrael

Have you tried putting a solid box around your map and the main light source outside of it? To see if the track is then black or not.

I know you can only have one light source, but maybe by creating a box around the track with holes in it to let the light go through you'd achieve the same effect.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

Quote from: Asdrael on November 13, 2018, 12:55:16 pm
Have you tried putting a solid box around your map and the main light source outside of it? To see if the track is then black or not.

I know you can only have one light source, but maybe by creating a box around the track with holes in it to let the light go through you'd achieve the same effect.


That's thinking outside the box  ;D

That mixed with black fog could work well..
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

Sandbiter

Quote from: тғc on November 13, 2018, 01:30:45 pm
Quote from: Asdrael on November 13, 2018, 12:55:16 pm
Have you tried putting a solid box around your map and the main light source outside of it? To see if the track is then black or not.

I know you can only have one light source, but maybe by creating a box around the track with holes in it to let the light go through you'd achieve the same effect.


That's thinking outside the box  ;D

That mixed with black fog could work well..


I gotta try that. Great idea Asdrael.

Am I correct that the lightsource always points at the middle of the track? I know you can set the light source position, but where does it point towards?
If you enjoy my work, please consider making a donation:


тғc

It has to be middle. I'd go for directly above if trying this
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

Sandbiter

Quote from: тғc on November 13, 2018, 03:10:45 pm
It has to be middle. I'd go for directly above if trying this

That's what I thought. Thanks for clarifying!
If you enjoy my work, please consider making a donation:


Asdrael

Since you define the light source position, it might be a point source. It that case it doesn't point toward anything, just toward... everything. Easy way to try: 3 poles on the middle of the track, light source at the edge of the heightmap at ground level, see if the pole shadows are parallel.

Also, don't forget that you need to define the light source for the "rider" (the amb in the track folder) and for track creation (during the THT compilation step iirc).
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

Quote from: Asdrael on November 13, 2018, 03:55:28 pm
Since you define the light source position, it might be a point source. It that case it doesn't point toward anything, just toward... everything. Easy way to try: 3 poles on the middle of the track, light source at the edge of the heightmap at ground level, see if the pole shadows are parallel.

Also, don't forget that you need to define the light source for the "rider" (the amb in the track folder) and for track creation (during the THT compilation step iirc).


You're right. There's no perspective. 3 poles with the light source above will probably give no shadows. Is orthographic the right word?
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

PizzaChet

Definition of orthographic
1 : of, relating to, being, or prepared by orthographic projection
an orthographic map
2a : of or relating to orthography
b : correct in spelling


or·thog·o·nal
/ôrˈTHäɡənl/Submit
adjective
adjective: orthogonal
1.
of or involving right angles; at right angles.
2.
STATISTICS
(of variates) statistically independent.
(of an experiment) having variates that can be treated as statistically independent.
Quote from: YodaIf no mistake have you made, yet losing you are ... a different game you should play.

тғc

Quote from: PizzaChet on November 14, 2018, 06:29:31 pm
Definition of orthographic
1 : of, relating to, being, or prepared by orthographic projection
an orthographic map
2a : of or relating to orthography
b : correct in spelling


or·thog·o·nal
/ôrˈTHäɡənl/Submit
adjective
adjective: orthogonal
1.
of or involving right angles; at right angles.
2.
STATISTICS
(of variates) statistically independent.
(of an experiment) having variates that can be treated as statistically independent.



Yes so like..

Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer