LuxRender 0.9dev – Normal Mapping Support

Thanks to the great efforts of LordCrc, the development builds of LuxRender now have Normal mapping support.

It can be accessed by defining a luxrender texture type as a normal map in the luxblend25 exporter. Once defined like this, it is used in the  bump map slot and… bam… awesome happens.

What does this mean? Well as far as I understand, a normal map is used in a similar way as a bump map and give the appearence of a highly structured surface that is intact flat or low poly. So you might ask… so what is different?

The best way I think I can understand it in terms of lux is that, a bump map represents a height field, and lux determines the normal of the surface based on that. However, the normal map, gives the normal as a colour vector. So in a round about way, they are identical but from different starting points. Normal maps are also relative in height, rather than absolute, this  changes how you manipulate them in lux. Typically you bake the depth into the map, and set the height to 1, the height cannot be set any higher than that, though can be reduced if needed.

The other nice thing is that it is handled by the bump map code and such, makes it possible to apply both a bump map and a normal map to an object via a mix texture in the way you would expect, where the normal map is relative and the bump map is absolute.

However from my own experience playing with normal maps and lux, normal maps appear to give an altogether more appealing appearance, and are a little easier to manipulate than bump maps. This i think is more to do with image manipulation when generating the normal map, over that of forming a height map. This is possibly due to the heavy use of Normal maps in game engines, and so the software is setup to produce the results you want as normal maps, more than displacement maps.

I made a simple scene with two cubes, both are uv unwrapped and have a simple cloud texture, with a luxrender logo set on a white boarder. Here i want the luxrender logo to be raised on a flat panel, and then the text stamped into the cube.

The first thing you will notice is the softness of the normal map, and yet, it still achieve a good effect of depth, (right). The bump mapped cube is a lot rougher and doesn’t quite give the same effect of depth. Again, I think this is more to do with generating the normal map than anything else.

Here i used GIMP to make the height map texture, and then CrazyBump to make the Normal map.

In this next example, both cubes have normal maps with exactly the same properties, however, in this case, generated by GIMP with a hight of 10. You can see a big big difference, and goes to prove what i said that the difference in the two is most likely image manipulation over actual different treatment in lux.

Here we still have a smooth surface, and the logo is far less pronounced.

Running the same map at a hight of 30 in GIMP gives me this,

As expected, the surface is rougher, and the height of the luxrender logo is all together deeper.

The next example is the same map as above, put into Crazy bump with some settings changed, it is by doing this text that i see that CrazyBump likes to produce rather blurry normal maps with exaggerated depth. This isn’t totally a bad thing, it all depends what you want to do.
Here is the result,
 The most obvious part of this is that the luxrender logo is more visible, but is softer.

Next – i did some blurring and re-toning in GIMP, I can’t give instructions exactly how i did this as it did just involve two layers and a bit of blurring, simple as that. I then used the 9×9 filter in GIMP and generated a normal map,

The nice thing here is that the text and logo are well defined, and the map isn’t too sharp, it I might have got it just how i want it… however it is still a little too intense, so lets reduce the normal map hight a little bit in luxblend.

Looks good.

I think in the end it is all about playing with the tools to make them do what you want, there is no magic combination, however still think using normal maps rather than bump maps is a very powerful tool and a welcome addition to the features 😀

The ground was produced by manipulating a high resolution plasma map generated in GIMP using crazy bump. As you can see, close up, it looks fairly poor, however at distance it looks quite impressive. Once again, i have NEVER achieved this kind of effect using a bump map. Maybe this is my own poor ability at generating height maps, either way its nice to see the enhancements

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to LuxRender 0.9dev – Normal Mapping Support

  1. PABLO says:

    EXLENTE! 😀

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s