Page 2 of 3

Re: How to get Cone Step Mapping working?

Posted: Sat Sep 14, 2013 10:58 am
by Samuel
I had a busy week, but I managed to spare a few hours. It's still not ready, but I thought I'd give you an update.

I had an issue with the height not working, but I just managed to fix that. Which was kinda important.
Specular lighting now works along with ambient. No shadows within the texture yet. To be honest I'm not sure if I'll be able to get that working for a while.
The entity shadows still work. So, I don't think this will be that big of a deal.

I also spent a lot of time on normal height map images. I've only ever dealt with normal map images. So, I've had to do some experimenting with this.
It's very important to have a good normal height map or else the end result is pretty scary looking. I think I finally have the hang of them though.

Also, parallax mapping takes up quite a bit of power. So I'd recommend not using it for all your textures. I think it will be better suited for walls,floors, and some terrains. Then for character models I'd recommend a good normal shader instead.

I should have a bit of free time throughout this weekend. So, hopefully I'll make some more progress.
Here's a new picture too. It compares wireframe, parallax and normal mapping, and a plain texture.

Image

Re: How to get Cone Step Mapping working?

Posted: Sat Sep 14, 2013 11:21 am
by Bananenfreak
Looks really fantastic, good work Samuel :shock: :)

I want to use it, as you said, for stonewalls, buildings, and stonefloors (hmm, eventually for Wood, too? :idea: ). Like in the Criysis Video. Not for all textures Oo
Hmm, and barks? It could work also with barks, but that´s all :D

No, for barks and Wood there is bumpmapping enough. These textures only Need a small bump, not as big as stonewalls it need.

What "power" needs it? CPU or GPU?

On your parallax Picture is something what irritates me. Just look at the "edges" of the (eh... I don´t know) cylinder. Is this normal? I believe so...

I have to say it one time more: Really good work! :)

Re: How to get Cone Step Mapping working?

Posted: Sat Sep 14, 2013 11:57 am
by Samuel
Thanks.

It can be used for anything and everything. Wood, bark, stone, a portrait on a wall it really doesn't matter. How it looks in the end will always depend on how well
your texture and normal height map were made.

"Power" or sometimes referred to as "expense" is almost always about the GPU. At least when your dealing with shaders.

The OGRE wiki says the ATI Radeon HD 2000+ and nVidia GeForce FX6 series are required. So you'll need something of this caliber or greater to run POM.
I have a AMD Phenom II x4 965 Processor 3.40GHz with ati firegl v7600 for the GPU. Most of the time I never have a issue with the FPS, but once in a while when dealing with POM I notice a small drop.
On your parallax Picture is something what irritates me. Just look at the "edges" of the (eh... I don´t know) cylinder. Is this normal? I believe so...
I'm assuming your referring to the bumps being cut off. That's because plain Parallax mapping can only affect the texture itself. It can't actually pull itself out like cone step mapping. The video of Crysis's POM must of had something extra to give it that effect.

Here's a video I found that's closer to what I'm working on. Although, his is a bit nicer. Mainly because he has the shadows working in the texture. You'll notice it on the wood texture he displays about half way through the video.
http://www.youtube.com/watch?v=UeF-kCr_vyo

Re: How to get Cone Step Mapping working?

Posted: Sun Sep 15, 2013 8:00 am
by Bananenfreak
These graphics Cards are pretty old :shock:

In my opinion what you made is the same like in Crysis. Watch the Video a second time. When he moves the camera over the edge of his cube, you´ll see that there is also a Irritation for humans eyes. Yes, I think I mixed it up with Cone Step Mapping.
I think it Looks different caused to the different meshes.

Re: How to get Parallax Occlusion Mapping working?

Posted: Sun Sep 15, 2013 10:14 am
by Samuel
Those cards are the minimum requirement to run this shader. I believe they were the first cards to support shader model 3.0 which is what this shader uses.
So, if you had one of those two cards they would support this, but you would probably get pretty low fps. You also have to consider all the other things that need to be rendered. Like your entities, shadows, particles etc...
If you plan on using this for a bigger project I'd recommend a card that is a little newer.

Also, I think I found the cone step mapping patent. It was filed in 1992 and it has been over 20 years. Which is how long most patents last.
So, I believe the patent is no longer valid because they didn't appear to renew it. I'd still be leery of using it in a commercial project though.
Unless you can confirm it is no longer valid.

Here's the link if you would like to look it over.
http://www.google.com/patents/US5355442

Re: How to get Parallax Occlusion Mapping working?

Posted: Sun Sep 15, 2013 5:12 pm
by Bananenfreak
Samuel, I´m not a lawyer :) I don´t know so much about patents. But if they had renewed the patent, the entry date would be newer (or not?).

Hmm, what is this? http://www.google.de/patents/US5355442#legal-events
Other companies, who renewed the patent?!

And what means "referenced by"? http://www.patentlens.net/patentlens/pa ... _5355442_A
(Same as above)

I only know that we can use Parallax Occlusion Mapping :) And this is a pretty Mappingmethod. It Needs less "power" then Cone Step Mapping, because Cone Step Mapping is a Kind of Displacement Mapping, where the Meshes will be deformed.

Re: How to get Parallax Occlusion Mapping working?

Posted: Sun Sep 15, 2013 7:07 pm
by Samuel
From my understanding Cone Step Mapping or CSM is actually less expensive and more accurate than parallax occlusion mapping.
It just takes a little more work implementing the cone step maps.

