More Relief Mapping

Published November 06, 2006
Advertisement
Seems like the Relief Mapping implementation is going in the right direction. The image I posted in my last entry was simple to fix, but for whatever reason I still wasn't getting the quality I wanted from my implementation...

So I decided to implement the exact Cg code presented in the RM paper and see if their approach works better. It does a bit, but still not a huge amount better than my attempt and it's a LOT slower. The way I designed my code had opportunities for early-out in the loops (thus reducing the number of samples) whereas theirs doesn't.

I'll give it another crack again tomorrow, but for now:

10 Linear Search Samples
5 Binary Search Samples
10.61 seconds per frame


20 Linear Search Samples
10 Binary Search Samples
40.16 seconds per frame


40 Linear Search Samples
20 Binary Search Samples
78.59 seconds per frame


80 Linear Search Samples
40 Binary Search Samples
152.96 seconds per frame


No, those 'seconds per frame' measurements are not a joke. To get the high quality image with 120 samples per pixel you need to wait over TWO MINUTES for the results [wow]

Someone give me a GeForce 8800 NOW!
0 likes 5 comments

Comments

dgreen02
Lol. Why don't you just make a ray tracer...2 min to render that image is crazy.

*Punches REF Device*

Seems to be working better though, that's good news.

- Dan
November 06, 2006 07:17 PM
Manaxter
Sitting here with my Nvidia GeForce 440 MX (read: No shaders, or quality for that matter) punching the ref device is a daily occurrence!
November 06, 2006 07:42 PM
Jason Z
Have you checked out my article on Parallax Occlusion Mapping yet? At the very least it will give you some insight into the algorithm, and I have provided a sample HLSL implementation that is somewhat faster than what you posted here (not much though).

I think if you just use a linear search it is significantly faster since you are not doing dependant texture reads. Try it out both ways to see what works best for you - most likely the linear search is the way to go with the crazy video cards that are about to come out...
November 06, 2006 09:11 PM
jollyjeffers
Quote:Why don't you just make a ray tracer...2 min to render that image is crazy.
Well, within reason I have actually written a ray-tracer - just with a slightly convoluted twist of polygonal/raster graphics thrown in for good measure [lol]

Quote:punching the ref device is a daily occurrence!
I know the feeling. I don't know where I'd be without recording/playback of RefRast output...

Quote:Have you checked out my article on Parallax Occlusion Mapping yet?
Yup, in my initial research phase your article was one of the first I came across and is currently one of the three that I'm referring to whilst implementing it myself. It has been a useful and well written resource [smile]

Quote:I think if you just use a linear search it is significantly faster since you are not doing dependant texture reads.
Yeah, this makes sense - but at least to start with I'm trying to implement the algorithm exactly as it is in the original research paper. The text of the paper discusses a few optimizations that aren't in their included code, so I can only assume that its meant as a reference example rather than a production-ready example...

Even just implementing early-out for the looping will be a noticeable improvement...

Cheers,
Jack
November 07, 2006 04:17 AM
Jason Z
That's great to hear - its always good to hear that someone can make use of your work.

Is there any possibility that I could possibly make it into the references list??? That is probably about as close to publishing in the graphics industry that I would get for quite some time. You'll have to let me know when it goes on sale so that I can check it out.

If you would like a proof reader I would be willing to help out as well - even for readability if you would like. Its just an offer, I thought I would throw it out there.

Good Luck!
November 07, 2006 05:36 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement