Avoiding Shadows

etozorak

Train-a-Mania
I'm working on a layout where I'm realizing that the proximity of backdrops to the track and scenery causes them to cast unwanted shadows over everything. How have other people avoided this issue? Is it just a matter of disabling shadows entirely, or are there backdrop assets that do not cast shadows?
 
If a backdrop asset has a trainz-build number of 4.1 or higher, I think you can disable its shadow-casting ability by editing its config.txt file. You need to insert the following line of text;

does-cast-shadows 0

into the mesh sub-container section of its mesh-table, like this;

mesh-table
{
default
{
mesh "backdrop.im"
auto-create 1
does-cast-shadows 0
}
}


I think this is valid for both Kind scenery and Kind track assets. In other words, for backdrops listed in either the Objects tab or the Tracks tab in Surveyor.

Be aware that such edits, if allowed by the program, will only be local to your own computer. If you publish a route with these assets to the DLS or elsewhere, other users will end up with the original, un-edited backdrops, so they will still see shadows.

~ Deane



.
 
Last edited:
I set my route latitude/longitude to be 0.00, 0.00 which is the Null Island Buoy off the African Ivory Coast, then the sun shines directly straight down, with both sides of an asset equally illuminated

I have tried this but it doesn't seem to have changed the shadows.


mesh-table
{
default
{
mesh "backdrop.im"
auto-create 1
does-cast-shadows 0
}
}

Unfortunately, all of the backdrops I can find on the DLS were created with TS12. I tried to add the line but it had no effect.
 
I have tried this but it doesn't seem to have changed the shadows.

Unfortunately, all of the backdrops I can find on the DLS were created with TS12. I tried to add the line but it had no effect.

My apologies, I misread the Wiki. The does-not-cast-shadows tag only works if the trainz-build is 4.4 or higher, not 4.1.


Changing trainz-build to 4.4 and adding a does-not-cast-shadows 0 tag (as described above) works on both scenery and spline objects. The examples I confirmed this with were;

<kuid:396831:567> Backdrop 001 ek. (TS12 Kind:scenery).

<kuid2:156765:101350:1> Model Railroad Backdrop 1. (TS12 Kind:track)*.


* A side note on this one. It uses a single-sided texture, so even without the edits, you cannot see its shadow when looking at it from the visible side. Very clever creator, Simulatortrain/xawery!



.
 
Last edited:
To provide closure to this topic, euromodeller kindly reuploaded his backdrop and wall assets with the "no shadow" fix applied. They are in the DLS, and I appreciate him doing this for us.
 
I set my route latitude/longitude to be 0.00, 0.00 which is the Null Island Buoy off the African Ivory Coast, then the sun shines directly straight down, with both sides of an asset equally illuminated
I have tried this but it doesn't seem to have changed the shadows.
Yes, sounds good but it can't really work to prevent shadows. It does bring up some interesting question of the game's treatment of astronomical events but I'll leave that to others.

I could discuss how the real world works, mean and apparent sun, local apparent noon, Sun's apparent motion in the sky, equinoxes and a few other topics, but basically for the sun to cast no shadows on your Trainz route it would have to remain stationary in the sky directly above your location 24 hrs a day and just slowly dim on and off like a light bulb on a dimmer switch.

Bob Pearson
An advocate for Celestial Navigation in the GPS age.
If I determine time and longitude from lunar distances am I a lunatic?
 
This is sort of along the same line i think. I have noticed on some assets, mainly grasses, that one side is very dark and the other is light due to the sun. Is there a way to remove this effect? I have notice the grass asset WP no shad doesn't seem to be affected by the sun, but I can't figure what was changed in the config (if anything) to achieve this.
 
The light/dark problem on billboard-type grass and trees is not a shadow issue. It's something to do with how Trainz light interacts with such objects. The cure for it is something that JVC came up with, which is to change the direction of the object mesh's vertex normals, so they all point vertically up. Something along those lines anyway. That fix can only be done at the 3D creation level, not by way of config alterations. I think Jan (JVC) made some of those meshes available for re-skinning so people could create their own assets.
 
Hi guys,
For the light/dark problem, I recall avoiding it for scenery items (it was interior of buildings) by using the tag "ambiant 0" or "1" or something like that ...
Beware : it was 5 years ago, with TRS2009 !!!
Cheers,
Philippe
 
Back
Top