How to get Parallax Occlusion Mapping working?
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
How to get Parallax Occlusion Mapping working?
Heyho,
what I have to do to get this working? How Looks a csm-map?
http://www.ogre3d.org/forums/viewtopic.php?p=293607
Thanks,
Bananenfreak
what I have to do to get this working? How Looks a csm-map?
http://www.ogre3d.org/forums/viewtopic.php?p=293607
Thanks,
Bananenfreak
Last edited by Bananenfreak on Sun Sep 15, 2013 8:11 am, edited 2 times in total.
Re: How to get Cone Step Mapping working?
Hello Bananenfreak,
The shader looks relatively simple. It shouldn't be too much of a problem to set up. The one issue I see is that there was a patent on Cone Step Mapping.
This sample looks like a bit too similar to that patent, but I'm not a expert on patents so I could be wrong. nullsquared gave a link on the original topic. Check page 7 to read more about it.
The shader looks relatively simple. It shouldn't be too much of a problem to set up. The one issue I see is that there was a patent on Cone Step Mapping.
This sample looks like a bit too similar to that patent, but I'm not a expert on patents so I could be wrong. nullsquared gave a link on the original topic. Check page 7 to read more about it.
Last edited by Samuel on Sat Sep 07, 2013 12:20 am, edited 1 time in total.
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: How to get Cone Step Mapping working?
Ah, yeah, there´s a patent on it. Ok, then CSM is nonrelevant.
I´m still searching for a good Height Shader, but in my mind, I have to use Parallax mapping.
I don´t understand shaderlanguages, it Looks French for me (
). Is there anywhere a tutorial for it?
EDIT: Is this Parallax mapping? http://www.ogre3d.org/tikiwiki/PerPixel ... 29+Mapping
EDIT: Or this one: http://www.ogre3d.org/forums/viewtopic. ... 7&p=343863
I´m still searching for a good Height Shader, but in my mind, I have to use Parallax mapping.
I don´t understand shaderlanguages, it Looks French for me (
EDIT: Is this Parallax mapping? http://www.ogre3d.org/tikiwiki/PerPixel ... 29+Mapping
EDIT: Or this one: http://www.ogre3d.org/forums/viewtopic. ... 7&p=343863
Re: How to get Cone Step Mapping working?
OK, I started working with the top link because it supports opengl and directx. Looks a bit more capable too. I have run into a few issues though.Bananenfreak wrote:Ah, yeah, there´s a patent on it. Ok, then CSM is nonrelevant.
I´m still searching for a good Height Shader, but in my mind, I have to use Parallax mapping.
I don´t understand shaderlanguages, it Looks French for me (). Is there anywhere a tutorial for it?
EDIT: Is this Parallax mapping? http://www.ogre3d.org/tikiwiki/PerPixel ... 29+Mapping
EDIT: Or this one: http://www.ogre3d.org/forums/viewtopic. ... 7&p=343863
First problem was it doing more instructions then it supported. I believe I got that straightened out.
Now I have a problem with two missing vertex programs. In your link it gives you the material and cg file, but It doesn't give you the Ambient or OneTexture program
files. So, I assumed those are files that come with the OGRE SDK, but I looked through it and I can't find them.
So, for the moment I'm in a pickle, but I'll keep at it in my spare time and I'll let you know if I can or can't get this done.
If anyone wants to help with this it will be greatly appreciated.
Re: How to get Cone Step Mapping working?
I did a little bit of snooping around and I think this shader was built off some of OGRE's older Program files. I think I've found the newer versions of them.
I hope it will just be a little trial and error to get them working properly. I'll create a tutorial if I can get it working.
In a previous topic, I know you also asked about a bump map tutorial. I've managed to get one of OGRE's samples to work.
So far it only handles diffuse lighting, but I'll continue to work on adding the specular. Hopefully pretty soon I'll be able to create a bump map tutorial as well as the parallax.
I hope it will just be a little trial and error to get them working properly. I'll create a tutorial if I can get it working.
In a previous topic, I know you also asked about a bump map tutorial. I've managed to get one of OGRE's samples to work.
So far it only handles diffuse lighting, but I'll continue to work on adding the specular. Hopefully pretty soon I'll be able to create a bump map tutorial as well as the parallax.
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: How to get Cone Step Mapping working?
You mean this one:
http://www.ogre3d.org/tikiwiki/tiki-ind ... ighting+II
I Need only one Mapping method (is this good english? I believe not ^^). So I searched a Little bit and in my opinion parallax mapping is better than bump- and normal mapping.
Anyway, I will use Bumpmapping in a program, for testing and we will see for what. Thank you
Could you post us the files, which you´re looking for? I can also look for them.
http://www.ogre3d.org/tikiwiki/tiki-ind ... ighting+II
I Need only one Mapping method (is this good english? I believe not ^^). So I searched a Little bit and in my opinion parallax mapping is better than bump- and normal mapping.
Anyway, I will use Bumpmapping in a program, for testing and we will see for what. Thank you
Could you post us the files, which you´re looking for? I can also look for them.
Re: How to get Cone Step Mapping working?
I found all the necessary files. I can now load the parallax shader without any errors, but the mesh that receives the material is black. Which means that it failed.
I'll have look through it all step by step and see if I missed something. I most likely messed something up.
It's also possible my graphics card doesn't support it, but I'm almost positive that's not the case. I'll double check just to make sure though.
I'm also looking into another possible shader called The Monster v2.
Here's the link.
http://www.ogre3d.org/tikiwiki/tiki-ind ... e=Cookbook
It says it supports parallax(offset) mapping and the sample pictures look nice.
Anyways, I have about 6 hours left before work and I need to get some sleep. So, I'll continue on with this later. Hopefully the next attempt will be the last.
I'll have look through it all step by step and see if I missed something. I most likely messed something up.
It's also possible my graphics card doesn't support it, but I'm almost positive that's not the case. I'll double check just to make sure though.
I'm also looking into another possible shader called The Monster v2.
Here's the link.
http://www.ogre3d.org/tikiwiki/tiki-ind ... e=Cookbook
It says it supports parallax(offset) mapping and the sample pictures look nice.
Anyways, I have about 6 hours left before work and I need to get some sleep. So, I'll continue on with this later. Hopefully the next attempt will be the last.
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: How to get Cone Step Mapping working?
Thank you Samuel 
Please take your time, when it´s done it´s done. Don´t hurry up, no one Forces you.
I´ve read, that Parallax Mapping is a Feature of DirectX11 (I don´t know whether this is integrated in DX 10 or not). In Dx 9, there is no Parallax Mapping (Only Normal- and BumpMapping)
EDIT: Monster V2.0 doesn´t support directional lights... This is bad.
Please take your time, when it´s done it´s done. Don´t hurry up, no one Forces you.
I´ve read, that Parallax Mapping is a Feature of DirectX11 (I don´t know whether this is integrated in DX 10 or not). In Dx 9, there is no Parallax Mapping (Only Normal- and BumpMapping)
EDIT: Monster V2.0 doesn´t support directional lights... This is bad.
Re: How to get Cone Step Mapping working?
Yes, that's true that no one is forcing me, but I personally would like to see this up and running soon. I've been wanting to use POM for some time now. Let's hope it works out.Bananenfreak wrote:Please take your time, when it´s done it´s done. Don´t hurry up, no one Forces you.
I don't think this is true. POM has been around since 2005(I may be off a little). Which is well before directX 11 was released.Bananenfreak wrote:I´ve read, that Parallax Mapping is a Feature of DirectX11 (I don´t know whether this is integrated in DX 10 or not). In Dx 9, there is no Parallax Mapping (Only Normal- and BumpMapping)
All of Ogre's POM shaders that I've seen have been using profiles that are meant for older GPUs.
I have also seen a few demos of it being used on DirectX 9,10, and 11. So, I think it's safe to say it will support 9 and 10.....I hope.
Unfortunately, If this were true then I can no longer progress with it. My GPU only supports up to DirectX 10.
I plan on making a new PC sometime in the next year. One that's up to date with all the new technology, and then this wouldn't be an issue.
EDIT: I would appreciate it if you could post any links on this matter.
EDIT2: I think what your referring to is called Tesselation. Which is kinda like an advanced version of parallax mapping and it's only supported by DirectX 11.
After a little check up I'm now 100% sure POM will work with DirectX 9,10, and 11. So that's some good news, but I still need to get it working right.
I gave up on The Monster v2. It looked nice at first, but I don't think it's right for the job. Although with some extra work I think it could be a beast.Bananenfreak wrote:EDIT: Monster V2.0 doesn´t support directional lights... This is bad.
Maybe, that will be a future project, but for now I'll work with what I got.
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: How to get Cone Step Mapping working?
Hmm, I can´t post a link, except you understand german 
But, I think I was wrong. That was a Crisis 2 Forum and there they spoke about Parallax Mapping.
Crisis 2 can only work with Parallax Mapping on a System with DirectX 11.
Otherwise I found nothing.
But, I think I was wrong. That was a Crisis 2 Forum and there they spoke about Parallax Mapping.
Crisis 2 can only work with Parallax Mapping on a System with DirectX 11.
Otherwise I found nothing.
Re: How to get Cone Step Mapping working?
I have heard of some games limiting features to certain versions of DirectX. I think that's usually a performance issue and not a capability issue.
I don't think I'll need any links on this anymore. Thanks for looking though.
Now some good news!
After 15+ hours I've finally made a little head way with this. It still has issues and it's not perfect, but now I can at least see it in action.
http://img28.imageshack.us/img28/1162/0l8u.png
The textures that I used were lower quality. Just to let you know.
As for when this will be complete and user friendly. I'm not really sure, but now I can work with it and see the results as I'm going. Which makes things so much easier.
I don't think I'll need any links on this anymore. Thanks for looking though.
Now some good news!
After 15+ hours I've finally made a little head way with this. It still has issues and it's not perfect, but now I can at least see it in action.
http://img28.imageshack.us/img28/1162/0l8u.png
The textures that I used were lower quality. Just to let you know.
As for when this will be complete and user friendly. I'm not really sure, but now I can work with it and see the results as I'm going. Which makes things so much easier.
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: How to get Cone Step Mapping working?
That Looks really good
Good work man.
One question: Is there a possibility with this shader to Change heights with a variable?
Here is a Video: just view it a few seconds ^^
http://youtu.be/gcAsJdo7dME?t=33s
Good work man.
One question: Is there a possibility with this shader to Change heights with a variable?
Here is a Video: just view it a few seconds ^^
http://youtu.be/gcAsJdo7dME?t=33s
Re: How to get Cone Step Mapping working?
Thank you.
Yes, for now the height can be changed in the material script. I can try to give it real time depth control like in that video, but I can't promise that it will work for sure.
I guess I'll just give it a try and see what happens.
As for the shader I haven't made much progress since my last post. Work has been piling up on me again.
I don't think I'll be able to work on it much over the next few days. If I manage to get some free time though I'll be sure to work on it a little.
As for what's left to do. I still have few bugs
that are in the way and it's giving me a little grief with Opengl, but if I can fix those issues.
Then It will be about ready for ya.
Yes, for now the height can be changed in the material script. I can try to give it real time depth control like in that video, but I can't promise that it will work for sure.
I guess I'll just give it a try and see what happens.
As for the shader I haven't made much progress since my last post. Work has been piling up on me again.
I don't think I'll be able to work on it much over the next few days. If I manage to get some free time though I'll be sure to work on it a little.
As for what's left to do. I still have few bugs
Then It will be about ready for ya.
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: How to get Cone Step Mapping working?
You misunderstood me. I don´t want to Change detph in realtime, if this can be changed in the material script, this would be all I Need 
One question: What do you have to do with this shader? Do you write the .program files?
One question: What do you have to do with this shader? Do you write the .program files?
Re: How to get Cone Step Mapping working?
OK, then I won't bother on the real time changing for now.
All you will have to do. Is type a few lines of code in the material script for every material that uses parallax.
You won't have to do anything with the other files.
Here's an example of what you might have to write. This will go at the bottom of the material script.
So, if you have 50 different materials that use this shader. You will have to repeat this code for every single one.
This is also how you set a different depth for each material.
All you will have to do. Is type a few lines of code in the material script for every material that uses parallax.
You won't have to do anything with the other files.
Here's an example of what you might have to write. This will go at the bottom of the material script.
Code: Select all
material MaterialName : NameOfMaterialScript
{
set $TheDepth 0.07
set $NormalHeightMap BrickNormalHeightMap.png
set $DiffuseMap BrickTexture.png
}
This is also how you set a different depth for each material.