Feb18 update about TrainSpecEnvMask.fx (see p2)

Just to let you know… I have read this and will be working on it in about two weeks, assuming nothing unexpected comes up. As most of you know I’m in the midst of a big 3DC redevelopment, and it wasn’t possible to work on this.

Using TexDiff, gives a consistent display between 3DC and KRS and the result looks good:
[img:ydakzbh7]http://img218.imageshack.us/my.php?image=image5oa9.jpg[/img:ydakzbh7]
[img:ydakzbh7]http://img218.imageshack.us/img218/5637/image5oa9.th.jpg[/img:ydakzbh7]

Thanks to advices read in the forum, I wanted to go further and have a metallic look.
So I created this texture (left: original texture with light lowered by -90 (!!); right: alpha texture inspired from the one in Rail Simulator assets).
[img:ydakzbh7]http://img217.imageshack.us/my.php?image=image11nj9.jpg[/img:ydakzbh7]
[img:ydakzbh7]http://img217.imageshack.us/img217/5435/image11nj9.th.jpg[/img:ydakzbh7]

I just swapped one texture file and set TrainSpecEnvMask.fx in 3DC in one material slot of the body. I left TxAlpha to none as the effect is not transparency or translucency.
I added the black environment map and got this:
[img:ydakzbh7]http://img111.imageshack.us/my.php?image=image10lp1.jpg[/img:ydakzbh7]
[img:ydakzbh7]http://img111.imageshack.us/img111/8412/image10lp1.th.jpg[/img:ydakzbh7]

1) In 3DC the alpha is taken for translucency and it gives the above very annoying look.
2) More important, there is no metal effect like the one I was looking for and, certainly because of the need to darken the texture, there is a shift in colors.

Anything I forgot?
Thanks in advance for you help because so far I find TrainSpecEnvMask.fx not usable and harmful.

If you are using TrainSpecEnvMask.fx you’ll need to have a separate texture for Rail Simulator that you convert manually. I think the help file talks about this in the Tutorials for 3DC Trainworsk-andgt;Rail Simulator-andgt;Basics section.

I don’t know the specifics required to get the look you want in Rail Simulator. Can anyone else help?

It’s as you say Richard, you have to have 2 separate sets of texture. If you use a .tga file with the specular info in the alpha layer, then 3DC will see the specular info as transparency and so parts of the model will dissapear in 3DC.

What I do for my models is use a .bmp map texture for 3DC use, and an identically named .tga copy of the texture(with specular info) for converting to an .ace file for railsim use.

The lighter the specular colour then the shinier and more metal like your model will look.

When you use the TrainSpecEnvMask.fx shader then you see a lightening of the texture. It’s going to be a matter of experimentation on how much the textures will need altereing to make the model look good in the sim. It can be done, though.

Kevin

Yes, I skipped the reading of paragraph ‘I want to have specular highlighting. How do I do this?’. Thanks for your explanations.

Do you confirm that ‘specular level’ in 3DC is not used for KRS specular?

So the procedure is as follows:
1) Wherever specular is needed, prepare 2 files : mytexture.bmp and mytexture.tga
mytexture.bmp to be applied in 3DC and mytexture.tga to be used for specular in KRS.
Use TrainSpecEnvMask.fx keyword for mytexture.bmp
2) Export model from 3DC with 3DC compliant textures (bmp; use tga if transparency is needed, not specular). Faces with a tga texture applied in 3DC for transparency / translucency cannot have a specular effect.
3) Use ToACE to convert mytexture.tga to mytexture.ace in directory ‘Rail SimulatorSourceDeveloperAddonRailVehiclesElectricMyModelDefaultEngineTextures’ (overwriting the existing mytexture.ace)
4) Export using KRS blueprint / asset editor tool

I’ll try this tomorrow (and likely new questions… <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –> ).

Specualar level in 3DC does not seem to have any effect as far as I could see. All the effect comes from the lightness of the alpha channel of the .tga file.

Otherwise,what you have written is correct except, possibly, for item 2 ;-
You cannot have transparency and specular gloss on the same part. It’s either one or the other.

