Viewing lights from a distance?

Viewing lights from a distance?

Postby irishrailguy » Wed Oct 29, 2014 10:24 pm

Hi,

I've always wondered how this works properly. On objects with lights there always seems to be a setup whereby the light is visible for large distances from the player, the bloom seems to increase as the player moves away from the light and it becomes more refined as the player approaches it. A good example of this is the lights on the LED signals, which are visible from a large distance. I've had a look about the web on the topic and all I can get from it is that it seems to be done with LODs and larger increments of the same object appear as the player moves away from the light, however LODs do an instant transition and the effect on the LED signals appears to be gradual, so maybe this isn't the method?

Does anyone have any info on the subject?

Thanks,

Kevin
irishrailguy
Fit for Firing Duties
 
Posts: 47
Joined: Sun Apr 06, 2014 12:01 pm
Location: Dublin
Has thanked: 8 times
Been thanked: 14 times

Re: Viewing lights from a distance?

Postby AndiS » Wed Oct 29, 2014 11:55 pm

No idea if there are newer methods, but I think the traditional with the LODs is what most people still use. It is half as bad as it sounds, and you are free to define more than 3 LODs if you are concerned about the stepwise enlargement being noticeable. Since you style the light with some halo anyway, it is not a solid disc with a clear margin that is growing in steps, but a blob with a gradient around it.

I must add that I have no idea how the projected light stuff applies to signals though. Maybe I live behind the moon, or my computer is too old for present day computer games.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Viewing lights from a distance?

Postby Caliban » Thu Oct 30, 2014 1:59 am

Custom mips also ( or perhaps instead of ) - make the lit part progressively take up more of the texture for each further mip. However there've been some complaints about distance lighting in 2015, if I can remember who was complaining I'll see if I can find out the problem & any solution.
Caliban
General Shed Duties
 
Posts: 20
Joined: Wed Sep 17, 2014 3:26 am
Has thanked: 1 time
Been thanked: 7 times

Re: Viewing lights from a distance?

Postby irishrailguy » Fri Oct 31, 2014 1:14 am

Thanks guys. Caliban, I never considered mips at all, I'm giving it a go but you wouldn't know how to adjust the distances through which the mips are cycled through? Because my texture (using .dds at DXT5) is running through all the mips before I hit 20ft away from the object. It's also clearly jumping from one mip to the other, but the UK LEDs seem to have the glow fade in and out at a particular distance, so I'm not sure if this is the same methodology, however I think I'll check the LED texture just in case, hopefully I'll be able to display all the mips properly...

Kevin
irishrailguy
Fit for Firing Duties
 
Posts: 47
Joined: Sun Apr 06, 2014 12:01 pm
Location: Dublin
Has thanked: 8 times
Been thanked: 14 times

Re: Viewing lights from a distance?

Postby Caliban » Fri Oct 31, 2014 4:45 am

Negative Mip LOD bias settings will push the mip changes further away - I'm not sure the mechanism of that though, they might all cycle through at 60ft instead. I can't remember the rest of the mechanism right now, sorry :S
Caliban
General Shed Duties
 
Posts: 20
Joined: Wed Sep 17, 2014 3:26 am
Has thanked: 1 time
Been thanked: 7 times

Re: Viewing lights from a distance?

Postby AndiS » Fri Oct 31, 2014 1:07 pm

I think you cannot influence the switching between the different level. Sure enough you can move them all nearer or farther away using mip bias, but this is only for local sorting and it does not help you here.

What you need is blobs growing bigger a bit for every level.

If you are sure that these LED signals do something different, you might want to inspect the .geopcdx file to see the shader name used there. However, the mapping between these names and what you use in the 3D program is not straightforward.

I seem to remember that there was some shader named Glow or similar. I clearly remember the signals having some stupid halo starting from RW 1 or 2. You could see it from the rear, too, quite annoying. Not sure that was some Glow material or just a viewer facing quad with a blob with transparency towards the edges on it.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Viewing lights from a distance?

Postby Caliban » Fri Oct 31, 2014 1:40 pm

TrainEmissiveGlow probably, which arrived in TSX ( and only works in TSX ) - if mips are cycling too fast we might have found the source of the 2015 issue. I'm still trying to check up on that. The old old ( and the way I preferred even in TSX ) was to use AddATex, and under TSX you could give that an emissive glow with a material setting too iirc. I think 2015 broke that shader :(

Edit: AddATex sometimes just stops working - TEG was occasionally broken in beta. I wouldn't use TEG for a signal though, it doesn't degrade right with distance.
Caliban
General Shed Duties
 
Posts: 20
Joined: Wed Sep 17, 2014 3:26 am
Has thanked: 1 time
Been thanked: 7 times


Return to 3D Objects General

Who is online

Users browsing this forum: No registered users and 1 guest