Relief Mapping

Hello,
As promised - here is Relief mapping.
It is really hard to judge framerate impact compared with parallax mapping on my computer… I have 30 fps cap in Blender, i dont know why. Ill have to reinstall OS i guess.

This is very similar to steep parallax mapping, but i think it looks better… and also could be slower :).

3 pretty screenshots:

http://img218.imageshack.us/img218/8605/relief2.jpg

http://img218.imageshack.us/img218/9785/relief1.jpg

http://img218.imageshack.us/img218/1757/relief3.jpg

and a blend file: (RMB-click on link and Save As…)

http://dl.dropbox.com/u/11542084/relief_mapping.blend
(sorry too big for attachment, as this blend contains 2 tga textures with alpha channels)

Controls:

Mouse/WASD - look/move;
left mouse button+ mouse move - move the light;

arrowkeys:
up/down - displacement amount;
left/right - texture tiling;

1 - ssao (currently experimenting to get it work with relief and parallax mapping)

Done as part of Twilight22 project.

Like I said before, this really should be hardcoded into Blender so it’s very accessable to artists because they won’t need python and can just use the Blender materials, plus then you can see it in the GLSL view. I tried the earlier version and found you need GLSL knowledge to control displacement amount and texture scale

Also, if you do that, this would also be a very nice feature for the Blender Internal renderer as it provides a good alternative to micropolygons. Just think of Blender having the same advanced shading techniques in the renderer, the 3D view, and the BGE.

All this really needs is to affect spot-lamp shadows in the BGE, then it will be perfect for hardcoding into Blender, and then it can be done to affect ray shadows just for the Internal renderer.:smiley:

I know I may sound like a broken-record but I’m looking at making sure the Twilight22 shader devs. know of this.

Amazing!!!

this isn’t even technology anymore; this is magick… with a k - that means it’s the good stuff

I’m just stunned. I’ve never seen relief mapping before.

I think we had similiar rigs you’res being a bit faster, on my computer it’s running at 120fps fullscreen with like 6 copies of the plane on screen at once. that’s spectacular

the further I move away from the planes the faster it goes

so at a distance == 220fps
medium == 120fps
super duper close == 60fps

i’m using Jorgie’s optimized build of course so it’s probably a bit faster than on other builds

great!
looks like the framerate changes according the texture size - when mipmapping kicks in - the texture size gets reduced by half so the shader has less to calculate.
Thanks

incredible!

If you have trouble, turn off the SSAO, then it worked like a charm. Framerate down to a 1/4 the usual though. Looks amazing!

This is stunning work!

Quite awesome martin. Just figured out how to remove the frame rate cap. I had to “Force off” my vertical sync in the NVidia control panel, and “Enable All Frames” to remove cap on frame rate. My framerates scale identically to kay_Eva’s.

You’ve got me worried now, because framerates on this are comparable to the iterative parallax mapping I did. I’ll have to throw this script at my walls and get a good comparison, I might have some major optimizing to do. Please let me know if you get the SSAO working with the shader! Then I can add it to the parallax methods. I’m afraid I’ll have to leave it to you for now though, I’ve got some other assignments for the time being.

I like your control mechanism and light icon, might have to steal it for future demos. That is if you don’t mind. :slight_smile:

Seconded!!!

One thing I’m getting though, these weird lines when I get close. Could this be down to my graphic cards? I’m using two SLi enabled Nvidia GForce 8800 GTs. They have the latest drivers.

http://i291.photobucket.com/albums/ll281/dustbin1_uk/straffing.jpg

Ah! just realised! I’m not using the latest build you guys created. Idiot! Sorry.

i get the same thing on my macbook’s NVIDIA GeForce 9400M :confused:

Martin, check to see if you have VSync ennabled in your video drivers, this could be whats ‘capping’ the frame rate by keeping it synced with your monitors refresh rate.

hope this might help. :slight_smile:

edit:
argh didn’t notice, greatrel already pointed this out! :slight_smile:

Hey, thanks guys!

@greatrel
Thanks!
Well strange things are happening lately with my PC… looks like Nvidia control panel isnt affecting any application now… and i am sure my monitor`s refresh rate is 60Hz not 30 :)…
Anyway, it is recommended to reinstall OS once in a year.

@dusty ghost

Yes, you are right!
I havent find a way to get rid of those lines. I took those screenshots with Mipmapping disabled. Looks like it is a texture filtering problem at vertex edges.

Edit:
Hey and by the way, you can play with the values in the bottom of “relief.py”


amount of samples for displacement - shader.setUniform1i('linear_search_steps', 15)                  
amount of subsamples for each sample for displacement - shader.setUniform1i('binary_search_steps', 5)                               
change transparency of the shadow - shader.setUniform4f('ambient', 0.4, 0.4, 0.4, 1)

IIRC,
60Hz = ~30FPS
and
65 = ~32FPS

:slight_smile:

no, its recommended to re-install windows once a year at least[6 months is more optimal,
and I know guy’s that reinstall almost weekly]). :wink: :smiley:

(in linux’s case, a new kernel release happens every 6 month’s…)

edit:
Have you tried anisotropic filtering(its supposed to make mip-mapping sharper) maybe it could fix the problem with the lines(not sure, just a guess from an artists…)

Hehe, true.
I don`t recall when i re-installed OS on my iMac, maybe 3 years ago…

Awesome! Simply stunning! Works perfectly om my computer. Runs on 60FPS from long distance to super close (60FPS Cap). When one enter a martinsh-created topic you know that you are in for extreme eyecandy!

Please can someone give me the link with the recent build with which I can test this blend.

Please can someone give me the link with the recent build with which I can test this blend.

Here´s a very recent optimized Win 32 build with soft shadows that I builded
http://graphicall.org/builds/builds/showbuild.php?action=show&id=965

This is simply stunning. :eek:

I get 7fps, so I guess it’s finally time to get a new computer. My laptop is over 3 years old, but at least I can see it working. Thanks a lot martinsh. :slight_smile:

System:
Laptop
Vista 32 bit
1.66GHz centrino duo
NVIDIA GeForce Go 7600
2Gb RAM

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