Parallax Mapping with Nodes in Realtime

Mokazon writes:

Hey guys,

I've been working hard on making a way to achieve parallax mapping without using a GLSL shader. Shaders can run slow on older computers, and also some graphics cards dont support them.

I have attempted to do this effect with nodes, and i'm rather happy with the result. I have decided to share the file with you guys so that everyone can use this resource and improve the BGE games.

Features:

  • 10 Layers for extra realism
  • Self shadowing
  • Many options for advanced customization

How it works (in a nutshell) is this: You subtract the Normal output from the UV output of a Geometry node with a math node. That plugs into the vector input of your texture which is then plugged into a mix node. You also plug in a the same texture, although with UV vector, into the lower input of the mix node. Now add another texture node, with the UV output of the Geometry node plugged into the vector input of your texture. On this texture, you will need to put in your parallax/displacement map. The color output of this will plug into the factor input button of the mix node (the gray one on the top). Finally, the mix node outputs into the Output node. I have gone even more detailed and added 10 layers of this to make it look more 3d. I hope all this makes sense.

Here is a video demo to see what it is:

Download here:

http://dl.dropbox.com/u/1860288/ParallaxWithNodes.blend

If you have any questions regarding how it works, or how to customize it, please email me at [email protected]

Thanks!

-Mokazon

Advertisement