When Alternativa3D showed some demos with their parallax mapping, I always thought it’d be interesting to try it myself without having to resort to PixelBender.
Well, I did, and I wasn’t happy how some things turned out. There was no overlap of objects, and sharp edges would come out looking odd or distorted. Then, taking another look at their demo, I noticed they conveniently used slanted or smooth edges all the time without any possible overlap.
Reading up on some stuff, I decided to make the process iteratable, and liked it much better already. There are some downsides… Most importantly, it’s a cpu-killer and still pretty flawed compared to the real thing (which is a pixel shader). Nonetheless, it was fun to figure out and code, and that’s pretty much the reason why I decided to post it ;)
Oh, and I also rewrote the Bump Map from some time ago, since I needed it to make this demo a bit cooler overall. The code back then was a quick experiment; not exactly a beauty nor reusable whatsoever, which has been taken care of to some extent. Additionally, the lightmaps now support colours and you could just as well write your own.
Check out the demo here and the source here. The images used came from here.
No idea what you’re going on about but it looks spectacular!
WOW, really impressive!
Love it! Why not include some fancy web-cam motion detection to insist on the holographic effect? You know, user moves his head to the right and left to see things differently etc.
Keep up the great stuff :-)
My Q6600 2.4GHz CPU had busy ~42% (firefox.exe)
Bump is similar to http://blog.alternativaplatform.com/ru/files/2007/12/spotnormalmapping.swf , but alternativa is more functionality – have ~15-30% (firefox.exe)
That’s actually not a bad idea, stephane ;)
Foreground: As mentioned in the post, it is quite intensive indeed, because of the parallax effect which is iterated. A single-iteration version is already much faster – especially if it’s done with a filter instead of BitmapData.applyFilter (not an option tho because of the iteration). But in any case, if you leave out the parallax effect and use the bump mapping only, you’ll see it’ll run much faster as well (showing the bump mapping, however, wasn’t the point of this post – it just makes the parallax effect more efficient because of added lighting).
Oh – http://blog.alternativaplatform.com/en/2007/12/27/parallax-mapping/ not seen .. my CPU have 0-68% (firefox.exe) your parallax is faster 8o) But alternativa have more functionality in demo. And I saw they post in his blog another demo with girl face, may be it has later date and other performance.
I’d hope their newer version is faster, since (as far as I can tell) theirs a single-pass algorithm :D
How come you didn’t do it with Pixel Bender instead?
Hi Mr.doob :) I actually wanted to try out a version that would run on FP9 (that, and it was easier to do it using the DisplacementMapFilter to get a grip on the concept). I’ve been working on a Pixel Bender version tho, but I can’t get it just right… The pixel-perfect way of doing Parallax Mapping that can handle steep slopes apparently requires a conditional loop, but I hope I can somehow approximate the effect with hard-coded iterations :)
Ah! I see I see :D We’ll have to wait for Joa’s hack then.
http://blog.joa-ebert.com/2008/09/08/pixelbender-runtime-compilation/
Hehe yeah, I’ve been looking forward to that as well, but nearly forgot about it! I guess it’s a good way to test my patience ;)
Pingback: Parallax Mapping with Pixel Bender (still burning cpu’s) | Der Schmale - David Lenaerts's blog
Thank you!Your site is very nice
==
http://www.linkedin.com/in/paulandredevera
Good work! Thank you!
I always wanted to write in my blog something like that. Can I take part of your post to my blog?
Of course, I will add backlink?
Sincerely, Timur Alhimenkov
Sure Timur, feel free :)
guess i shouldve found your blog some while ago, very cool stuff!
hi, how can i do to use other lightmap, any like ambient lighting or something? not phong.
Great work!!!