Rain on Cab effect

I am trying to figure out how to do the TS2012 rainy cab windscreen in 3DCanvas/Crafter (I’m still using for my RW model making).

So this is what I’ve seen so far by examining the Kuju files with RWTools. There is a new shader called TrainGlassWeatherEffects.fx which is used for the windscreen. Then the actual windscreen has three textures:- the basic texture for the translucency (which, looking at the dds seems to be a greyscale image, rather than one that uses alpha and this appears twice in the geometry file), then one for normals, which denotes the area covered by the windscreen wiper and a final texture which seems to be actually related to the wiper movement, but which looks identical to the normal map. With Canvas/Crafter I would like to know which slot this last texture goes in. Plus it may be necessary to set some parameters with these.

The second part of the setup is a new addition to the Engine Blueprint called wiperpairs. This links the wiper animation to the textures. I have started to set this up in Canvas, so will soon see if I start to get any results or if I’m barking up the wrong tree.

If anyone else has any thoughts on this, I’d be pleased to hear them. If I can crack this I can start updating all my models for RW3 (which annoyingly would also seem to include raising all wheels, so they don’t sit in the rail – why did this get changed?), then I’d be very happy. I have a Toronto PCC Streetcar almost ready for release, but would like it to be fully RW3 ready.


Richard Scott

Well, I’m having some (limited) success with getting the rain to fall on my streetcar windscreen. I have raindrops (lots of them), but the wiper doesn’t clear them. I can also only do it by some editing of the cab geo file directly in RW Tools and ‘appropriating’ the RSDL texture files from their models that have the rain effect.


As I now understand it the method is as follows. Create a duplicate of the windscreen in the cab model and place it exactly over the actual windscreen. This duplicate is textured with the TrainGlassWeatherEffects.fx shader. As well as the main texture it has, what appears to be, a ‘Normals’ file and another one related to wiper motion. The part has to have a materials name of weatherglass_1 (this seems crucial or it won’t work). So first of all, how do I name a material in Canvas (to save me having to manually add this each time)? When I export it comes out as Material8, I’ve tried the RailSim field and that isn’t it. This is how that part of the GeoPcDx file looks.

[quote:1y7r7aab]<ShaderName d:type="cDeltaString">TrainGlassWeatherEffects.fx</ShaderName>
<e d:type="cDeltaString">textures[00]pccwindiff_nm</e>
<e d:type="cDeltaString">textures[00]pccwindiff_nm</e>
<e d:type="cDeltaString">textures[00]pccwinnorm_nm</e>
<e d:type="cDeltaString">textures[00]pccwinwmotion_nm</e>
<Name d:type="cDeltaString">weatherglass_1</Name>

Why does the first texture appear twice and how do I get Canvas to export like that? Also, the pccwinnorm_nm file which I assumed was a normals file doesn’t export from my Canvas model (I’ve never had problems exporting normals before). I’ve tried it in the Bump Map slot and the others, but it won’t appear, so has to be added manually after. And the pccwinmotion file will export, if I put it in the environment slot, but I don’t know if that is the right one.

In the engine blueprint there is a section called wiper pairs. This links the wiper animation to the texture files (the norm and wmotion) on our ‘special’ windscreen. Most of this I can sort out and create in Canvas. However, it doesn’t work with the ‘norm’ and ‘wmotion’ textures I create. I have to export and then replace the Asset folder texture files with the Kuju ones (renamed to match mine).

I suspect there might still be some jiggery and indeed pokery to be done with the textures (someone from RSDL has mentioned a Rain Tool), but would be pleased if I could at least get these parts exported without having to text edit the cab file.

Thanks for any help.

Richard Scott

I tried but I can not get raindrops on my windscreen, just black untransparent. If I remove black dummy texture from slot, I can see trough but no raindrops. What’s wrong with my settings?


