Steep Parallax Mapping in BGE

Steep Parallax Mapping

Shader that uses a texture, bump map, and height map to make a 3D image off of a plane.

Implemented with direction from Twilight 22 (Entertainment Arts Research). Thanks to MatrixNAN for guidance on this shader.

http://www.prism.gatech.edu/%7Egtg455r/steepparallaxmapping.JPG

Blend file download links:
Mirror 1
Mirror 2

You can move the camera with mouse and WASD. You can move light as well.

Light Controls:
UP DOWN moves on Z axis
LEFT RIGHT moves on X axis
PAGEUP PAGEDOWN moves on Y axis

Enjoy :cool:

You should really convert that to jpg instead of an almost 1,7 MB BMP.
results look good though, i might check it out when i get home.
thanks!

wow… is really nice to see this in BGE too :smiley: many thanks
I don’t get why there isn’t any celebrations in thread yet :confused:

is it working properly with more lights in scene than just one? if I add another one it still seems to be shadowed from only one light…

is there any chance to have it integrated into some texture options or into pyNode to use with new texture nodes in 2.49?

looks great, I wish the developers add this feature in BGE by C instead of python scripting.

Well this has been around for a while:
http://blender-archi.tuxfamily.org/Easy_use_of_GLSL_shaders_in_game_engine
http://blenderartists.org/forum/showthread.php?p=1226007

As for that demo I’m not entirely impressed, there’s one plane, the rock wall at the bottom right which is really nice. Similar to the one in the graphics demo package which has been around since before the dinosaurs.

But apart from that, the rest aren’t that flash (I realize some are showing single maps) The one featured in this threads screenshot is really grainy up close and mashed, and doesnt really look 3D at all, from any angle. It looks more like a hovering plane, and the lack of BGE AntiAnilising makes it look even worse.

Sorry if that was harsh, but it just doesnt quite cut it for me :(, looks like more work is needed at this point.

as it’s stated in topic - steep parallax mapping

I hope it stands for selfshadowing which common parallax mapping can’t do

Well I’d like an explanation of what exactly makes it different to the normal parallax mapping we’ve seen previously, which to be honest looks better anyway…

JPGed it. Thanks, didn’t see how big that was, haha.

Light positioning is coded into the python script, demo implemented with single (first) light source.

Plan is to code this into BGE with C eventually =)

Critiques are good, there are advantage and disadvantage for each shader technique for sure. The bottom right wall is in fact made with the scripts from the link you provided. The steep parallax has good performance in sacrifice for that quality. Hopefully a different mapping technique will come soon from me that strikes the middle ground between performance and quality.

Thanks a lot for taking the time to make this :smiley: For now I see some use for this but it doesn’t quite cut it when making close up shots and such. Works perfect for grass though :wink:

That is hardcore!

steep p.m. can do selfocclusion and selfshadowing of geometry created from height texture (now comes to my mind if spm would work fine with ssao filter too)

http://graphics.cs.brown.edu/games/SteepParallax/compare.jpg

Looks very good! Thank you!!

I think I’ll use it primarily for terrain and floor - from my experience that’s what steep is best at.

damn forgot about the shadow part XD It’s wicked for faces :stuck_out_tongue:

Yes steep isn’t practical to replace normal maps; most of the time normal maps are more desirable, sometimes you’ll use parallax for bricks and stuff, then occasionally, you can really make a nice impact with selectively placing in steep. It also takes a lot of tinkering to get any kind of parallax to look good anyway when making the displacment you’ve got to be spot on with it or it will look weird ^^ I should know.

So I feel like steep is perfect for rocks and stuff, basically for things that won’t be rotating around too much on every axis.

Well, http://jerome.jouvie.free.fr/OpenGl/Projects/Shaders.php , shows some optimization and comparison between steep, relief and iterative PM.

Hope, it helps.

Thanks for the comments. Here’s a small variation of the program (edited one line). The difference is that when the textures might blur because of the height adjustment, the texture just flattens out instead. Might be a little more useful =) I think it looks slightly less 3D for a lot more clarity.

BTW, if the shadows are bothering, just add a selfShadow = 1 line on line 148.

You can get it here:
Mirror 1
Mirror 2

Yeah using well parallax and step isn’t as easy as it sound, but it’s pretty cool anyways! Thanks for sharing!

Ok that’s it! Parallax is history steep parallax not so much XD Woot! Keep at it man!

Appears to work great on my computer, the wall on the left doesn’t look very good, but the rock wall on the right is amazing. Good work, hope this gets implemented as a texture option of some sort in glsl.

I went over it and I think personally I prefer the first version of the script. I think the only reason the lion wall as oppossed to the purely brick wall looks kind of odd is that it’s simply too much detail that it’s trying to portray. I think that with the displacment maps they work much better with more basic, cleary defined contrast. Because the brick wall looks fantastic while the lion looks just a little off.

Personally I’ve never seen a steep parallax with so much detail on it as that lion in an actual game. Usually the detail level is left to equal about the same amount as the bricks.

In other words I didn’t think there was anything wrong with the first script is what I’m saying. :cool: