Normal maps vs bump maps

Discussion related to the 'LuxBlend' Blender 2.4+ python exporter script.

Moderators: Ratow, SATtva, coordinators

Normal maps vs bump maps

Postby Lord Crc » Sat Oct 22, 2011 4:39 pm

Hi,

Abel had some good user feedback on using normal maps in LuxBlend25 today, so I though we could discuss it here.

The main issue was, the way I understood it, that in most other renderers, a normal map is handled differently from "bump mapping". Thus he expected to find a "normal map" slot in addition to the "bump mapping" slot.

After thinking a bit about it I think this is might actually be a very good idea, as it would elegantly solve some issues we currently have, primarily that if you use a normal map directly then the bump mapping scale isn't in meters but is a unitless scaling factor.

Thus I propose we add a separate "normal map" slot in addition to the standard "bump map" slot. The scale input should be unitless. If a material has both a bump map and a normal map assigned, then it should transparently export a multimix where the scaling factors are the weights, resulting in a 50/50 mix of the scaled maps. The user can then balance the effect of each map by adjusting the scaling factors.

The main issue is then if we can catch any errors so we can guide the user towards the correct usage. For example Abel said he expected to use a regular color image map and not a special texture type for his normal map. Would it be possible to catch this scenario during export, ie user assigned a color texture to the normal map slot, and issue a warning?
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4458
Joined: Sat Nov 17, 2007 2:10 pm

Re: Normal maps vs bump maps

Postby J the Ninja » Sat Oct 22, 2011 9:14 pm

Actually, what multi mix would do (and what I think is more useful anyway) is stack the textures on top of each other. This might actually be a pretty good idea. Maybe make the bump slot more like the displacement slot in the mesh panel too, just a texture slot instead of some weird option for a constant value.
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2210
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: Normal maps vs bump maps

Postby moure » Sun Oct 23, 2011 2:54 am

My two cents on this ;) Normal maps in every renderer ive come across "goes" into the bump slot, so instead of loading an imagemap, noise, or whatever, you load a normal map texture that takes an imagemap ones as input.
The normal map texture may include also some gain parameters, and the ability to choose what type of normal map is it.
Here is a shot of the standard 3dsmax normal map texture and the vray one.
Attachments
capture_3dsmax_vray_nm.JPG
Vray normal map texture
capture_3dsmax_vray_nm.JPG (18.86 KiB) Viewed 888 times
capture_3dsmax_nm.JPG
3ds Max Standard Normal map texture
capture_3dsmax_nm.JPG (26.48 KiB) Viewed 888 times
User avatar
moure
Developer
 
Posts: 411
Joined: Sun Sep 26, 2010 4:32 am
Location: Greece

Re: Normal maps vs bump maps

Postby Lord Crc » Sun Oct 23, 2011 4:03 am

J the Ninja wrote:Maybe make the bump slot more like the displacement slot in the mesh panel too, just a texture slot instead of some weird option for a constant value.


For the bump map, and normal map slot if implemented, I think we should have it the other way around if possible. Ie show a texture slot, and if it's assigned, show the scale value. Though that may require some voodoo in the Exporter Framework?

moure wrote:My two cents on this ;) Normal maps in every renderer ive come across "goes" into the bump slot, so instead of loading an imagemap, noise, or whatever, you load a normal map texture that takes an imagemap ones as input.


That's kinda like how it's currently implemented. We have a "bump map" slot on each material, and you can assign it a texture. The texture type can either be a noise or imagemap, in which case regular bump mapping is used, or it can be the new "normalmap" type, which takes, unsurprisingly, a normal map.

The upside with having two slots is that it would make it easier for the user to mix in some detail to a normal map, without having to manually set up a mix texture, and it would avoid the confusing display of units in the scale factor input in case you use normal maps, in which case displaying a unit is actually wrong.

edit: I see now that the standard max dialog has the "additional bump" slot, which is what my proposal would effectively introduce.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4458
Joined: Sat Nov 17, 2007 2:10 pm