I filled all slots with textures and I always get only two into geo file <!– s:( –><img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad" /><!– s:( –>

Hello RichardScott,

I’m impressed of what you already found out.

Do I understand well that changing the material name to weatherglass_1 and adding some texture files to have the proper list of 4 files was done manually. The problem is that it won’t work if the GoePcDx file is too big (serz.exe limitation).

So unfortunately, if you confirm the above manual changes, I won’t be able to apply this to my models without a proper export mecanism in 3DC.

&quot;DOM107&quot;:33qt34w1 wrote:
…The problem is that it won’t work if the GoePcDx file is too big (serz.exe limitation)…[/quote:33qt34w1]
Not too big for cab.

You’re right: the cab file is smaller than the body file for which I noticed the serz problem.

I’ll try in the coming days.

Yesterday was raining so I spend more time for that problem but I didn’t receive raindrops on my windshield

Hi Vlado and Dom

Yes, I’m afraid the only way I’ve got this far is by manually editing the geo file. Vlado you have the same settings as me and I get the same result – only two textures and the material name (weatherglass_1) doesn’t get added. I did have an alpha in the main texture (which gets exported ok) and that made a difference. I have always been able to export Normal files via the bump slot, yet here it doesn’t work. Is it because the shader name doesn’t have Bump in it? I suspect there is more to the texture files it uses than we realise. I only get my limited results by entering the texture names and copying over the texture files from the Kuju Assets folder of a loco that has the rain effect.

I’m really at the limit of my knowledge here.


Hi Richard,

Try this exporter for 7.1.2 – it should include the bump map file if &quot;WeatherEffects&quot; is in the shader name
You may need to register the file if using Vista or Win7

If this works I’ll add it to the V9 version too.

&quot;PaulGausden&quot;:dgbqjuzt wrote:
Hi Richard,
…it should include the bump map file if &quot;WeatherEffects&quot; is in the shader name

Hello Paul,

This sounds good (though I’ll have to wait for the 9.x version…).

I have questions on how this is going to work (using RichardScott file names):
1) RailSim keyword = TrainGlassWeatherEffects.fx (Only WeatherEffects is needed for the exporter but the full name TrainGlassWeatherEffects.fx is needed for the igs file)
2) Primary texture file = pccwindiff_nm
3) Bump map file = pccwinnorm_nm
4) Environment map = pccwinwmotion_nm

The created material will be automatically named weatherglass_1

Is it correct?

Thank you Paul. For now I get 3 textures but the material name &quot;weatherglass_1&quot; I only do it with RW Tools. For now, the result of that is untransparent black windshield.

[code:3fg8f2kd]&lt;ShaderName d&#58;type=&quot;cDeltaString&quot;&gt;TrainGlassWeatherEffects&#46;fx&lt;/ShaderName&gt;
&lt;e d&#58;type=&quot;cDeltaString&quot;&gt;textures&#91;00&#93;glassdiff_nm&lt;/e&gt;
&lt;e d&#58;type=&quot;cDeltaString&quot;&gt;textures&#91;00&#93;normal_nm&lt;/e&gt;
&lt;e d&#58;type=&quot;cDeltaString&quot;&gt;textures&#91;00&#93;wiperexport_nm&lt;/e&gt;
&lt;Name d&#58;type=&quot;cDeltaString&quot;&gt;weatherglass_1&lt;/Name&gt;

I missed the bit about the material naming – this update may fix that.

I’m not sure that the first texture needs to be duplicated, that may be an artifact from the Max exporter.

Paul, it must be &quot;weatherglass_1&quot; not &quot;weatherglass_0&quot; <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

EDIT: Very strange… it’s OK. Now is &quot;weatherglass_1&quot;

&quot;PaulGausden&quot;:295zehnx wrote:
I’m not sure that the first texture needs to be duplicated, that may be an artifact from the Max exporter.[/quote:295zehnx]

It seems useful…

&quot;MikeTrams on uktrainsim&quot;:295zehnx wrote:
Reflective glass with cubic reflection map and diffuse. TEX1 RGB Diffuse A Translucency, TEX2 Cubic environment map, TEX3 Normal texture placeholder, TEX4 Backbuffer placeholder&quot;
… unless Vlado’s tests prove otherwise. <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

You must be logged in to reply in this thread.