Parallax Occlusion Mapping

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

Potentially, it could be: cone step mapping allows for big steps through the height map without missing any details, so there should be no artefacts with cone step mapping. You do have to post a link to be sure, though. :)
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

http://www.gamedev.net/community/forums ... _id=372739

(also, there appears to be some patent issues due to the discovery of this method in the past or something like that, I believe this can't be used commercially or something, can anyone confirm?)
Last edited by nullsquared on Sun Jul 06, 2008 3:11 pm, edited 1 time in total.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18

Post by PolyVox »

I haven't had time to properly read that thread, but have a look at this one too:

http://www.gamedev.net/community/forums ... _id=403699

It's by the same guy and is a similar but different approach to work around the patent issues.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

PolyVox wrote:I haven't had time to properly read that thread, but have a look at this one too:

http://www.gamedev.net/community/forums ... _id=403699

It's by the same guy and is a similar but different approach to work around the patent issues.
I saw that, too, but patents or not, RSM is nowhere near the quality & speed of CSM, especially for very irregular and deep surfaces.
User avatar
vilgeits
Goblin
Posts: 298
Joined: Tue Aug 02, 2005 10:41 pm

Post by vilgeits »

I'm a bit lost whats better, whats faster? CSM or POM?
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

vilgeits wrote:I'm a bit lost whats better, whats faster? CSM or POM?
CSM is both faster and of higher quality than POM (check out the demo at the link I posted). However, it requires a separate pre-processed "step map", unlike POM which relies on solely a height map.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18

Post by PolyVox »

The GPU Gems 3 article actually talks about relaxed CSM. The standard CSM stops the ray before it hits the surface, then you use bilinear search to find the intersection point. Relaxed CSM lets the ray intersect the surface once, and then backtracks to find the intersection point. This means the cones corresponding to each pixel can be bigger, and hence bigger steps can be taken with each iteration. This leads to faster convergence.

Implementing these kind of approaches is quite high on my list of things to do due to the low detail in my project. I'm interested in whatever people come up with!
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

Cone step mapping (CSM) is an optimisation of parallax occlusion mapping (POM). But what is that RSM term that is being used? Is that just Relaxed Cone Step Mapping (that would be RCSM, right?), or something else?
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Post by xadhoom »

Kojack wrote:
The length of a cross is 1 if both vectors have the length 1.
No it isn't.
The length of a cross product is affected by the angle between the 2 vectors. The result is only length 1 if the 2 vectors are unit length and at 90 degrees to each other.

If the normal and tangent are always going to be at right angles, then it's fine. But that's a specific case.
Yes you are right. It has to be ensured, that the angle between normal and tangent is 90 deg. But this really should be the case in the shader, because we take both as
rotation matrix axis. If not all three vectors are orthogonal to each other, this matrix will lead to wrong results regardless of which length the vectors are.
User avatar
vilgeits
Goblin
Posts: 298
Joined: Tue Aug 02, 2005 10:41 pm

Post by vilgeits »

Is there any usable/easy to convert example of CSM or RCSM?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18

Post by PolyVox »

Oogst wrote:But what is that RSM term that is being used?
It's Radial Step Mapping, which it appears was devised to work round the patent issues in CSM. I think anyway, I'm probably giving the impression that I know a lot more about this than I do!
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

PolyVox wrote:
Oogst wrote:But what is that RSM term that is being used?
It's Radial Step Mapping, which it appears was devised to work round the patent issues in CSM. I think anyway, I'm probably giving the impression that I know a lot more about this than I do!
It is a bit sucky that the link does not actually explain how it works. :(
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Faxnico
Gnoblar
Posts: 21
Joined: Thu Sep 04, 2008 4:55 pm

Post by Faxnico »

Hi!

I'm experiencing some troubles setting up this POM shader with Caelum.

When the sunlight reaches its maximum intesity, the following texture...

http://img360.imageshack.us/img360/1664 ... s01mm5.jpg

... appears "a bit" too white as you can see from picture below.

Image

While it looks fine when it's dark.

Image

Is there a way to work easily around this?

Thank you and sorry for posting many screens.
Nicolò
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

Looks like very bright specular to me. POM should not result in overbright lighting: it just delivers certain normals and colours. After that, lighting is the standard thing. So what could go wrong is that the normals might not be normalised somehow (seems unlogical, because they probably should come from a normal map), or that the lighting is just too bright.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Caphalor
Greenskin
Posts: 116
Joined: Tue Feb 06, 2007 8:54 pm
Location: Berlin, Germany
x 25

Post by Caphalor »

Caelum's sun is really bright by Default. Try something like:

Code: Select all

	mCaelumSystem->getSun ()->setDiffuseMultiplier (Ogre::ColourValue (1.5, 1.5, 1.3));
	mCaelumSystem->getSun ()->setSpecularMultiplier (Ogre::ColourValue (1, 1, 1));
But even in the dark the texture doesn't look optimal in my opinion. Are you sure that you use a correct normal map with a height map in its alpha channel?
Faxnico
Gnoblar
Posts: 21
Joined: Thu Sep 04, 2008 4:55 pm

Post by Faxnico »

First of all, thanks for your replies.

That was the reason indeed...

Caphalor, I'm almost new to game programming and I've absolutly no confidence with those techniques. Could you suggest me, for this first time, some realistic NVidia Photoshop Plugin's or CrazyBump's settings for that texture + Parallax Occlusion Mapping, please?

Thank you all again.
Nicolò
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

I do not know if the Nvidia plugin or Crazy Bump can save in exactly the format you want, but it is easy with the Nividia plugin nevertheless.

If you use that plugin, then I suppose you already have a depth map. Make a copy of the depth map and then apply the Nvidia normal map plugin to the original. Now add a channel (in the channel window, click the little arrow in the top right and then choose 'new channel'). Then copy/paste the depth map that you just copied to the new channel. If you now save this file as a 32 bit TGA, you have a texture with a normal map in the RGB and a height map in the A.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
tera4d
Halfling
Posts: 98
Joined: Mon Nov 27, 2006 6:22 pm
Location: The Netherlands

Post by tera4d »

Wow that looks really good.
This may sound a bit stupid hehe :P but how do i use these materials and scripts?
I have never used the material system before because im fairly new to ogre3d.
I have placed the files in the right directory's where they belong but when i load them into the project and compile it then the model is just plain white :S but the lights do move on it like a glow on white paper.
Can someone please help me?
Caphalor
Greenskin
Posts: 116
Joined: Tue Feb 06, 2007 8:54 pm
Location: Berlin, Germany
x 25

Post by Caphalor »

Do you use Ogre 1.6 (Shoggoth)? The provided materials only work with Ogre 1.6.
tera4d
Halfling
Posts: 98
Joined: Mon Nov 27, 2006 6:22 pm
Location: The Netherlands

Post by tera4d »

Yes i do use Ogre 1.6 but i got it to work after i updated my driver hehe :P
It looks very good and runs smoothly too.
lukeneorm
Halfling
Posts: 61
Joined: Wed Apr 01, 2009 12:03 am

Re: Parallax Occlusion Mapping

Post by lukeneorm »

I can't download the rar from the link in the first post.
Is it broken? :(
User avatar
rafa.gdev
Halfling
Posts: 56
Joined: Mon Apr 14, 2008 10:10 pm
Location: Belo Horizonte, Brazil

Re: Parallax Occlusion Mapping

Post by rafa.gdev »

Yes, the link is broken :(
But this thread is from 2008 hehe :wink:
lukeneorm
Halfling
Posts: 61
Joined: Wed Apr 01, 2009 12:03 am

Re: Parallax Occlusion Mapping

Post by lukeneorm »

rafa.gdev wrote:Yes, the link is broken :(
But this thread is from 2008 hehe :wink:
Yes, but it is still an interesting techniques :)
Anyone can help me to download the files? :?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Parallax Occlusion Mapping

Post by jacmoe »

Caphalor was here yesterday, maybe you're lucky and he still have the code. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
yashiz
Gnoblar
Posts: 1
Joined: Tue Jun 09, 2009 8:01 am

Re: Parallax Occlusion Mapping

Post by yashiz »

request the code too...