eg If you are modelling a coach and want to use specular gloss on it, then you will have to physically model the windows and not use alpha effects to model them, like we did in msts.

Cheers,
Kevin

Thanks for the details.

[BLOCKQUOTE class=’ip-ubbcode-quote[/img]
[div class=’ip-ubbcode-quote-title[/img]
quote:[/div][div class=’ip-ubbcode-quote-content[/img]
Originally posted by kevm:
Otherwise,what you have written is correct except, possibly, for item 2 ;-
You cannot have transparency and specular gloss on the same part. It’s either one or the other.
[/div][/BLOCKQUOTE]
Yes, it would mean applying 2 alpha textures at a time (one for translucency and one for specular). I updated my little list.

[BLOCKQUOTE class=’ip-ubbcode-quote[/img]
[div class=’ip-ubbcode-quote-title[/img]
quote:[/div][div class=’ip-ubbcode-quote-content[/img]
Originally posted by kevm:
… you will have to physically model the windows and not use alpha effects to model them, like we did in msts.
[/div][/BLOCKQUOTE]
Yes, that’s what I’m doing: windows are faces on which is applyied BlendATexDiff with the _nm [img:id0fqyz5]http&#58;//amabilis&#46;com/forumattachments/a/tpc/f/50410947331/m/52210185341[/img:id0fqyz5]
trick

I have been using a slightly different approach to editing the gloss on textures that I believe you may find helpful.

I have engine.bmp that I use in 3DC together with a enviro.bmp for the enviro texture.

Shaders applied in 3DC (usually TrainSpecEnvMask.fx)

I have achieved better results by using _nm making it engine_nm.bmp.

I use ToAce to convert these into my sourcedeveloperenginetextures folder.

After exporting the igs file from 3DC the model is run through the blueprint/Asset editor into Assetsdeveloperrailvehicles…. etc

If I want to edit a texture I now use the RS.Bin tool from Steelix and convert the TgPcDx file to .DDS

edit the .DDS and mask/alpha layer in PSP
import back into RS.Bin and save the modified TgPcDx back into Railsim.

It is definately a quicker way to see results where they matter … in the game.

Also if I need to alter shaders or indeed any value it can be done by editing the GeoPcDx file using Mike Simpsons RSTools.

Examining the levels in Default Stock using this method can also be a help.

(sorry if I am stating the obvious,,, definately new to all this)

Sly

Thanks.
I’ll also try your approach (nothing obvious there!).

If I build a little recipe:
1) Use engine_nm.bmp in 3DC
2) Export with 3DC and blueprint/Asset editor
3) Add alpha for specular to engine_nm.TgPcDx :
….a. convert the engine_nm.TgPcDx file to engine_nm.DDS with RS Bin tool
….b. Add alpha for specular in DDS file with a paint program
….c. convert the engine_nm.dds file to engine_nm. TgPcDx with RS Bin tool
4) Change shaders (for example) by editing the GeoPcDx file using Mike Simpsons RSTools

Any advice for the parameters which could be changed?
Any interesting samples?

Have to say, sly, that all looks a bit complicated!!!

One warning I would give is that using the _nm prefix can increase the texture sizes considerable (as it cuts out the texture compression). I’d only use it where you feel it’s absolutely necessary.

Cheers,
Kevin

Hi

You should add
2a to the formula convert ###_nm.bmp to ace withToAce

The levels of gloss achievable with TrainSpecEnvMask.fx are very high. i have been using RGB values of between 16,16,16 and 35,35,35 in an effort to tone down a black steam loco.

If the bmp is allowed to be compressed I got blotchy results in KRS.. I don’t know if this is the case if I used targa in 3DC
Good results at slight bodywork rippling and light reflections can be achieved by using/copying/imitating the alpha masks from the default coaching stock…
Without bumpmaps I have been struggling to get my steam loco looking ‘rough enough’ but a compromise is getting close

The balance between light and shaded sides is the problem area for me at the moment and I am hoping that changes to the variables will eventually produce a decent balance..
If I set the ‘Lit’ side darkness to suit the loco, the ‘shaded side is virtually pitch black with no definition… this is particuarly bad on Black locomotives and even the default stock is too light in an effort to overcome this….. in my opinion <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

I will keep you posted on any findings

The main reason for adjusting textures at the final stage (TgPcDx) is speed and is prolly closer to what I see ‘In Game’

Sorry kev was posting at the same time..

At the moment due to my innefficiency I have the following textures

Engine_nm 1024 x1024 bmp
Enviro 128 x128 bmp
flat texture 512 x512 (hopefull to lose this one)
Decals 512 x512 bmp

The engine tex gets bumped upto 2048 with mips

However I have not had any problem loading or running with 10 plus instances in the same view.. however it is going to be a whopping file size when done <!– s:? –><img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused" /><!– s:? –>

I may try a Targa to Ace route if to see if it eliminates the distortion with compression.

My route for editing textures saves time by missing out the 3DC and asset editor stages of modifying textures..

Grab the TgPcDx with RSBin save to DDS
Edit DDS in paintshop
Use RSBin to put it back in KRS

Compared to

Edit bmp (targa in PSP)
Export from 3DC (which in my case usually is showing something different to what I see in game)
Go through the Blueprint/Asset editor

Using Mike’s RSTools to edit the GeoPcDX you can use the search and replace function to swap shaders for eg, at a stroke. or Spec from 10 to 25.. I realise its not for everyone tho <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Sly

[BLOCKQUOTE class=’ip-ubbcode-quote’][div class=’ip-ubbcode-quote-title’]quote:[/div][div class=’ip-ubbcode-quote-content’]Originally posted by Sly401:
The levels of gloss achievable with TrainSpecEnvMask.fx are very high. i have been using RGB values of between [b:vp7a4vir]16,16,16 and 35,35,35[/b:vp7a4vir] in an effort to tone down a black steam loco.

[/div][/BLOCKQUOTE]

[BLOCKQUOTE class=’ip-ubbcode-quote’][div class=’ip-ubbcode-quote-title’]quote:[/div][div class=’ip-ubbcode-quote-content’]Originally posted by Sly401:
Using Mike’s RSTools to edit the GeoPcDX you can use the search and replace function to swap shaders for eg, at a stroke. or [b:vp7a4vir]Spec from 10 to 25.[/b:vp7a4vir] I realise its not for everyone tho <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

[/div][/BLOCKQUOTE]
Hi,

Where do you find those values? Where do you set them?

[BLOCKQUOTE class=’ip-ubbcode-quote’][div class=’ip-ubbcode-quote-title’]quote:[/div][div class=’ip-ubbcode-quote-content’]Originally posted by kevm:
Specualar level in 3DC does not seem to have any effect as far as I could see. [/div][/BLOCKQUOTE]
It has:

[img:3kyld7fa]http&#58;//img218&#46;imageshack&#46;us/my&#46;php?image=image1fs2&#46;jpg[/img:3kyld7fa]
[img]http://img218.imageshack.us/img218/4097/image1fs2.th.jpg’]

Top image with Specular=10 (correct display of the woman and kid faces)
Bottom image with Specular=85

Extract from ‘4.07 Train Guidelines’ :
‘Shown below is a grid of random shapes with a [b:2dfvmivs]variety of specular and glossiness
values on them, using the Kuju material[/b:2dfvmivs]. For your train model, pick a combination
that is appropriate:
[img:2dfvmivs]http&#58;//imageshack&#46;us[/img:2dfvmivs]
[img:2dfvmivs]http&#58;//img80&#46;imageshack&#46;us/img80/5214/image2eq3&#46;jpg[/img:2dfvmivs]

The values used in the example pictures above (a glossiness of 32 and a specular
power of 3) give a fairly good result for a glossy, but used, painted metal surface as
found on many passenger trains.
Please refrain from using a glossiness of 0, no matter how small the specular power
is. A specular power of 0 gives a totally matt surface, regardless of glossiness.’

Why can’t we set glossiness in 3DC?
Furthermore, specular in 3DC has an influence but small.

I’m not convinced that the complicate process of creating a texture with specular, including the annoying need to lower light / contrast, is normal. I understand I could need to adapt the texture within a small range (say 10%), but not the huge light / contrast change that must be used now.

You must be logged in to reply in this thread.

26 posts