3D Canvas Community
3D Canvas Discussion Forums
Rail Simulator
Feb18 update about TrainSpecEnvMask.fx (see p2)|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Using TexDiff, gives a consistent display between 3DC and KRS and the result looks good:
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). 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: 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. This message has been edited. Last edited by: DOM107, |
||
|
|
Member |
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 3D Canvas Trainworsk->Rail Simulator->Basics section.
I don't know the specifics required to get the look you want in Rail Simulator. Can anyone else help? |
|||
|
|
Member |
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 Canvas will see the specular info as transparency and so parts of the model will dissapear in canvas.
What I do for my models is use a .bmp map texture for canvas 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 |
|||
|
|
Member |
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 Simulator\Source\Developer\Addon\RailVehicles\Electric\MyModel\Default\Engine\Textures" (overwriting the existing mytexture.ace) 4) Export using KRS blueprint / asset editor tool I'll try this tomorrow (and likely new questions... This message has been edited. Last edited by: DOM107, |
|||
|
|
Member |
Specualar level in canvas 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 |
|||
|
|
Member |
Thanks for the details.
Yes, it would mean applying 2 alpha textures at a time (one for translucency and one for specular). I updated my little list.
Yes, that's what I'm doing: windows are faces on which is applyied BlendATexDiff with the _nm trick |
|||
|
|
Newcomer |
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 canvas together with a enviro.bmp for the enviro texture. Shaders applied in canvas (usually TrainSpecEnvMask.fx) I have achieved better results by using _nm making it engine_nm.bmp. I use ToAce to convert these into my source\developer\engine\textures folder. After exporting the igs file from Canvas the model is run through the blueprint/Asset editor into Assets\developer\railvehicles\.... 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 |
|||
|
|
Member |
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? |
|||
|
|
Member |
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 |
|||
|
|
Newcomer |
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 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" |
|||
|
|
Newcomer |
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 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 canvas 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 Canvas (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 Sly |
|||
|
|
Member |
Hi, Where do you find those values? Where do you set them? |
|||
|
|
Member |
It has: Top image with Specular=10 (correct display of the woman and kid faces) Bottom image with Specular=85 This message has been edited. Last edited by: DOM107, |
|||
|
|
Member |
Extract from "4.07 Train Guidelines" :
"Shown below is a grid of random shapes with a variety of specular and glossiness values on them, using the Kuju material. For your train model, pick a combination that is appropriate: 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. |
|||
|
|
Member |
I'll have a look at glossiness vs specularity. I am still awaiting information from Kuju on various shader settings. Hopefully they will get back to me soon.
|
|||
|
|
Newcomer |
Hi Dom
Sorry should have made myself clearer The RGB values are the colour shade I use in the alpha channel that sets the amount of glossiness when using the TrainSpecEnvMask Shader. The reference to altering the spec, ambient and diffuse values are those that are listed in the GeoPcDx file after you have exported it into the sim. Within the GeoPcDx file there is a value attatched to each texture for each of these parameters... It is quick and easy to make wholesale changes by using RSTools and using the find and replace tool included.. In other words I edit textures outside of canvas which saves a lot of time exporting and running through the blueprint/Asset editor before you see results "in Game" Sly |
|||
|
|
Member |
Glossiness is detemined by the lightness of the alpha channel, so this would be difficult to implement in Canvas. I'd agree that changing the specular setting has very little effect in canvas. I was a bit surprised at first, as to how much I had to darken some of my textures. If you look at the kuju textures, though, they are very dark so I guess it must be corect. Cheers, Kevin |
|||
|
|
Member |
I realise that hacking a texture outside of canvas may be a little quicker, but I'm not sure I'd really advise it as a long term method. It's always better to do your mods as close to the source files as possible. Esp as it doesn't really take that long to do these things in the "correct" manner. Cheers, Kevin |
|||
|
|
Member |
I'll try your values.
I tried yesterday to copy lines (in red below) from a Kuju model GeoPcDx file (right column in the image) into my GeoPcDx file (left column). I used RS Tools 3.1.31: copy the liens (I tried 1 change at a time, save GeoPcDx with RS Tools, preview in Assets editor; at the last try, every lines marked in red were copied). ... I noticed no change in the Assets Editor after selecting the preview Preview. I have no idea what other values I could try (as far as I know, this part is undocumented). (the image shows the line regarding my TrainSpecEnvMask.fx texture) |
|||
|
|
Member |
From the Specular changes I made in 3DC, I can tell the impact on the GeoPcDX file:
<cHcEffectMaterialDx-cFloatParam d:id="441502520"> <Name d:type="cDeltaString">SPECULARPOWER</Name> <Value d:type="sFloat32" d:alt_encoding="000000403333EB3F" d:precision="string">0.8500</Value> </cHcEffectMaterialDx-cFloatParam> The value is 0.8500 when Specular is set to 85 in 3DC. The value is 0.1000 when Specular is set to 10. What's strange is that in BR101, the value is set to 6 (which would mean the impossible value of 600 in 3DC)! What is the role, in a GeoPcDX file, of CUSTOMPARAM0, AMBIENT, EMISSIVE? If I've time today I'll try some changes in the GeoPcDX file (though I had little success so far). This message has been edited. Last edited by: DOM107, |
|||
|
| Previous Topic | Next Topic | powered by eve community | Page 1 2 |
| Please Wait. Your request is being processed... |
|
3D Canvas Community
3D Canvas Discussion Forums
Rail Simulator
Feb18 update about TrainSpecEnvMask.fx (see p2)