sidebar features
sidebar content

Go Back   Blender Artists Forums > Game Engine > Game Engine Resources

Reply
 
Thread Tools
greatrel greatrel is offline
Member
 
Join Date: May 2009
Posts: 9
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.



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

Last edited by greatrel; 12-May-09 at 13:25. Reason: bmp to jpg
#1   Old 11-May-09, 21:31   
Reply With Quote


blaize's Avatar
blaize blaize is offline
Member
 
Join Date: May 2007
Location: Netherlands
Posts: 376
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!
#2   Old 12-May-09, 10:45   
Reply With Quote
psychotron's Avatar
psychotron psychotron is offline
Member
 
Join Date: Jul 2007
Posts: 229
wow.. is really nice to see this in BGE too many thanks
I don't get why there isn't any celebrations in thread yet

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?
#3   Old 12-May-09, 12:00   
Reply With Quote
SamCameron SamCameron is offline
Member
 
Join Date: Apr 2008
Posts: 336
looks great, I wish the developers add this feature in BGE by C instead of python scripting.
#4   Old 12-May-09, 12:31   
Reply With Quote
AD-Edge's Avatar
AD-Edge AD-Edge is offline
Member
 
Join Date: Apr 2006
Location: South Australia, Adelaide Hills
Posts: 1,734
Quote:
Originally Posted by psychotron View Post
I don't get why there isn't any celebrations in thread yet
Well this has been around for a while:
http://blender-archi.tuxfamily.org/E...in_game_engine
http://blenderartists.org/forum/show....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.
............................................
AD-Edge@hotmail.com
YouTube Channel

--The Future is Fusion--
-Focus To Achieve-
#5   Old 12-May-09, 13:15   
Reply With Quote
psychotron's Avatar
psychotron psychotron is offline
Member
 
Join Date: Jul 2007
Posts: 229
as it's stated in topic - steep parallax mapping

I hope it stands for selfshadowing which common parallax mapping can't do
#6   Old 12-May-09, 13:27   
Reply With Quote
AD-Edge's Avatar
AD-Edge AD-Edge is offline
Member
 
Join Date: Apr 2006
Location: South Australia, Adelaide Hills
Posts: 1,734
Quote:
Originally Posted by psychotron View Post
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....
............................................
AD-Edge@hotmail.com
YouTube Channel

--The Future is Fusion--
-Focus To Achieve-
#7   Old 12-May-09, 13:33   
Reply With Quote
greatrel greatrel is offline
Member
 
Join Date: May 2009
Posts: 9
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.
#8   Old 12-May-09, 13:49   
Reply With Quote
John_tgh John_tgh is offline
Member
 
Join Date: Dec 2008
Location: New Atlantis
Posts: 203
Thanks a lot for taking the time to make this 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
#9   Old 12-May-09, 14:03   
Reply With Quote
Sim88 Sim88 is offline
Member
 
Join Date: Aug 2006
Posts: 1,504
That is hardcore!
#10   Old 12-May-09, 15:14   
Reply With Quote
psychotron's Avatar
psychotron psychotron is offline
Member
 
Join Date: Jul 2007
Posts: 229
Quote:
Originally Posted by AD-Edge View Post
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....
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/S...ax/compare.jpg
#11   Old 12-May-09, 15:33   
Reply With Quote
kay_Eva kay_Eva is offline
Member
 
Join Date: Jun 2008
Posts: 1,197
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.
#12   Old 12-May-09, 17:04   
Reply With Quote
John_tgh John_tgh is offline
Member
 
Join Date: Dec 2008
Location: New Atlantis
Posts: 203
damn forgot about the shadow part XD It's wicked for faces :P
#13   Old 12-May-09, 19:11   
Reply With Quote
kay_Eva kay_Eva is offline
Member
 
Join Date: Jun 2008
Posts: 1,197
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.
#14   Old 12-May-09, 19:19   
Reply With Quote
bgm bgm is offline
Member
 
Join Date: Apr 2009
Posts: 3
Well, http://jerome.jouvie.free.fr/OpenGl/...ts/Shaders.php , shows some optimization and comparison between steep, relief and iterative PM.

Hope, it helps.
#15   Old 12-May-09, 20:06   
Reply With Quote
greatrel greatrel is offline
Member
 
Join Date: May 2009
Posts: 9
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
#16   Old 12-May-09, 21:15   
Reply With Quote
Cloud_GL's Avatar
Cloud_GL Cloud_GL is offline
Member
 
Join Date: Sep 2007
Location: Viņa del Mar, Chile
Posts: 786
Yeah using well parallax and step isn't as easy as it sound, but it's pretty cool anyways! Thanks for sharing!
#17   Old 12-May-09, 23:15   
Reply With Quote
John_tgh John_tgh is offline
Member
 
Join Date: Dec 2008
Location: New Atlantis
Posts: 203
Ok that's it! Parallax is history steep parallax not so much XD Woot! Keep at it man!
#18   Old 13-May-09, 01:35   
Reply With Quote
gomer's Avatar
gomer gomer is offline
Member
 
Join Date: Dec 2004
Location: canada
Posts: 458
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.
............................................
Nanoshooter
#19   Old 13-May-09, 04:29   
Reply With Quote
kay_Eva kay_Eva is offline
Member
 
Join Date: Jun 2008
Posts: 1,197
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.
#20   Old 13-May-09, 12:35   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 19:17.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists