casts shadows on assets in Surveyor

ex-railwayman

New member
I've been doing a bit of thinking and wondered if it's possible to enable trees and buildings to have shadows......I know that bridges and locomotives have this effect and wondered if I can also add it to other things by means of amending the config.txt accordingly, or, is it something in the script that will stop me from achieving this ???

Sorry, if this has been asked before, but, I couldn't find anything appropriate in a quick search on the forum.

Thankz for any advice / help, etc.....

Cheerz. ex-railwayman.
 
Last edited:
What version of trainz are you looking at, as I believe TS2009 generates them automatically.

I'm currently playing with the TS2009 beta 2 version, I have already tried to get a shadow on a Palm tree, but, it didn't work.....I changed the lines in the config.txt from :

kind (scenery) and changed it to (bridge), - CMP will not accept the tree to be a scenic item, so I put in bridge instead, I also added the line cast_shadows 0, now, CM2 accepted this, so I thought great stuff, went straight into surveyor, but the tree didn't appear for me to place it on my layout......:'(

Any advice please ??

Cheerz. ex.
 
Last edited:
Yes and no



And I have a fairy in a glass jar .

Sci

I was thinking that as there is a shadow option in TS2009, and I can see shadows on all rolling stock and the bridges, that they would also appear everywhere else. Sorry!

@ Scimitar: No you don't! Fairies are allergic to glass!:hehe:

@ Ex-railwayman: I've just thought, if you make an asset a bridge, is it automatically turned into a track spline?
 
Last edited:
Hello Jonny, would you know then if I can add something into the asset folder, a .gs or .im file and add into the config.txt something like :-

mesh-table {
default {
mesh "body/PS2_4750.lm"
auto-create 1
}
shadow {
mesh "shadow/shadow.im"
}
}

Let me try and do some fiddling and see if I can make something work, this could be very big for Trainz, having shadows on static objects......:)

Cheerz. ex.
 
If you want shadows in kind 'bridge' you have to change tag casts_shadows 0 to casts_shadows 1.

In other words

0=off
1=on
 
mesh-table {
default {
mesh "body/PS2_4750.lm"
auto-create 1
}
shadow {
mesh "shadow/shadow.im"
}
}
After adding this mesh table, take your item in your modeling program, dump all textures, take a simple black texture (it is usually a small file like 16x16 or even 8x8, you only have 1 color), add the black texture to everything. You could also remove polys and modify the mesh to make it less poly intensive (your choice). Export that as your shadow mesh, put it along with black.texture.txt and the black image file into the shadow folder. See what happens.
For some basic idea, scroll down here to 4. Creating the shadow file.
http://www.worldoftrainz.com/Pages/...xLocomotive/GmaxLocomotiveChapter10TutTRS.htm
 
Back
Top