Mirror artefacts

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
CodeHD
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Mirror artefacts

Post by CodeHD »

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 138 times
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Mirror artefacts

Post by B.Y.O.B. »

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
CodeHD
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Mirror artefacts

Post by CodeHD »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Mirror artefacts

Post by B.Y.O.B. »

I think due to the way IEEE floats are specified, you will always have "bad spots" in the coordinate grid.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Mirror artefacts

Post by Dade »

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
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Mirror artefacts

Post by CodeHD »

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