Page 1 of 3

problem with orthographic camera

Posted: Sat Feb 09, 2019 3:37 pm
by mick
Hi,

I've a simple scene: a box with open top, roughly a quarter of the top covered by a glass plate, the sun in zenith, no sky2 or other lights. Just the bottom of the box and a black plane below that bottom is camera visible.

Rendered with default camera origin just below the top looking to the center of the bottom looks like I would expect: a quarter in partial shadow
image_rgb_persp_far.png
image_rgb_persp_far.png (4.73 KiB) Viewed 5855 times
When I change to orthographic camera at same position the result becomes odd: the shadow is lighter than the fully irradiated area
image_rgb_ortho_far.png
image_rgb_ortho_far.png (9.56 KiB) Viewed 5855 times
The only difference is:

Code: Select all

        # "scene.camera.type", "orthographic",
        # "scene.camera.screenwindow", window,
When I move the orthographic camera close to the bottom the result is even stranger: light shadow with circular pattern (from sun, shadow of cam???)
image_rgb.ortho_close.png
image_rgb.ortho_close.png (8.92 KiB) Viewed 5855 times
Please help me. I'm completely lost.

Thx

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 4:02 pm
by Dade
mick wrote: Sat Feb 09, 2019 3:37 pm I've a simple scene: a box with open top, roughly a quarter of the top covered by a glass plate, the sun in zenith, no sky2 or other lights. Just the bottom of the box and a black plane below that bottom is camera visible.
I assume you are using a path tracer rendering engine. It is nearly impossible for a path tracer to find the tiny sun circle in the sky. As a proof, just try to render a room with glass windows. It is the reason why "archglass" material exists and why it should be used in the room case. The other option is to use bidirectional path tracing: it is able to render this type of light setup.

There may be other problems (like numerical precision problems) in your scene but I can not add more without having a scene to test.

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 5:52 pm
by mick
No, I'm using BIDIRCPU.

I need to simulate optical lenses. I've no idea what archglass does. But I assume it does some tweaks, so it would prevent physical realism for sculptured lenses, right?

I don't think that there is a numeric issue. There are no extreme dimensions or ratios.

What can I send you to check? I've no blender file. Everything is generated with pyluxcore. I created the scn, cnf, and ply files. Actually the are already attached to the origninal thread: viewtopic.php?f=4&t=884

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 6:06 pm
by epilectrolytics
Looks like the box has no thickness, i.e. inner and outer walls.
That could cause light leaks at the corners.
Also smoothing can cause weird shadows.

But I don't know Python and have no idea how to inspect the scene without Blender.
Also no experience with orthographic camera here.

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 9:25 pm
by mick
I created the scene in blender, more or less. At least it shows the same strange behavior for orthographic camera.
File attached.

To compare just move to camera to e.g. z=-1 or switch to Perspective.

BTW: How to make objects camera invisible in blender?

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 9:39 pm
by Dade
mick wrote: Sat Feb 09, 2019 9:25 pm BTW: How to make objects camera invisible in blender?
This: viewtopic.php?f=4&t=881#p9419

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 9:57 pm
by mick
Thanks, I found the flag.

I found out that the orthographic rendering looks fine when I change the opacity of the glass to 0. Opacity seems to have no effect on perspective camera.

What is a glass opacity when a volume is defined???

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 10:19 pm
by Dade
mick wrote: Sat Feb 09, 2019 9:57 pm I found out that the orthographic rendering looks fine when I change the opacity of the glass to 0. Opacity seems to have no effect on perspective camera.

What is a glass opacity when a volume is defined???
Opacity is supposed to be used for some very specific rendering task like leafs and masks, it makes the rays just go trough the object like if it doesn't exist. So setting the opacity to 0 is like removing the object from the scene.

Note: Blender plugin uses the "opacity" term while LuxCore SDL "transparency" and 0.0 is translated in 1.0 and vice versa.

Mixing opacity and an already transparent material like glass doesn't make very much sense and can do a huge mess if volumes are involved.

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 10:34 pm
by B.Y.O.B.
Dade wrote: Sat Feb 09, 2019 10:19 pm Note: Blender plugin uses the "opacity" term while LuxCore SDL "transparency" and 0.0 is translated in 1.0 and vice versa.
Actually the 0-1 scale is not reversed.
LuxCore just uses the wrong term in my opinion, because in LuxCore, at "transparency = 1" (true) the object is opaque, while at "transparency = 0" (false) it is transparent. So I use "opacity = 1" (true) for opaque and "opacity = 0" (false) for transparent.

Re: problem with orthographic camera

Posted: Sat Feb 09, 2019 10:53 pm
by mick
OK, but this bring me back to the point that orthographic camera does not work.