Re: Normal maps vs bump maps

Postby jeanphi » Sun Oct 23, 2011 7:42 am

Hi,

I think I don't exactly understand your issue: normal maps don't have a scale, they define exactly the normal orientation, however bump maps define a change of elevation, so you really need to have it in measurement units. Mixing them is an entirely different issue, and defining what it means might be quite difficult, I'm not sure a mix would be appropriate. The only reasonable meaning would be some sort of additive process where you would add the bump on top of the normal map (or inversely), but that would require recomputing local shading surface coordinates to apply the second map.

Jeanphi
jeanphi
Developer
 
Posts: 6579
Joined: Mon Jan 14, 2008 7:21 am

Re: Normal maps vs bump maps

Postby Lord Crc » Sun Oct 23, 2011 10:54 am

jeanphi wrote:I think I don't exactly understand your issue: normal maps don't have a scale, they define exactly the normal orientation, however bump maps define a change of elevation, so you really need to have it in measurement units.


In the current UI, if you attach a normal map, then the "bump scale" input field should be set to 1, however due to the unit, it shows as "1 meter". I think this is confusing. The alternative would be to remove the unit from the scale field, but then we need to keep informing users that the unit is in meters when they use a regular bump map. Having two separate inputs avoids this confusion, I think.

jeanphi wrote:Mixing them is an entirely different issue, and defining what it means might be quite difficult, I'm not sure a mix would be appropriate. The only reasonable meaning would be some sort of additive process where you would add the bump on top of the normal map (or inversely), but that would require recomputing local shading surface coordinates to apply the second map.


Mixing would be just as if the height function f(u,v) is a composite: f(u, v) = w_1 * g(u, v) + w_2 * h(u, v). I think this is reasonable and sufficient?
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4458
Joined: Sat Nov 17, 2007 2:10 pm

Re: Normal maps vs bump maps

Postby Abel » Sun Oct 23, 2011 12:11 pm

Needless to say I would quite like to have both a normal map and a bump map, similar to the screenshot above. I must admit that this configuration is not nearly as common as I thought it was, but it would be useful regardless.

Like Jtheninja and jeanphi, I think it would be ideal if adding a bump map would not affect the strength of the normal map effect; it should just add to the normal map affect. That way one can first set up the normal map and when that is done add some bump detail according to taste (or vice versa).
User avatar
Abel
Developer
 
Posts: 1416
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

Re: Normal maps vs bump maps

Postby paco » Sun Oct 23, 2011 3:49 pm

I haven't really used normal maps, but if I was going to i'd expect to see something like LordCrc suggested:

1) Slot for the normalmap texture (no scale)
2) Slot for the bumpmap texture (with scale/height parameter)

As for applying them - I would have thought an additive process as jeanphi suggested - ie, first apply the normal map to get the shading geometry, then apply the bump map to that would work?
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Normal maps vs bump maps

Postby Lord Crc » Sun Oct 23, 2011 6:59 pm

paco wrote:As for applying them - I would have thought an additive process as jeanphi suggested - ie, first apply the normal map to get the shading geometry, then apply the bump map to that would work?


Why would you expect differently from combining a normal map and a height map, than combining two height maps?
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4458
Joined: Sat Nov 17, 2007 2:10 pm

Re: Normal maps vs bump maps

Postby jeanphi » Mon Oct 24, 2011 8:27 am

Hi,

Regarding the slots, I think that if the user uses a normal map, the scaling field should be completely removed instead of being set to 1.
Regarding the mixing issue, the issue I see is that the normal map defines an exact normal orientation, so you can't apply any kind of weight to it contrary to a bump map. But with a bump map you can already to the weighting with a mix texture on the bump data.

Jeanphi
jeanphi
Developer
 
Posts: 6579
Joined: Mon Jan 14, 2008 7:21 am

Next

Return to LuxBlend (Blender Exporter)

Who is online

Users browsing this forum: No registered users and 2 guests