3DC material attributes and maps for RS / RW (Updated v9)

V9: Added ‘How to add custom keywords’ using a reply from dick8299.

I’ve summarized how to set 3DC material attributes and maps for creating engines and buildings for RS / RW.
Thanks for checking the correctness of the information below.

[b:1xl1uhsr]Material attributes[/b:1xl1uhsr]
Use non standard 3DC material settings:
[b:1xl1uhsr]1)[/b:1xl1uhsr]
Colour: white
Diffuse = 50 (A higher Diffuse value means that faces pointing away from the light source will be brighter)
Ambient = 1 (Raising the Ambient value could potentially make the model glow in the dark)
Specular = 0
Translucent = 0 (this parameter can be left to 0, even when dealing with transparency, for example in windows)

[b:1xl1uhsr]2)[/b:1xl1uhsr]
In Properties and Information panel, select ‘Directional #1’ object in the hierarchy and select Component properties tab. Change the colour from almost black to mid grey or lighter.

[b:1xl1uhsr]Texturing when using normal maps (RailSim keyword TrainBumpSpecEnvMask.fx)[/b:1xl1uhsr]

1) If normal maps are used, each face (!) must be textured using face coordinates: push ‘edit using face coordinates’, use the brush tool to paint each face, or, select the faces to be textured and use uv map (2nd option could be easier depending on how easy is the faces selection. When looking at a face texture mapping in uv remap, I’m not sure it works though).
Using the fill tool will make some faces to be rendered black in RS / RW.

2) The texture files are split in 2 parts: the normal map file and a tga file including the primary texture and the specular map. For a proper result in RS/RW, the primary texture included in the tga file must be darkened (I use -60 brightness in Gimp).
The 3DC model references only the primary texture. After export to RS/RW source from 3DC, the tga files converted with ToACE or RWAceTool must overwrite the corresponding ace files created by the export.
(a link to RWAceTool.zip can be found on page <!– m –><a class="postlink" href="http://www.railsimulator.com/support.php">http://www.railsimulator.com/support.php</a>&lt;!– m –> )

[b:1xl1uhsr]How to add custom keywords[/b:1xl1uhsr] (from a reply by dick8299)
There are two ways to get the [b:1xl1uhsr]RailSim and TxAlpha[/b:1xl1uhsr] windows into the properties panel.

The quickest and easiest is to start the TrainSimulator Wizard plug in. You will see a pop up message appear stating that the two items were added. You can then cancel the wizard at that point if you want and the two fields will be in the properties panel.

The other way is to manually add them using Files / Properties / CustomFields and then type the field names into the spaces under Material Custom Fields.This is the only way to add [b:1xl1uhsr]RailSimX[/b:1xl1uhsr] keyword.

[b:1xl1uhsr]Changing SPECULARPOWER, CUSTOMPARAM0, CUSTOMPARAM1, CUSTOMPARAM2[/b:1xl1uhsr]
r0arg0 is used to set CUSTOMPARAM0
r0arg1 is used to set CUSTOMPARAM1
r0arg2 is used to set CUSTOMPARAM2
specularpower is used to set SPECULARPOWER (r0specularpower is not working: see post from vlado[/url:1xl1uhsr])

For example:
r0arg0=32;specularpower=4
sets SPECULARPOWER to 4 and CUSTOMPARAM0 to 32.

[b:2pu6jyqb]Material maps and custom keywords:[/b:2pu6jyqb]

Hi Dom,

Thanks, for setting this up.
This is a great help for me.

I can see one possible mistake.
I think the primary texture name in the normal map section, should be without _nm in the filename.

Regards

Gerrit

Also none of the RW shaders use a specular map – the ‘spec’ in the shader name applies to the material specular shine.

[quote:2v8hz05i]Originally posted by HondaWizard:
I think the primary texture name in the normal map section, should be without _nm in the filename.

[/quote:2v8hz05i]
May be the _nm doesn’t matter?

However, what is on the normal map row is, at least, one way to do itGǪ unless there were changes since I exported more than a year ago.

I updated the array with your remark about _nm.

Note that shaders available in RailWorks might not be available in RailSim!
Thinking of TrainGlass.fx that is a RailWorks only shader.

[quote:32745zpx]Originally posted by KMW:
Note that shaders available in RailWorks might not be available in RailSim!
Thinking of TrainGlass.fx that is a RailWorks only shader. [/quote:32745zpx]

Because of the end of this [img:32745zpx]http&#58;//amabilis&#46;com/forumattachments/a/tpc/f/50410947331/m/958109164[/img:32745zpx]
topic
, I didn’t speak of BlendATexDiff. I checked myself, TrainGlass.fx is both in RS and RW directories. Did anyone tested TrainGlass.fx in RS?

Okay, tried TrainGlass.fx straight away on a carriage I’m building.
It does export into RailSim but the windows are completely black with the texture that gives desired effect using BlendATexDiff shader!

Thanks for the test!

Beginning of the topic updated.

Railsim/Railworks was written by a lot of young people (I saw them) who did not know what they were talking about a lot of the time.
The coding is quite poor (keyframe handling wrong for one) and the use of 3D nomenclature is also wrong (stencil shadows that are actually volume shadows and not stencil shadows)

When they say ‘specular map’ they mean the alpha map of the main texture is blended with the environment map (absolutely nothing to do with specular which is a computed focused lighting effect)

Can we ‘sticky’ this topic and have it always appear at the top of the list of posts?

(If so delete this reply when accomplished)

[quote:3axew2f2]Originally posted by Paul Gausden:
Railsim/Railworks was written by a lot of young people (I saw them) who did not know what they were talking about a lot of the time.
The coding is quite poor (keyframe handling wrong for one) and the use of 3D nomenclature is also wrong (stencil shadows that are actually volume shadows and not stencil shadows)

When they say ‘specular map’ they mean the alpha map of the main texture is blended with the environment map (absolutely nothing to do with specular which is a computed focused lighting effect) [/quote:3axew2f2]

Thanks for your precise remark. Now I undestand the above post:
[quote:3axew2f2]Originally posted by Paul Gausden:
Also none of the RW shaders use a specular map – the ‘spec’ in the shader name applies to the material specular shine. [/quote:3axew2f2]

I updated the information at the beginning of the topic.

Updated as specular map using 3DC specular map slot is not working.

You must be logged in to reply in this thread.

26 posts