No internal reflections inside Glass material

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.
User avatar
74hc595
Posts: 11
Joined: Tue Sep 22, 2020 11:39 am

No internal reflections inside Glass material

Post by 74hc595 » Tue Sep 22, 2020 11:58 am

Hello,
I have problem with Glass material. In a scene where camera is inside glass object volume I can't get reflections on the surface.
When the camera is outside glass object, reflections work as they should.
I've attached rendered image and simple Blender file with this problem.
Attachments
internal_reflections.jpg
internal_reflections.blend
(860.17 KiB) Downloaded 13 times

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

Re: No internal reflections inside Glass material

Post by B.Y.O.B. » Tue Sep 22, 2020 12:19 pm

Reflections of these caustics are SDS paths, which Bidir can not render.
You will need Path + Light Tracing + PhotonGI caustics cache to render them.

User avatar
74hc595
Posts: 11
Joined: Tue Sep 22, 2020 11:39 am

Re: No internal reflections inside Glass material

Post by 74hc595 » Tue Sep 22, 2020 12:22 pm

Thank you!

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

Re: No internal reflections inside Glass material

Post by B.Y.O.B. » Tue Sep 22, 2020 12:27 pm

A note though, looking at a debug rendering of just the caustics cache, the reflection on the surface is very dark. I'm not sure what is responsible for this.

User avatar
74hc595
Posts: 11
Joined: Tue Sep 22, 2020 11:39 am

Re: No internal reflections inside Glass material

Post by 74hc595 » Tue Sep 22, 2020 1:24 pm

I've tried again, this time instead of bidir I used Path + Light Tracing + PhotonGI, but the effect is nearly exactly the same.
If I invert the setup - place camera above the water, light underwater and change camera volume to air, then water reflections look amazing.
When camera is underwater, the reflections are extremely dark. Maybe it's a problem with glass material being viewed from other side?
Attachments
internal_reflections2.png
internal_reflections3.png

User avatar
74hc595
Posts: 11
Joined: Tue Sep 22, 2020 11:39 am

Re: No internal reflections inside Glass material

Post by 74hc595 » Tue Sep 22, 2020 1:28 pm

Also when camera is above water, everything below water is distorted, as it should be, but with camera underwater, things above water are darker, but not distorted.

User avatar
Dade
Developer
Posts: 4810
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: No internal reflections inside Glass material

Post by Dade » Tue Sep 22, 2020 7:41 pm

74hc595 wrote:
Tue Sep 22, 2020 1:28 pm
Also when camera is above water, everything below water is distorted, as it should be, but with camera underwater, things above water are darker, but not distorted.
Are you setting the camera volume (i.e. water instead of air) ?
Support LuxCoreRender project with salts and bounties

User avatar
74hc595
Posts: 11
Joined: Tue Sep 22, 2020 11:39 am

Re: No internal reflections inside Glass material

Post by 74hc595 » Tue Sep 22, 2020 7:59 pm

Yes, in the underwater example camera volume is set to water, and in the example with camera above the water level it is set to air. The normals of the water mesh point upwards, interior is set to water, and exterior is set to air. What is surprising, is that while light gets distorted when in passes into the water and creates caustics, but walls above water level in the first image appear undistorted. When camera is above water everything looks ok. I've attached Blender files for both cases.
Attachments
internal_reflections.blend
(871.45 KiB) Downloaded 15 times
internal_reflections_inv.blend
(871.45 KiB) Downloaded 12 times

User avatar
74hc595
Posts: 11
Joined: Tue Sep 22, 2020 11:39 am

Re: No internal reflections inside Glass material

Post by 74hc595 » Tue Sep 22, 2020 9:20 pm

I've also tried creating two-sided material with Mirror as back material, but nothing changes.

User avatar
Dade
Developer
Posts: 4810
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: No internal reflections inside Glass material

Post by Dade » Wed Sep 23, 2020 11:27 am

74hc595 wrote:
Tue Sep 22, 2020 7:59 pm
Yes, in the underwater example camera volume is set to water, and in the example with camera above the water level it is set to air. The normals of the water mesh point upwards, interior is set to water, and exterior is set to air. What is surprising, is that while light gets distorted when in passes into the water and creates caustics, but walls above water level in the first image appear undistorted. When camera is above water everything looks ok. I've attached Blender files for both cases.
This was tricky to spot:

im2.jpg

You have 3 volumes defined in your scene: "air" (1.0 IOR), "water" (1.33 IOR) and "Volume" (1.55 IOR). And you have two perfectly overlapped volume nodes in water surface material definition:

im1.jpg

with the wrong one (1.5 IOR) connected to the material.

If you fix the volumes, the scene should render as expected.
Support LuxCoreRender project with salts and bounties

Post Reply