Reflective surfaces

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

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

The model attached shows different settings for the same geometry.
ButtonSpec_lightup.jpg (123.41 KiB) Viewed 8760 times
We start at the left with a geometry with just Diffuse lighting.
ButtonSpec_diffuse.jpg (107.71 KiB) Viewed 8760 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 (91.25 KiB) Viewed 8760 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 (107.81 KiB) Viewed 8760 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 (119.29 KiB) Viewed 8760 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 (127.48 KiB) Viewed 8760 times
Developer of LightUp

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

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.
(142.26 KiB) Downloaded 539 times
(1.19 MiB) Downloaded 629 times
Developer of LightUp

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.

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

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.
message of error
msg.png (61.66 KiB) Viewed 8640 times
This is the result.
ButtonSpec_lightup_png.png (774.05 KiB) Viewed 8640 times
Why ?
how can resolve ?

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