Bump and Shine Maps

Bump and Shine Maps

Postby Pauls » Tue Jun 24, 2014 3:04 pm

Hi,

Could someone help me out and clarify what I need to do to make a existing grey scale map to create smaller bumps and hollows ? - do I need to make the map lighter or darker or do I need to reduce the contrast between the shades of grey ?

To make a map give less of a glossy shine should it be lighter or darker ?

I will experiment with the above - I am just trying to save time.

The image below is for the SVR project - but it is too bumpy (Although I am happy with the window , door frame and crown detail the surface is too lumpy. The shine is also too glossy and deep........ (it's just a simple low poly model - I thought I would try and add detail with a bump map rather than my usual method of using a thousand polygons ! :)

Image

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: Bump and Shine Maps

Postby Pauls » Wed Jun 25, 2014 12:49 pm

Hi,

I've managed to control the bumps by changing the contrast and lightness/darkness - however I can't control the deep gloss shine for some reason - I've changed alpha channels from black to white in the main diffuse texture and vice-versa and it makes no difference - I even tried changing the alpha channel in the bump map texture - does anyone have any ideas what I could try next ?

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: Bump and Shine Maps

Postby AndiS » Wed Jun 25, 2014 1:29 pm

Isn't the shine controlled by a third texture? That would be greyscale with non-transparent alpha (or no alpha layer, if that is ok with the data format).
(Not that I know these things, I just seem to remember or guess.)
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Bump and Shine Maps

Postby Pauls » Wed Jun 25, 2014 2:48 pm

AndiS wrote:Isn't the shine controlled by a third texture? That would be greyscale with non-transparent alpha (or no alpha layer, if that is ok with the data format).
(Not that I know these things, I just seem to remember or guess.)


Hi Andi,

I think the third texture is just a dummy environmental texture ? - In case it wasn't I tried changing the main and alpha layers between black and white to see what happened.

I also made sure I cleared the RW cache each time - I also noticed that despite ticking Cast Shadows in the Blueprint Editor that there weren't any shadows being cast in RW even though other items were doing so.

I'm using TrainBumpSpecEnv.fx in 3D Studio Max.

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: Bump and Shine Maps

Postby AndiS » Wed Jun 25, 2014 5:04 pm

A bit of googling brings up two bits:
1) The alpha channel in the third texture controls the gloss, white is full, black is none.
http://railworksamerica.com/forum/viewt ... 17&t=11269

2) The second is not a greyscale as I described it but a normal map. That is a texture where the three channels RGB define the normal vector for each pixel in the texture. There are three ways to obtain such a map.
a) Make a model of all the details and bake the normals. Like texture baking, but produces a normal map. Blender does it, no idea about other programs.
b) Some programs like Gimp and Photoshop seem to have some options to produce a normal map directly in 2D via some embossing filter or whatever.
c) Some people mix up a bunch of noise patterns, treating the normal map more or less like a standard image. E.g., if you know that the red channel is the up coordinate (I have no idea), adding red to the image turns the normal up.

This second find is also supported by some shader table that seems mesh-up of shader descriptions found in the Railworks folder over time. It says for TrainBumpSpecEnv.fx:
Textured, normal mapped, environment map and specular.
Texture 1: RGB Diffuse
Texture 2: RGB Normal map
Texture 3: Cubic environment

No idea about cubic environment, though, but it says normal map which is not the greyscale stuff I was talking about.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Bump and Shine Maps

Postby Pauls » Wed Jun 25, 2014 10:42 pm

Hi Andi,

Dave Dewhurst on UKTS Forum suggested I just change to TrainBumpSpecEnvMask.fx which worked after I remembered to set all three UV Map Channels to 1 ! :roll: :lol:

Slot 1:- Diffuse map plus alpha channel controls reflection/shine
Slot 2:- Bump Map
Slot 3:- Dummy environmental map

Thanks for all of the above info - it helped me refine the textures. I aso added the technique to the lamp post - thatrust is really breaking through the paintwork now ! :)

Image

Image

No shadows are cast though despite selecting Casts Shadows in the Blueprint Editor ??

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: Bump and Shine Maps

Postby Nobkins » Wed Jun 25, 2014 11:50 pm

Very nice rust effect. Well done.
TrainSimDev.com YouTube Channel
Video tutorials and other resources
User avatar
Nobkins
Site Admin
 
Posts: 547
Images: 3164
Joined: Wed Feb 05, 2014 12:24 am
Has thanked: 325 times
Been thanked: 185 times

Re: Bump and Shine Maps

Postby Pauls » Thu Jun 26, 2014 12:12 am

I deleted the objects in the RW World Editor and placed them again and the shadows appeared ! - strange solution ?

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: Bump and Shine Maps

Postby irishrailguy » Fri Oct 31, 2014 10:55 pm

Just for clarification on what's going on here:

-Using TrainBumpSpecEnvMask.fx is essential here as the clue is in the name: Mask. This means the shader supports greyscale reflectivity represented in a map which is placed in the alpha channel of the texture you're using.
-Specular/Shine unfortunately has it's limitations in this game engine, as it's data is also taken from the same alpha channel. So it gets pretty awkward when it comes to balancing the reflectivity and the shine in-game. If you want to reduce the amount of glossyness on the texture but want to keep the same level of specular, you'll have to darken the alpha and then increase the specular level in your 3d package.
-Shadows should cast automatically in the game, but check that the Z-Buffer setting in the material editor of your package is set to 'None' to avoid issues with lighting. However as with your case I think it's just a game cache issue, sometimes if you don't force a cache clear by deleting things the old data may still be used.

Hope that clears things up a bit.

Kevin
irishrailguy
Fit for Firing Duties
 
Posts: 47
Joined: Sun Apr 06, 2014 12:01 pm
Location: Dublin
Has thanked: 8 times
Been thanked: 14 times

Re: Bump and Shine Maps

Postby Caliban » Sat Nov 01, 2014 12:13 am

TrainUberShader does all sorts of somewhat interesting things - including seperating specular and environment reflections - but it looks a bit of a nightmare to tune :p hand-made bumpmaps ( normal maps more properly ) are *not* greyscale - the *source* to one is greyscale which you feed into the normal map converter. Well I guess you could actually construct a finished one by hand but I've never seen anyone do that.

Phong is also a control of shininess somewhat, and that is a seperate value too. "Spec" in the shaders is really reflectiveness - the level of reflected environment *shoud* go up with the shininess value from the alpha channel, that's the point of it! If you want to make a surface a bit softer then play with the phong tightness - wider phong will produce more diffuse ( and so softer ) reflections.
Caliban
General Shed Duties
 
Posts: 20
Joined: Wed Sep 17, 2014 3:26 am
Has thanked: 1 time
Been thanked: 7 times

Next

Return to 3D Objects General

Who is online

Users browsing this forum: No registered users and 2 guests

cron