problem with orthographic camera

Use this forum for general user support and related questions.
mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

problem with orthographic camera

Post by mick » Sat Feb 09, 2019 3:37 pm

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 1091 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 1091 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 1091 times
Please help me. I'm completely lost.

Thx

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

Re: problem with orthographic camera

Post by Dade » Sat Feb 09, 2019 4:02 pm

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.
Support LuxCoreRender project with salts and bounties

mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: problem with orthographic camera

Post by mick » Sat Feb 09, 2019 5:52 pm

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

User avatar
epilectrolytics
Donor
Donor
Posts: 529
Joined: Thu Oct 04, 2018 6:06 am

Re: problem with orthographic camera

Post by epilectrolytics » Sat Feb 09, 2019 6:06 pm

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.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: problem with orthographic camera

Post by mick » Sat Feb 09, 2019 9:25 pm

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?
Attachments
plate.blend
(613.84 KiB) Downloaded 33 times

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

Re: problem with orthographic camera

Post by Dade » Sat Feb 09, 2019 9:39 pm

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
Support LuxCoreRender project with salts and bounties

mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: problem with orthographic camera

Post by mick » Sat Feb 09, 2019 9:57 pm

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???

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

Re: problem with orthographic camera

Post by Dade » Sat Feb 09, 2019 10:19 pm

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.
Support LuxCoreRender project with salts and bounties

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

Re: problem with orthographic camera

Post by B.Y.O.B. » Sat Feb 09, 2019 10:34 pm

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.
Support LuxCoreRender project with salts and bounties

mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: problem with orthographic camera

Post by mick » Sat Feb 09, 2019 10:53 pm

OK, but this bring me back to the point that orthographic camera does not work.

Post Reply