Most of this patent stuff is over my head too. In order to know for sure someone would have to bring this to a patent attorney.
They can get better access to this information and they know what most of this mumbo jumbo means.

I'm not sure what country you live in, but this is an US patent. So, if it wasn't filed for any other region you should be able to use it without worry.
I live in the United States so I have to be more careful when dealing with this patent.

EDIT: Even if you live outside the US, there still might be a problem. I'm not sure if you would legally be able sell your product to consumers in the US. I guess that's another reason to bring this to an attorney.
It's all just a big headache. For now I'll stick with POM and deal with CSM at a later date.

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 5:34 pm
by DK_PETER
Samuel wrote: EDIT: Even if you live outside the US, there still might be a problem. I'm not sure if you would legally be able sell your product to consumers in the US. I guess that's another reason to bring this to an attorney.
It's all just a big headache. For now I'll stick with POM and deal with CSM at a later date.
AFAIK - the Sony Coorporation filed for an extension: date 13. dec 2011

US 20120163702 A1 - Image processing apparatus and image processing method

http://www.google.com/patents/US20120163702
http://www.google.com/patents/EP2469867A2?hl=us
http://www.google.com/patents/EP2469867A3?hl=us

And there's a lot more info out there. I would definately steer clear of parallax mapping.

Contracting contries outside the US are:AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

Peter

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 8:22 pm
by Samuel
Hello DK_PETER,

I looked through that patent. That is not the same as standard parallax occlusion mapping. It has something to do with collecting two separate images from two cameras and then generating a 3D texture.
Whereas the standard Parallax mapping uses the view angle in tangent space (the angle relative to the surface normal) and the value of the height map to generate the effect. Then the occlusion is an enhancement of the parallax structure.

In general, any invention which is made public before an application is filed would be considered prior art and can't be patented. So, if someone reveals their technology to the public through oral or written discussion. It can no longer be patented.
Zoe Brawley and Natalya Tatarchuk published POM in a book back in 2004. Before a patent ever existed on it. Therefor it can not be patented.

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 9:32 pm
by DK_PETER
@Samuel.

Yeah, I noticed that, they were describing three dimensional imaging related to televisions. But since we're talking about patent issues, I
would definately include an attorny, if one should include/use it in a commercial game. I always gets an icey feverish paranoia, when hearing the word "patent".
Doing several searches using words and sentenses like patents "Parallax mapping" "parallax occlusion mapping"
brings up several positive hits. Don't want to go through all of them to find relevant information, though :-)
I haven't had the need for using parallax occusion mapping anyways.

Have an excellent day Samuel.

edit: https://data.epo.org/publication-server ... cument.pdf
I haven't read it thoroughly, but....

Best regards
Peter

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 9:54 pm
by Samuel
Yes, I agree that a patent attorney is necessary when dealing with patents, but Parallax Occlusion Mapping can't be patented.
Since, it was made public it would be illegal for someone get a patent for it. Unless they made severe changes to it. In which case it would no longer be considered
Parallax Occlusion Mapping.

I looked at most of those patents that showed up on Google search. None of them fit the process of Parallax Occlusion Mapping. They were all variations or
used some of the logic of parallax.

EDIT: I looked through that new link you gave. That is not a patent for Parallax Occlusion Mapping. They are just using a Parallax Occlusion Map and Depth Map
for a greater quality 2D image.
So, that algorithm that they created has a patent for it, but Parallax Occlusion Mapping itself does not have one for reasons I said in this and previous posts.

If you happen to find or know of any other links. I be glad to look through them. Of course that's if you have time and even want to.
Thanks!

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 10:12 pm
by DK_PETER
@Samuel.
Sounds really good. Can you refer me to the document, that made "parallax occlusion mapping' public?
Not that I doubt you in any way - I'm just simply curious..
I have absolutely no need for it, but it would be nice to see it in writing. ;-)

Edit...Well, I'm rather curious by nature...Maby.. If I find any, I'll let you know. :-)

Edit 2: BTW. Love your signature. ;-)
Tia.
Peter

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 10:18 pm
by Samuel
It's called ShaderX3. Here's a link to the contents.

http://www.shaderx3.com/Tables%20of%20Content.htm

Check out 2.5 of section 2.

Re: How to get Parallax Occlusion Mapping working?

Posted: Mon Sep 16, 2013 10:20 pm
by DK_PETER
Samuel wrote:It's called ShaderX3. Here's a link to the contents.

http://www.shaderx3.com/Tables%20of%20Content.htm

Check out section 2.
Got it. Thanks :-)
Parallax mapping approximates the correct apperance
and lightning of uneven faces by modifying the
texture coordinate for each pixel.
The effect of parallax is seen by the viewer,
when portions of a surface appear to move
relative to one another due to a change in the
view position.
So, how do I know this...I got the book.
Good going Peter..Really good going.
Gonna butt-kick myself now.

Re: How to get Parallax Occlusion Mapping working?

Posted: Wed Sep 18, 2013 10:04 am
by Samuel
I was having a few problems with making POM look nice. So, I took little a break for a few days to work on some other shaders. I'll start working on it later today again.

I fiddled a little bit with cone step mapping. Don't tell anyone though. :shock:
Man, it's really impressive. It's fast, looks nice, and I got it to work first try. :D
I see why they patented it in the first place.
Now, I really want to find out if that patent expired. I'd love to use it in a few projects I'm working on.