Page 1 of 1

[BUG] Bump sample interpolation + more

Posted: Sat May 05, 2007 9:10 am
by Deus
Heya.

It appears to me that I get too large areas that has a specific normal when I use bump maps. Let me try to explain (This is not a scale issue discussed earlier and it is not a oversampling issue)

OK:

Code: Select all

Here is bump value

      __
___|   |_______

here is the delta..

__|________
          |  

Here is the resulting normals


__\__/______
My problem is that all rays that hit the \ pixel gets the \ normal when it should be a linear transition between _ to \ and back to _ normal.

I see this problem in the following scene:

Too many of the reflected (of the water surface) rays in some pixels ALL hit the beach strip where only relatively few _should_ hit the beach. If the bump sampling would work properly there would be some white reflections in the water but not as MASSIVE as seen in some regions of the image.

There is also a second problem here that is epsilon related. On the lower right beach section where the water meets the land there is some black strips. This is because my reflective water surface is too close to the underlying surface at a too steep angle. To prevent self reflection i bet you add a epsilon value to the parametrizised ray t. The epsilon value is either too low or you use too bad float precision. This problem is clearly visible here :)

I am not nagging you Ono because I can I nag you because I would like to improve Indigo.

Posted: Sat May 05, 2007 12:57 pm
by zsouthboy
Pardon me, but HOLY SHIT that looks good!

RE: your problem: would supporting and using a normal map (instead of a bump map) fix that? IIRC it should. Ono?

Posted: Sat May 05, 2007 1:55 pm
by Deus
Thanks zsouthboy. It wasnt ment to show anything off (yet) i have mostly spent my time on the ground work with the engine rather than doing "nice images" for instance i can easily do different types of vegetation now its only one type of trees ;-). And that image needs to cook 20 times longer. Hopefully I will be done with some real nice output before summer.

Considering your other comment. Normal maps solves other issues but unfortunately not this one rather its a sample interpolation problem.

Posted: Sat May 05, 2007 5:55 pm
by OnoSendai
For any given epsilon, a scene can be constructed for which the epsilon leads to incorrect behaviour :)
I'm not convinced you're not just seeing non-converged artifacts in the image, as opposed to some kind of bump mapping issue. Perhaps you could construct a simpler test scene?

Posted: Sat May 05, 2007 11:00 pm
by Deus
Its not a normal issue.

Same scene with the water surface removed. (water is just a simple reflective surface pointing up). The artifacts are gone!

Posted: Sat May 05, 2007 11:15 pm
by Deus
I think the problem is something like this:

Blue is water surface. Green is ground polygon and black is the refracted ray

Posted: Sat May 05, 2007 11:23 pm
by CTZn
[Horizontal line] is water surface. [Tilted line] is ground polygon and [broken line] is the refracted ray (colors are not obvious here :)).

Artifacts are the white moss on water ?

Posted: Sat May 05, 2007 11:25 pm
by Deus
Exactly CZTn

Two artifacts two different issues:

1) White moss on water
2) Black region where beach meets water on the right side of the image.

Posted: Sat May 05, 2007 11:38 pm
by Deus
I think i understand what the white foam is.... Its MLT screwup. It is diffuse rays from water bottom refracted back into the camera......

Looking closer its not mlt screwup

"metropolis" "false" --if true, use MLT, if false, use pathtracer
"bidirectional" "true" --Use bidirectional path tracing / bidirectional MLT?
"hybrid" "true" --If enabled, direct lighting is computed with path tracing.
-- Indirect lighting is computed with MLT.

Hmm.. Lets try some more

Posted: Sat May 05, 2007 11:50 pm
by CTZn
Exactly CZTn

Two artifacts two different issues:

1) White moss on water
2) Black region where beach meets water on the right side of the image.
Fine.

I agree there is an issue with 2), obviously. Nasty boy what a scene you made :lol:

For 1) don't expect too much from interpolation, for water a bump map should have a very low contrast locally (at pixels level). Think wavelets as sine functions, there should not be |_| sharp angles in a bump map I think or it would induce noise (that's an old technique to fake blurred reflections as you know). Maybe apply some noise reduction or gaussian blur to the bump map.

Hoping I get you right...

Posted: Sat May 05, 2007 11:55 pm
by Kram1032
I know, that's not the problem, but I think, the water is too blue...

"simple reflective surface" - does that mean, it doesn't have thickness? or just very few?
Then, you should change it, it should go through the ground... at least a bit.

Posted: Sun May 06, 2007 12:13 am
by Deus
It is thick (down to the water bottom) with an internal medium with some absorption.

Posted: Sun May 06, 2007 12:20 am
by Kram1032
aha, ok.
I guess, then, you should lower the absorbtion a bit...
Or is it the angle of sight, that let it appear to be blue from the coast-line on?
Could you do an other render, where the camera is like one's standing on the beach, looking down to the water?

Posted: Sun May 06, 2007 1:06 am
by Deus
another render. removed water bump (and trees)

Posted: Sun May 06, 2007 1:08 am
by Kram1032
the black coastline isn't a normalmap probblem...
Just normal smoothing, or so...