Volumetrics issues

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
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Volumetrics issues

Post by Dade »

Dade wrote: Thu Sep 30, 2021 8:46 am
daros wrote: Tue Sep 28, 2021 11:16 am Hi Dade we followed your advice but still get this wen turning volumetrics on:
There is a problem when hitting the leaf back faces and "exiting" from something you never entered. I'm adding light source volume definition (like camera) to totally by pass the problem for BiDir (camera-only volume definition was enough for Path because paths go only in one direction).
I added the support for light source volume definition (pretty much useful only for BiDir).

You can now set the camera volume:

Code: Select all

[...]
scene.camera.volume = "envVolume"
[...]
And light source volumes:

Code: Select all

[...]
scene.lights.84678.volume = "envVolume"
[...]
scene.lights.84678_sky1.volume = "envVolume"
[...]
and the rendering will work without having to set all materials volumes (indeed with the exception of "fog" box):

fog.jpg
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Volumetrics issues

Post by Dade »

daros wrote: Tue Sep 28, 2021 11:39 am Let me explain. I'm looking for a solution that makes the user experience identical to the real thing.
Imagine a cloud (fog box). Inside the cloud an almost closed space. Inside this almost closed space a spot light. Everything that happens inside this cloud is by default governed by the substance of the cloud.
Therefore: If I am outside the cloud I see the blue sky and a cloud in front of me. If I am inside the cloud I see fog and everything is regulated by the fog. If I turn on a light, I see the light diffused through the fog.

I'm looking for a set-up that allows me to have the different experiences by simply moving the camera from outside the cloud to inside the cloud. That's it, can it be done?
LuxCore scene definition is static (i.e. no information of "moving the camera from outside the cloud to inside the cloud"). So it is up to you (i.e. your app.) to check if the camera origin (of current frame) is inside or outside the "fog" box and to change the camera volume according.

The same it is now true for light sources.

It is actually pretty easy: just check if a point (i.e. camera position) is inside and axis aligned box.
Support LuxCoreRender project with salts and bounties
User avatar
DionXein
Posts: 81
Joined: Mon Jun 01, 2020 10:22 am

Re: Volumetrics issues

Post by DionXein »

May I ask a question - is there any tutorial/how-to info about volumes workflow? Because I can't understand - why LuxCore defines not just interior volume (which is understandable and work almost like in other render systems) but exterior volume? Why, for example, glass of vine should describe atmospheric volume around? What for needed this exterior volume?(Maybe there is not so oblivious examples, but I can't find any)

And about camera volume detect - what's this option for? I never seen anything like this in other render systems. Is it gives any advantages?
zeealpal
Posts: 59
Joined: Wed Jan 10, 2018 12:25 pm

Re: Volumetrics issues

Post by zeealpal »

DionXein wrote: Thu Sep 30, 2021 9:42 am May I ask a question - is there any tutorial/how-to info about volumes workflow? Because I can't understand - why LuxCore defines not just interior volume (which is understandable and work almost like in other render systems) but exterior volume? Why, for example, glass of vine should describe atmospheric volume around? What for needed this exterior volume?(Maybe there is not so oblivious examples, but I can't find any)
Experts please correct me if I'm wrong!

Assume an IoR of:
Air 1.0
Water 1.33
Glass 1.5.

The effective IoR for:
Air / Glass surface is 1.5
Air / Water surface is 1.33
Water / Glass surface is 1.12

Imagine a fluid simulation where water is touching glass, for accuracy you don't want rays at the water / glass to use 1.33 or 1.5 from the surface, they should use 1.12 depending on the exterior / interior volume.

When using the volume priorities, if you set the glass volume to a higher(?) priority than the water in LuxCore, than where volumes intersect it will use the glass volume. That allows a clean interface between the glass and water in a fluid simulation (often has overlapping meshes) while correctly simulating the IoR between all the surface combinations.
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros »

Dade wrote: Thu Sep 30, 2021 9:33 am
daros wrote: Tue Sep 28, 2021 11:39 am Let me explain. I'm looking for a solution that makes the user experience identical to the real thing.
Imagine a cloud (fog box). Inside the cloud an almost closed space. Inside this almost closed space a spot light. Everything that happens inside this cloud is by default governed by the substance of the cloud.
Therefore: If I am outside the cloud I see the blue sky and a cloud in front of me. If I am inside the cloud I see fog and everything is regulated by the fog. If I turn on a light, I see the light diffused through the fog.

I'm looking for a set-up that allows me to have the different experiences by simply moving the camera from outside the cloud to inside the cloud. That's it, can it be done?
LuxCore scene definition is static (i.e. no information of "moving the camera from outside the cloud to inside the cloud"). So it is up to you (i.e. your app.) to check if the camera origin (of current frame) is inside or outside the "fog" box and to change the camera volume according.

The same it is now true for light sources.

It is actually pretty easy: just check if a point (i.e. camera position) is inside and axis aligned box.
But if i want to make an animation where the camera travels from outside the cloud to inside the cloud how can i manage to have a smooth an natural transition between the two status?
Anyway thanks dade, i think we are almost there.
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros »

Hi Dade, now we have two other problems.

1) After you update and following your instructions we got a few other wired results for theleaves.

no volumetrics:
no volume_1.jpg

with volumetrics (no internal/exteranl volume definition on the leaves)
with volume_1.jpg

with volumetrics (with internal/exteranl volume definition on the leaves)
with volume_2.jpg

from here you can download the luxcore file:
https://drive.google.com/file/d/1yCemje ... sp=sharing



2) I get the volumetrics of light emitting materials only if i define internal/external volume for everything.
If i do not assign any internal/exteranal volume to everything volumetrics of light emitting surfaces do not show up.
So in order to have volumetrics of lights we ketpt internal/external assigned to everything.
Is that correct?




But i get the cloud wen the camera is outside, which is cool!
View 04 600x300_1.jpg
kintuX
Posts: 809
Joined: Wed Jan 10, 2018 2:37 am

Re: Volumetrics issues

Post by kintuX »

An old school trick. When nothing else helps, put camera in "a bubble of air". Then you should seamlessly transit through mediums/volumes.

But I don't know, if this means a bug or just a design flaw.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Volumetrics issues

Post by Dade »

daros wrote: Mon Oct 04, 2021 10:38 am from here you can download the luxcore file:
https://drive.google.com/file/d/1yCemje ... sp=sharing
You are doing it wrong, you haven't removed the materials volumes:
Dade wrote: Thu Sep 30, 2021 9:29 am and the rendering will work without having to set all materials volumes (indeed with the exception of "fog" box):
Support LuxCoreRender project with salts and bounties
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros »

Hi Dade, we did but as i wrote in this case the backfaced leaves disappear completely and i do not get any volumetrics form lights.
Here is the file with material volumes off:
https://drive.google.com/file/d/1NXbxk- ... sp=sharing
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros »

Hi dade, i know the following files do have still the wrong interior/exterior settings.

But would someone be able to help me to set them correctly in order to get the correct leaves in the closeup and still keep the outside-fog look?

Thanks!
inside fog_1.jpg
outside fog_1.jpg



Names are inverted, sorry

inside fog
https://drive.google.com/file/d/1HOErn3 ... sp=sharing

outside fog
https://drive.google.com/file/d/1PRom6W ... sp=sharing
Post Reply