[Bf-committers] Eeshlo's parallax mapping patch

Martin Poirier theeth at yahoo.com
Thu Dec 16 04:26:21 CET 2004


Hey guys!

Eeshlo just sent me his parallax mapping patch so that
I can host it and drop it in here, so here goes:

http://www.clubinfo.bdeb.qc.ca/~theeth/Temp/eeshlo_prlxpatch.zip

And his explanations:

--------------

Here is the patch, you post it on the mailing list if
you want to, I won't have the time, and then maybe it
can just about make it for the next release. The patch
itself is very very simple, only 6 lines of actual
code. It replaces the current 'warp' code.
As I said in the thread, I experimented with this when
it was first posted on the OGL forums a year ago, but
to me it didn't seem to be all that useful. But for
some reason I keep misjudging what others might find
useful, so I thought I might as well submit the patch
now since it came up several times now recently.
The blendfile is also very simple, it is just a plane
using the 'rockwall' textures from the original demo,
the effect can be subtle, but if you do a comparison
render using the j-key to swap buffers, one without
and one with warping, you will see that the bricks
'jump out' of the texture. It is most obvious when
animated, it is setup for a short 150 frame rotation
of the plane. Even when disabling the normalmap you
will see that you can still 'look around' the bricks
in the texture when animated.
If you render and compare it with Ton's warp code, you
will see that it is quite different, in which case you
will have to set the warp factor a lot lower to get
something similar, around 0.025 or ever lower, and
also without the parallax effect.
The order of the textures is important, which is
another reason why I included the blendfile.
The reason I thought it was not all that useful, is
that it doesn't work for all cases, smooth
height/normalmaps like the ones from the original
demo, work best. It is definitly not a replacement for
real displacement mapping, it is only a very rough
approximation.

----------------------

So hopefully someone will look at this attentively
(pokes Ton).

regards,
Martin


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 


More information about the Bf-committers mailing list