• Welcome to MX Bikes Official Forum. Please login or sign up.
 
October 19, 2019, 07:18:20 pm

News:

MX Bikes beta12 available! :)


Trying to create a night track with spot lights.

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

Previous topic - Next topic

PiBoSo

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.


This is a very clever idea!
Using a vertical light direction ( 0,1,0 ) and a quad facing down, hovering over the entire terrain, should do the trick.

Nonetheless, if you have patience to wait, please note that support for night lighting is already halfway in progress and will completed as soon as possible.

Asdrael

Quote from: PiBoSo on November 14, 2018, 11:55:29 pmThis is a very clever idea!
I know, I know ;)

QuoteUsing a vertical light direction ( 0,1,0 ) and a quad facing down, hovering over the entire terrain, should do the trick.
The question then is: if you have no perspective, the light beams will be always be parallel / cubic rectangle shape since if I now understand correctly you define the light direction, meaning you estimate the light source at an infinite distance. Which doesn't stand for stadium lights. Does the game handle ambiant light reflection? Otherwise it will be pitch black / light / pitch black / light. Or is that taken care of by the 2 different light (when compiling and then in track folder)?
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

Corrie

Hey Asdrael, I am also working on integration of night tracks while the finishing touches of multiple light sources is added. Doing your idea, I ended up with this result:



It's really odd, and doesn't seem to work very well (I realize I should change the skybox, etc. but it was a first attempt). Let me know what you think.

Asdrael

November 16, 2018, 10:15:04 am #18 Last Edit: November 16, 2018, 10:17:14 am by Asdrael
That's not odd at all, it works exactly as suspected. You are using 0,1,0 I suppose?

The light goes in a straight line. Parallel lines. So you end up with a projection of your shape onto your heightmap. And with 0,1,0 it's just a vertical projection.

What will look better is something like 1,1,0 so it has an angle, and bigger holes in the ceiling. But you will still end up with the effect of targeted holy beams of light whatever you do, and that won't change until we can define light "cones" and "point sources" and not just vectors.

That's basically what you are coding in game right now, so yes it looks as expected:


I'm curious how it looks like in game with the second light from .amb, and not just in map viewer though. And WTB Independance Day track
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

𝖙𝖋𝖈

Going to have a crack at this later, think I have a good solution. But, what was the prefix for self emmision lighting in Blender?
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

iNsane | WeekendWarriors

Wouldn't it work if we're doing circles around the holes with different transparencies? From 100-0, does something below 100 and higher than 0 change in how dark the shadow gets? I mean, fences as planes are working too, when creating a .tga with transparency.

Gonna give it a go later too, this starts going places :D


Your place for MX Bikes mods -> here

𝖙𝖋𝖈

Quote from: iNsane on November 16, 2018, 12:28:16 pm
Wouldn't it work if we're doing circles around the holes with different transparencies? From 100-0, does something below 100 and higher than 0 change in how dark the shadow gets? I mean, fences as planes are working too, when creating a .tga with transparency.

Gonna give it a go later too, this starts going places :D


That was partly what I'm thinking. Faded holes placed wherever you want the light to land.
Last Project Alta Redshift MXR


Current Project Hawkstone Replica


Next Project Unknown


Buy Me a Beer

Corrie

That picture is in-game. I'll keep working on it tonight, with an alpha layer to spread the light out.

Sandbiter

Quote from: PiBoSo on November 14, 2018, 11:55:29 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.


This is a very clever idea!
Using a vertical light direction ( 0,1,0 ) and a quad facing down, hovering over the entire terrain, should do the trick.

Nonetheless, if you have patience to wait, please note that support for night lighting is already halfway in progress and will completed as soon as possible.

Sounds good, thanks for letting us know.

Is there still any change for the parameter I described in my original post? I have quite a few ideas which it'll be useful for.
If you enjoy my work, please consider making a donation: