Some paralax mapping

Hi everyone, sometime ago someone, can’t remember who unfortunatly, uploaded a parallax mapping that was simplistic to use.

I picked up this little demo and found out that it could handle only 1 spot light, it was kinda boring that way then tweaking it up I discovered that I could make it handle 2 of them. Her are the links, and an image:



On the google site I explain how to use it and the files needed for it, I also explain how to add the light comparing the original script with the modified one I made.

Hope is usefull.

Note: I haven’t found out how to make it work with shadows.

Attachments


I can’t run GLSL on my computer, but it looks impressive. Nice work on the 2D Sprite file!

Thanks for the comment. Yeah that 2D sprites files was pretty fun to make.

Thinking about the shadow, baking the environment shadows and using the fake face-shadow would be the way to go for this shader.

How’s the performance overall… I’m gonna try it right now ^^

That’s nice!
It’s easy to set up, the only trouble I had was it emits at a different level than objects without the material, and no splat (yet) :smiley: .
It doesn’t really slow down the framerate, and it really gives the illusion of pretty massive displacement.

Hey that’s pretty cool. Could you tell me where you learnt Glsl shaders?

would be nice to have this method inside blender as any other option, not by python or scripts but simple as enabling the normal maps or something.

Go to ati or nvidia websites, download sdk. You can almost copy paste their glsl code into python

You’ll need a greyscale height map as well for parrelax to work, if you want you can try to figure out how Brecht got the GLSL to work for artists.

Wow, many replies:
-about performance: I think it works fine while having not too many diferent parallax mapped object, since you will need a script for each one.

It’s easy to set up, the only trouble I had was it emits at a different level than objects without the material, and no splat (yet)

The emit variable may work weird since it isn’t considered in the script so I suppose the engine will simply add the emit values over the parallax effect. I don’t get the splat thing…

Could you tell me where you learnt Glsl shaders?

Actually I didn’t learn it, I just reverse ingeniered it this script to get the results I wanted.

I’m glad you all liked it and hope it’s understandable.

Sorry, I mean ‘texture splatting’ as opposed to ‘splat’ . :smiley:

Mmmm… looking at wikipedia, “texture splatting” should be the same as using textures stencils on the BGE.

Unfortunatly I don’t think that both stenciling and parallax mapping will be able to work together, at least not unless someone code it, or that parallax mapping gets integrated on the material editor :smiley:

To achieve stenciling on the GE you need 3 textures on the following order: texture A, stencil (black and white), and texture B.

Both A and B have normal settings, but the stencil, on the texture panel, you got to deselect “COL” and slect “STENCIL” and “NoRGB”

Attachments


I am able to run this using Blender Player-- very impressive. I was searching for a set-up like this, I am a fan of your work!

sigh
I try to decide, do I correct or not? I guess I will, just so it’ll quit bothering me.
[edit]
So, there you go.

Looks very interesting by the way!
:wink:

Hahaha, sorry Minifig, fixed it XD

Thanks! :wink: