Relief Mapping

Ah! Ok, I hadn’t got the latest build yet, thought I was being dumb, but hey, it’s still progress!! Hope you nail that soon.

Edit: Official 2.48a build… will this work faster with a new build?

It should on the optimized build I made,
http://graphicall.org/builds/builds/showbuild.php?action=show&id=965
thought I don´t think it will on a unoptimized build.
Haven´t really tried thought and www.blender.org seems to be down at the moment so I can´t really try to download 2.49 RC2 and compare.

hope this helps

It works perfectly for me, except for the SSAO :frowning: Maybe because I use ATI Graphics card :frowning:

can’t believe my eyes :smiley:
first steep parallax mapping, then tweaked common parallax… then great iterative parallax mapping and now you brings relief mapping to blender… hats off :smiley:
thank you

results here are beatiful, sometimes I see dotted lines too (onboard nvidia 9400 here)
but when I press 1 it shows me only SSAO without textures… where can be problem?

would it work properly with more lights than just one?
you didn’t need grayscale height map for this relief mapping? all is done only from one normal map?? :confused:
(edit: oh I see… height map is in alpha channel of normalmap image)

anyway great job as always :spin:

I hope your relief mapping and greatrel’s iterative parallax mapping would be hardcoded to blender for easy of use and tuning parameters

Hey ,
Yes SSAO is there added without textures. It is there just for experimentation…

Well technically it should work with multiple lights, but it could significantly slow down the shader, as it has to calculate normals, depth, UVmap and shadows from each of the lights.

ah more lights less performance… ok
so what is common usage then? you never have scene lit only by one light…
hmm but you have always one main light - can you then somehow specify which light from scene be taken to compute relief map?

If this was hardcoded into Blender to be available for artists use in the Blender Internal Renderer then you won’t need it to be realtime as BI isn’t a realtime engine.

It may be too slow for use in games with a complex setup but it would be great for the renderer.

OMG!

I remember reading a paper on this about a year ago and said that its likely to be in games in about 3 years LOL

I think its amazing that all this work is being done on the BGE Its just Nutz.

I used to think the future of the BGE was a bit questionable “pre apricot”, but now I think the Sky’s the Limit! I just wish I had something like this when I was kid!

I remember buying a game starter kit book when i was a kid and it just recommended loads of expensive software and then whent on about programing in Direct X, total waist of time!

I just wish I had something like this when I was kid!
Seconded!!!

I apologize beforehand for my ignorance but can I humbly ask what is the difference between relief mapping and displacement mapping?

relief (also parallax) mapping is virtual displacement in realtime engines

I thought this was kind of funny. Thanks guys. It’s true too.

Is it called a Vistabar? s start menu? Whatever I don’t pay much attention to the name of it :cool:

Attachments


Works great on my Imac, with an ATI card. This shader seems perfect Martinsh, good job.

I tested your file extensively and found several bugs for you to fix. :evilgrin:

First is the thing with the odd lines. I noticed that thy follow edges. No edges, no lines.

Second, your script hates triangles! I think this might be related to the edge problem.
Image:
http://i203.photobucket.com/albums/aa280/SupComlaze/ReliefMapingTriangleProblem.jpg

Third, at UV splits in curved objects you can make the object appear to tear.
Image:

Fourth, In certain situations the top is “cut” off.
Image:

Fifth, you said it should work with multiple lights, whether you were talking about the script or the implementation I am not sure, but it does not work in your .blend (uses the last light created).

Also, in your scene if all layers with objects in them are not selected the script does not work and if an object is deleted your script does not work.

Thank you for all your amazing work and hope this helps!

Common usage? …actually i have never seen any game or anything using relief mapping… :smiley:
Well ill add few lights to shader, see how it will behave.
Also the shader uses camera and object`s normals to specify relief map. It works really well also without lighting at all.

Im not really sure how to get GLSL working with Internal Renderer… as i am not familiar with raytracing rendering… actually im not a coder either, im just an artist who learns GLSL :D, so i cant really help with hardcoding stuff inside Blender. But i totally agree about creating shaders like these to be more artist friendly.
I believe the easiest way - to be available to do stuff with nodes, like for Internal Renderer. Not sure how to deal with Vertex shader though…

displacement mapping uses actual geometry to do the displacement, relief and parallax mapping just fakes this effect on a flat surface, so it is much more suitable for realtime applications than real displacement mapping (yet ;), who knows… maybe a polycount won`t be a problem in the future)

@Manti

  1. Yup i know… disabling mipmaps kinda fixes that one
  2. Nice find, i think i know where to look to fix this.
  3. Yeah i know :)… dunno how to fix that
  4. Yup
  5. Well it requires to modify the script…
    Also part:
    not sure what you mean…
    Well you must add any shader object to the shader if you delete the plane, named “stonebump”, or just rename your new object to “stonebump”
ShaderObjects = [objlist['OBstonebump'] ] 

PS
Artist friendly Graphic coding would be something really great.
I imagine doing it on node editor and same time seeing code change in separate window (for example: if you add a blur filter in node window - it adds blur script lines in GLSL shader). Something like in Adobe Dreamweaver when making homepages.

Hey I was just wondering if there would be any benefit to deferred rendering techniques in BGE - cuz honestly I wouldn’t know.

Utterly brain-bending!

Looks amazing, although when the camera is moved right up close and on an extreme angle it looks like this on my Kubuntu Jaunty AMD 64 machine with an ATI HD4850+FGLRX.

3d viewport is on the left / game engine is on the right:

Attachments


I have ported a technique from GPU Gems 3 to glsl which builds upon Relief Mapping. It is called relaxed cone step mapping and uses a relaxed cone stepping + binary search to adress several problem of relief mapping.

A comparing screenshot:
/uploads/default/original/3X/8/3/83f3f8e9eecaa72deeb669a0efe3f34e00c6ffe3.jpgstc=1&d=1242747888

Disadvanteges:

-slower
-a precomputed relaxed cone map is needed

I used martinsh blend file as a base.

Just one important difference:

With ‘E’ you change between Relaxed Cone Mapping (default) and Relief Mapping.

And remember to disable Mip Mapping.

Attachments


conemapping.blend (847 KB)

works great here :slight_smile:

very nice!

omg framerate does not drop anymore :slight_smile:
i am interested in using it in my new gameproject !!!
how are the textures made??? doesn`t look like normal mapping
king regards B