Help with specularity!

Help with specularity!

Postby Aadit Jha » Wed Feb 07, 2018 6:42 am

Hi friends!
Recently I started modelling for Train Simulator and now I am working on to understand the procedures of how a model is made fully functional in the game itself.
So I made a simple cube to work on Specularity. I made a specular map as a channel for my diffuse texture for the cube and used the shader TrainSpecEnvMask.fx to understand how specularity and environment map works.
I put the value for UV arg1 or the phong size as I read somewhere(correct me if i'm wrong) to about 36!
However I made three different observations which I am going to demonstrate through photos below:
1
Untitled.png

The shine looks satisfying on the top of the cube seen from against the sun!
2
sd.png

But as I move further away from the cube it spreads out which I think should be ok but I don't know so I am asking you all whether this is the correct behaviour or not
3
w2.png

Now comes the problem! The face facing the sun shines brightly and so nothing can be seen other than the huge amount of white shine!
I don't want it to shine this way. I want every face to be a less shiny surface with shine just like or about the same as the first pic!
What shall I do and what am i doing wrong.
I can also post the pic of alpha channel if that needs some changing!


I am not very good at texturing right now.
Also what is an env mask?? a dummy texture replaced by the game or something else
Aadit Jha
General Shed Duties
 
Posts: 10
Images: 1
Joined: Wed Nov 29, 2017 12:52 pm
Has thanked: 2 times
Been thanked: 3 times

Re: Help with specularity!

Postby AndiS » Wed Feb 07, 2018 10:33 am

I never got to play with specularity but I can assure you that I lost some time with these sun-facing white sides.
I just some boring Train Environment shader and found my light blue cube white on one side.
My conclusion is that it is a feature, not a bug. They call it High Dynamic Rendering or so and it certainly makes the scene less dull but you would not be the first one to say that it can look overdone at times.

The way forward, maybe even intended by the game designers, is that you play with the day-and-time blueprint and make that interact with your cube in the right way. Of course, dumbing down the global lighting just for one cube is not the right way but maybe the light in the asset editor (?) is just too harsh.

Also, the lighting must still suit all the other objects. So the best way could be to place your cube in a few routes where you like the lighting and the way the scenery looks and judge things in these contexts.

At the end of the day, it is always an interaction between the lighting that is defined for the route and the shaders and textures of all the objects. Certainly not ideal in terms of object reuse, but on the other hand, it is a matter of fact that the light is not plain white in most cases, and not at its maximum power, unless it is a clear day in the Arctic or some dessert.

Of course, I could be all wrong and there is some parameter controlling the amount of brightening. Then I would be happy to hear about it.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Help with specularity!

Postby Aadit Jha » Wed Feb 07, 2018 12:57 pm

So it would be better if I put it in a route and test!? Got it!
Also what is a difference between the shader with and without the word mask in it!?
For example TrainBumpSpecEnv and ...EnvMask?? I dont see much difference in asset editor so just wanted to know!
Thanks
Aadit Jha
General Shed Duties
 
Posts: 10
Images: 1
Joined: Wed Nov 29, 2017 12:52 pm
Has thanked: 2 times
Been thanked: 3 times

Re: Help with specularity!

Postby AndiS » Wed Feb 07, 2018 1:56 pm

I must admit I lost track of those shaders. I vaguely remember that in one case two names mapped to the same, but no idea whether the case at hand is what I remember. If they take the same number of textures, they may well be the same.

I would just try it out by placing one cube for each shader in a route of your choice.

Further on the route (or scenario?) specific lighting, if you happen to own routes from different groups of creators, you might want to place an off-white cube in each route, take a screenshot and compare the colours in an image editing program (like Photoshop or Gimp). The differences are intended and they show you the limits of finding the one correct hue. But that is another story than controlling specularity.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Help with specularity!

Postby Aadit Jha » Wed Feb 07, 2018 4:10 pm

A somewhat weird thing happened to one of my objects! It looked okay in asset editor but on placing it through route editor the whole object went blue even when the object has all textures shown correctly in asset editor
Aadit Jha
General Shed Duties
 
Posts: 10
Images: 1
Joined: Wed Nov 29, 2017 12:52 pm
Has thanked: 2 times
Been thanked: 3 times

Re: Help with specularity!

Postby Aadit Jha » Wed Feb 07, 2018 4:17 pm

In Asset editor
TrainBumpSpecEnvMask 6.25 uv1.png

In Route editor
2.png

Also the cube looks flat with no shine at all or any signs of it in the route editor!
All I'm trying to do since past month is to get this model working but failing miserably at it! This is getting a bit frustrating :x :(
Aadit Jha
General Shed Duties
 
Posts: 10
Images: 1
Joined: Wed Nov 29, 2017 12:52 pm
Has thanked: 2 times
Been thanked: 3 times

Re: Help with specularity!

Postby Aadit Jha » Wed Feb 07, 2018 5:02 pm

Ok forget about the last error! The error was due to bad export of textures and i fixed it! The model came out quite good although I have to do more work on it!
ws.png

I have now learnt how to change the specular power and glossiness of the object in blender and can get a bit satisfying results!
Also I encountered a strange behaviour that sometimes the model disappears when i place it and click on play sometimes it does not!
This is the real life image of what i am working on
metro,junkyard-1_647_010616084638.jpg


Also is it possible to have a reflection somewhat similar to what the 'blue' colored model has in my previous reply!
I am also trying to get somewhat this kind of shine on the metal!
https://www.textures.com/download/subst ... hiny+metal

but all I am getting is these kind of pbr materials which cant be used in ts thanks to its old engine!
I guess that i need to tweak the specular map to get such results!

I would like to thank you for helping me out but I am quite worried given that my only help, one of my friend has now magically disappeared into thin air!
Aadit Jha
General Shed Duties
 
Posts: 10
Images: 1
Joined: Wed Nov 29, 2017 12:52 pm
Has thanked: 2 times
Been thanked: 3 times

Re: Help with specularity!

Postby sumitsingh » Wed Feb 07, 2018 6:06 pm

Check this thread.
http://railworksamerica.com/forum/viewt ... =9&t=12091
As far as concerned, keep experimenting with cube and various settings.
I also learned in the same way.
Last edited by sumitsingh on Mon Feb 12, 2018 11:20 pm, edited 3 times in total.
sumitsingh
Full Time Fireman
 
Posts: 79
Images: 0
Joined: Sat Oct 21, 2017 11:48 am
Has thanked: 52 times
Been thanked: 41 times

Re: Help with specularity!

Postby TrabantDeLuxe » Wed Feb 07, 2018 6:43 pm

Quick reply:

TS uses an ancient rendering engine, so lower the expectations. A lot. Investigate TrainUberShader, as it decouples the environmental cubemap from the specular. On PBR textures, you CAN use them! Albedo can still be used, roughness can be tweaked to produce env and spec masks, and also normals can still readily be used.

Specific to you last post:
1. Disappearing models indicate a messed up xForm. Reset it, and keep your fingers crossed.
2. Specular and environmental reflections are just very, very hard to get right. The old TS rendering engine is simply not up to par, even for it's day. Could you show us the textures? (diff, spec and others)

Couple of things I've noted about TS's shading that is just plain annoying:
  • Normal maps cannot have mirrored UV's. This is the bane of my existance.
  • The 'glossyness' or 'phong' is set through the materials UV argument - there are no gloss maps. Not to be confused with spec maps of course!
  • You do get cubemapped reflections, but I've never been able to actually use my own cubemaps. Seems to be impossible :roll: . There's a default blue-greenish one that you get and that's all.
TrabantDeLuxe
Passed Fireman
 
Posts: 247
Images: 7
Joined: Mon Mar 21, 2016 10:10 pm
Location: Delft, NL
Has thanked: 176 times
Been thanked: 263 times

Re: Help with specularity!

Postby sumitsingh » Wed Feb 07, 2018 6:59 pm

Also I encountered a strange behaviour that sometimes the model disappears when i place it and click on play sometimes it does not!


In Railworks, in the setting panel, the slider should be set to maximum density, in case the slider is not set to highest, assets disappers as per LOD configurations.
sumitsingh
Full Time Fireman
 
Posts: 79
Images: 0
Joined: Sat Oct 21, 2017 11:48 am
Has thanked: 52 times
Been thanked: 41 times

Next

Return to Rolling Stock General

Who is online

Users browsing this forum: No registered users and 2 guests