Mirror artefacts

Use this forum for general user support and related questions.
Post Reply
CodeHD
Posts: 94
Joined: Tue Dec 11, 2018 12:38 pm

Mirror artefacts

Post by CodeHD » Wed Jan 02, 2019 6:29 pm

While setting up some scene, I came across a strange behaviour with a mirror and Sky-background. Looking somewhat perpendicular at a mirror gives me the following type of artefact:
test.jpg
Blend file attached, consisting of a clean setup of only a mirror and camera, the rest is left pretty much default.
Here is what I can say so far from quick playing around with it:

- happens with all bidir/path + /sobol/MLT/Random combinations
- The artifact is half the size using BiDir than using path
- It can be different between preview and actual render
- Mirror and Glossy material behave the same
- The pattern heavily depens on the camera-mirror distance
- The pattern heavily depends on clipping start, but not clipping stop
- camera FL changes nothing other than zooming in on it
- Using volumes or not makes no difference
- The pattern changes with orientation of the camera/mirror pair. It then appears to be partly cut off (by what??). You can test this by selecting camera+mirror and rotating them around the origin.

What I haven't tested a lot yet is various light sources, i.e. if this only an issue with the background sky.
Attachments
luxerror.blend
(488.41 KiB) Downloaded 27 times

User avatar
B.Y.O.B.
Developer
Posts: 2243
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Mirror artefacts

Post by B.Y.O.B. » Wed Jan 02, 2019 6:46 pm

Your stuff is exactly at the world origin. This causes floating point precision problems.
Solution:
- move everything a bit
- or change the min. epsilon (multiply it by 10)
Attachments
2019-01-02_19-45-52.png
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 94
Joined: Tue Dec 11, 2018 12:38 pm

Re: Mirror artefacts

Post by CodeHD » Wed Jan 02, 2019 7:24 pm

ok thanks, that makes sense and moving stuff around changes things.
It seems to me that it is more of a relative issue though. When I shift the mirror to x=100, I can still get the pattern, although the camera has to be much further away (>10000, compared to 150 previously). In this case, your min.-epsilon method only helps if I multiply it by 1000, whatever all the consequences of adjusting that parameter are...

User avatar
B.Y.O.B.
Developer
Posts: 2243
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Mirror artefacts

Post by B.Y.O.B. » Wed Jan 02, 2019 7:32 pm

I think due to the way IEEE floats are specified, you will always have "bad spots" in the coordinate grid.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 2126
Joined: Mon Dec 04, 2017 8:36 pm

Re: Mirror artefacts

Post by Dade » Wed Jan 02, 2019 8:47 pm

CodeHD wrote:
Wed Jan 02, 2019 7:24 pm
It seems to me that it is more of a relative issue though.
Floating point number precision is not linear or uniform, for instance, it is a lot higher in some range than others. The distance between 2 consecutive values also keep increasing farther you are from the 0.0 and they exhibits many other strange/counter intuitive behaviors when compared to true real numbers.
Unfortunately, it is unavoidable when you approximate the infinite set (i.e. Real numbers) with just 2^32 possible different values.
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 94
Joined: Tue Dec 11, 2018 12:38 pm

Re: Mirror artefacts

Post by CodeHD » Wed Jan 02, 2019 8:50 pm

Dade wrote:
Wed Jan 02, 2019 8:47 pm
Floating point number precision is not linear or uniform, for instance, it is a lot higher in some range than others. The distance between 2 consecutive values also keep increasing farther you are from the 0.0 and they exhibits many other strange/counter intuitive behaviors when compared to true real numbers.
Unfortunately, it is unavoidable when you approximate the infinite set (i.e. Real numbers) with just 2^32 possible different values.
Yeah, Im aware of that, I worded it a bit too mich like a guess ;) I only really wanted to point out the min-epsilon behaviour I observed in case anyone else comes across and reads this.

Post Reply