Using displacement maps in the GE?

Well, I’m fascinated with the new capabilities of the Blender Game Engine, with real-time shadows, normal mapping, soft-bodies, amongst other things.

One thing I haven’t been able to figure out yet, (I’ve only been messing with the new features for a few weeks), is how or if I can use displacement maps along with normal maps for materials.

If you don’t know the difference, normal maps give the texture false relief, while displacement mapping gives it false depth, (At least that’s my interpretation of it, wikipedia is more acurate).
So really, I want to know if I can achieve true parallax occlusion mapping in the blender GE.

Thanks in advance.

http://blender-archi.tuxfamily.org/index.php?title=Easy_use_of_GLSL_shaders_in_game_engine

It’s possible to use that script in the file (bottom of the page) to achieve parralax occlusion.

If you need a more in-depth explanation, just ask.:eyebrowlift:

Ah, that script again. I actually already have that script, but was hesitant to use it. I was hoping for a way to use the displacement maps as easy as it is to use normal maps, but this’ll have to do.

If anyone else has any suggestions, please post them.

It’s my understanding that a displacement map actually displaces the position of vertices. You could write a displacement shader in GLSL.

But that’s not what I’m looking for. I’m looking to use height maps, say, on a flat, one-faced plane. The entire purpose is to replicate actual displacement of vertices without it actually happening.

EDIT: I don’t even know how to write GLSL scripts for blender, so that’s no good.

I know that’s not what you’re looking for, I’m just pointing out that what you are looking for is not a displacement map.

You’re looking for parallax mapping, which uses a normal map and a height map. A height map looks the same as a displacement map, and they are interchangeable.

>> More on Displacement Mapping…

Yes, I suppose that’s the point I’m trying to get across.

Any other ways to accomplish it?

Not really.

Parallax mapping seems to be the only way to get where you want to go.
Try to find a parallax demo in blender somewhere (I know there are a couple lurking around, at least one if which was on blender.org somewhere), and pick it apart.

>> More on Parallax Mapping…

No, I don’t mean a way to duplicate parallax mapping, I mean another way to use parallax mapping in the blender GE. The other demo/script is good, but a bit outdated.

I’ll look around for these parallax mapping demos you speak of.

Ah, I see.
Yeah, I believe the only way to achieve parallax mapping is with a GLSL script.
The one that nick gave the link to should work fine.