Reflective surfaces

Explanations, Walk through, tips and techniques related to LightUp
Post Reply
User avatar
AdamB
Site Admin
Posts: 2294
Joined: Wed Apr 16, 2008 10:11 am
Location: Brighton, UK
Contact:

Reflective surfaces

Post by AdamB » Thu Aug 27, 2009 9:31 am

The final color of a surface is a combination of Diffuse and Specular. The latter is view dependent and is calculated in realtime during Tourtool. A useful tip is to open the Material Editor in Tourtool and reduce the Material Color to Black (0,0,0) which will then show just the contribution of Specular. By default materials have no specular component so this will result in a Black
surface.

The model attached shows different settings for the same geometry.
ButtonSpec_lightup.jpg
ButtonSpec_lightup.jpg (123.41 KiB) Viewed 7894 times
We start at the left with a geometry with just Diffuse lighting.
ButtonSpec_diffuse.jpg
ButtonSpec_diffuse.jpg (107.71 KiB) Viewed 7894 times
By making the Diffuse Color Black we can just watch just the specular component which we can set by typing in a value in the Specular inputbox to set a constant Specular value for a material making it more or less shiny.
ButtonSpec_constant_specular.jpg
ButtonSpec_constant_specular.jpg (91.25 KiB) Viewed 7894 times
This is fine but a material with a texture may be more reflective in some parts than others. For example the grain of wood may reflect more in some parts than another. LightUp allows you to give a Specular Map which matches 1:1 with the material texture you're using so you can control for each pixel how reflective the material will be. The specular map is a grayscale map/ texture which controls how much reflectivity at each pixel. The geometry is still like a smooth mirror but reflects more or less over its surface.
ButtonSpec_specular_map.jpg
ButtonSpec_specular_map.jpg (107.81 KiB) Viewed 7894 times

Next we can perturb the surface by introducing Bump mapping to add imperfections into the reflection that matchup naturally with the underlying texture giving a greater sense of realism.
ButtonSpec_specular_map_bump_map.jpg
ButtonSpec_specular_map_bump_map.jpg (119.29 KiB) Viewed 7894 times
And lastly we can turn back the Diffuse Color to White (1,1,1) to see the combination of Diffuse and Specular:
ButtonSpec_diffuse_map_specular_map_bump_map.jpg
ButtonSpec_diffuse_map_specular_map_bump_map.jpg (127.48 KiB) Viewed 7894 times
Developer of LightUp http://www.light-up.co.uk

User avatar
AdamB
Site Admin
Posts: 2294
Joined: Wed Apr 16, 2008 10:11 am
Location: Brighton, UK
Contact:

Re: Reflective surfaces

Post by AdamB » Thu Aug 27, 2009 9:35 am

And here is the skp model that was used... You'll need to set the skybox to a local skybox you want to use.
Attachments
concrete.tga.zip
(142.26 KiB) Downloaded 510 times
ButtonSpec.skp.zip
(1.19 MiB) Downloaded 590 times
Developer of LightUp http://www.light-up.co.uk

sepo
Posts: 57
Joined: Fri Feb 13, 2009 10:51 am

Re: Reflective surfaces

Post by sepo » Thu Aug 27, 2009 11:46 am

Very good Adam. This will help a lot of people to understand mat editor better.

crs
Posts: 56
Joined: Tue Jul 07, 2009 1:44 pm

Re: Reflective surfaces

Post by crs » Sat Sep 12, 2009 3:03 pm

This is great. Thank you it really helps and a point of reference when we need it
Cheers
C

flyman
Posts: 1
Joined: Wed Dec 09, 2009 11:50 am

Re: Reflective surfaces

Post by flyman » Wed Dec 09, 2009 4:33 pm

hi all
first sorry for my bad english. I tried light-up for purchase.
But the result of reflection is not correct and when open the file i receive one msg
of error.
msg.png
message of error
msg.png (61.66 KiB) Viewed 7774 times
This is the result.
ButtonSpec_lightup_png.png
ButtonSpec_lightup_png.png (774.05 KiB) Viewed 7774 times
Why ?
how can resolve ?
thanks
Flyman

multid
Posts: 6
Joined: Tue Mar 09, 2010 12:16 am

Re: Reflective surfaces

Post by multid » Mon Jul 05, 2010 10:05 am

Well, nothing like knowing your color numbers. Nice one Adam, you have a way of putting things so succinctly.That just taught me loads and I use LightUp nearly everyday but keep getting more from the basics. So simple, create a black material... Still don't really get Fresnel but sure use it a lot. That's why LightUp is so cool, cos you never know what you're going to do next let alone how you did it.
So much info in there..


PS where's the basic documentation or anything by You on creating Sky boxes

Post Reply