Parallax occlusion mapping

hi community,



i’d like to include really cool looking walls in hhexen which should result in kind of a “hey, nice”-effect. in case you don’t know what it is:





can jme do this? if not, does anyone feel like helping me with this one? i’m pretty much working at full capacity with the ai, quests, fixing bugs and the really really HUGE thing.

i can even make an offer: the one who makes POM working in hhexen may send me a picture of his face which will then be put on one of the mercenaries which can be hired by the player. now if that isn’t cool… :wink:

I would gladly do it but unfortunately my video card is so crappy that even the simplest shader decreases FPS by 20x…

What's parallax occlusion mapping anyway?



(I mean, I can't get to understand it just looking at the picture  ).

It's parallax mapping combined with self shadowing, If you notice the stones in the picture not only they have depth but they also shadow themselves. jME already has parallax mapping, which is a combination of normal mapping and some texture coordinate magic that creates depth.

I think what Momoko is saying is that if you provide him a new video card he'd be happy to do it for you. :wink:

would you do it for a geforce 7100gs?

Momoko, just change your tagline in your profile now to say, "Will work for video card".  :stuck_out_tongue:

Mm it's quite easy to do the effect since there's so much papers and sample code laying around the net, the real problem comes when you actualy need to get it in-game… You need to configure it so that the lights are sent, the shaders are generated correctly, the textures have the correct setup, etc. Also improving visuals in one part might get you a "hey, nice" on the walls but a "hey, ugly" on the rest :|, if you're finally planning to improve graphics for hhexen I think you should attack the weak parts first (terrain).

I am planning to get a laptop soon, probably with a decent video card and at that point I might try out doing some shaders. But sure you can send a card if you want :stuck_out_tongue:

i'm planning to put a dungeon below the terrain that looks so good that no one ever wants to leave it - this way, the terrain-looking-ugly-problem would be solved.

seriously: what should i do to improve the terrain?

i'm planning to use a nice new skybox that allows smooth far-away-objects-fade-in and a lightmap. what else should i do?

I don’t know if you are already using several passes and splatting, but that would definitely help. Atmosphere (Rayleigh) scattering would also make it look better.



Edit: Check this site: http://cboard.cprogramming.com/showthread.php?t=81644

and my todo-list is getting bigger and bigger. no, i'm not using anything yet except several random noise textures. i really need to "hire" someone to do the shader stuff because if i'm going to do it, the first shader would not make it into the game before july or august.

HamsterofDeath said:

i'm planning to put a dungeon below the terrain that looks so good that no one ever wants to leave it - this way, the terrain-looking-ugly-problem would be solved.
seriously: what should i do to improve the terrain?
i'm planning to use a nice new skybox that allows smooth far-away-objects-fade-in and a lightmap. what else should i do?


You could use the Llama terra implementation - there is a demo using passes for splats and texture scaling.
The splat map alpha generator donated by Momoko_Fan is used.

Check out hevee's demo for one implementation of it - i beleive he is also using a seperate pass system to add trees/buildings etc

You can use the bump-mapping library: http://code.google.com/p/jmeaddons/downloads/list

It will generate the tangent space for each mesh and inject the attribute properties for each batch into the shader. All you need for parallax occlusion mapping is a different shader. Every else is pretty much taken care of.



The only issues right now is somewhat slow performance, because injecting per-batch attributes doesn’t work with display lists. The workaround would be to use VBO for the attributes, but that requires modifications to the GLSLShaderObjectsState.

Texture Splatting Revised

Momoko_Fan said:

Texture Splatting Revised


this might help :)

I just updated it, some very crucial fixes, includes a new TerrainPass class which uses the framework.

fabio policarpo's shaders are easy to convert to glsl…

http://fabio.policarpo.nom.br/relief/index.htm

I just ported relief with shadowing to GLSL from some nVidia demo. To be honest, there's not much difference between normal mapping and parallax occlusion in terms of graphics quality; sure you can see some shadows when it's deep in but for most textures this would be un-noticeable.

I suggest that you just stick to the simpler and faster solution, normal mapping.