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.
daros
Posts: 209
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros » Wed Oct 06, 2021 10:50 am

No one that can help me with this? Please!

daros
Posts: 209
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros » Mon Oct 11, 2021 7:17 am

here i built a simplified scene of the problem.
View 01 600x300.png
Attachments
volumetrics4.zip
(1.19 MiB) Downloaded 6 times

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

Re: Volumetrics issues

Post by Dade » Mon Oct 11, 2021 10:47 am

daros wrote:
Mon Oct 11, 2021 7:17 am
here i built a simplified scene of the problem.
Your volume definitions are wrong:

1) Sun and Sky light sources are outside your "fog" box so they must not have the ".volume" definition as "fog".

2) you have various interior/exterior surface definitions as "fog". They have to be removed. You are mixing 2 different kind of approaches to volume definitions (define camera and light sources volumes Vs. define all interior/exterior volume definitions).

3) there was bug with not-NULL transparent surfaces when the interior and the exterior volumes are the same (your glossytranslucent leafs). Use the latest sources with the fix.

The attached scene works fine:

vol.jpg
Attachments
volumetrics4bis.zip
(1.2 MiB) Downloaded 7 times
Support LuxCoreRender project with salts and bounties

bartek_zgo
Posts: 83
Joined: Mon Oct 26, 2020 11:42 am

Re: Volumetrics issues

Post by bartek_zgo » Mon Oct 11, 2021 1:33 pm

Thanks Dade. I'll remove volume definition from sky. Sorry for the mistake but I understood from your post that I have to set them:
Dade wrote:
Thu Sep 30, 2021 9:29 am

And light source volumes:

Code: Select all

[...]
scene.lights.84678.volume = "envVolume"
[...]
scene.lights.84678_sky1.volume = "envVolume"
[...]
We have try to remove internal/exterior volumes but this give us renders without light volumetric.
I'm recompiling luxcore and we will check everything again.

bartek_zgo
Posts: 83
Joined: Mon Oct 26, 2020 11:42 am

Re: Volumetrics issues

Post by bartek_zgo » Tue Oct 12, 2021 8:03 am

Hi, Dade. I can't see the light volume in your previous post. I thought it might be a problem with low samples, so I repeated the render:
interior_exterior_disabled.PNG
Then I analyzed what you said and decided to turn on the interior/exterior volume for the material that has the emitter on (I removed the comment in lines 402 and 403 in your zip)

Code: Select all

scene.materials.89597_3.volume.interior = "envVolume"
scene.materials.89597_3.volume.exterior = "envVolume"
And it looks correct! I hope I did this correctly:
interior_exterior_enabled.PNG
So from our tests, it looks like the light will produce volume if the volumetrics are assigned to the light source. If they are not assigned, we will not see the light volume. But what if the light source is outside the volume? The light volume should only be inside the fog, not outside.
light outside fog.PNG

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

Re: Volumetrics issues

Post by Dade » Tue Oct 12, 2021 9:29 am

bartek_zgo wrote:
Tue Oct 12, 2021 8:03 am
So from our tests, it looks like the light will produce volume if the volumetrics are assigned to the light source.
You have to assign light volumes according their placement: if a light is inside a volume (cone light) assign the volume, if the light is outside (sun and sky) don't).
Support LuxCoreRender project with salts and bounties

daros
Posts: 209
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros » Tue Oct 12, 2021 12:41 pm

Hi, dade, thanks, in fact this is what we did on the last picture of Bartek's post. The problem is that the volumetric should not start at the light source but at the beginning of the fog cloud. Is there a way to obtain this?

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

Re: Volumetrics issues

Post by Dade » Tue Oct 12, 2021 3:57 pm

daros wrote:
Tue Oct 12, 2021 12:41 pm
Hi, dade, thanks, in fact this is what we did on the last picture of Bartek's post. The problem is that the volumetric should not start at the light source but at the beginning of the fog cloud. Is there a way to obtain this?
Have you not assigned volumes to sun and sky ?
Support LuxCoreRender project with salts and bounties

daros
Posts: 209
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Volumetrics issues

Post by daros » Wed Oct 13, 2021 10:02 am

Hi Dade, in this scene we followed your advice however the problem persists... The light beam of the spot should start only wen the light intersects with the fog box. Instead it starts at the origin of the spot where there is not fog at all.
View 03 600x300.png
Attachments
light_outside_fog.zip
(1.31 MiB) Downloaded 6 times

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

Re: Volumetrics issues

Post by Dade » Thu Oct 14, 2021 9:17 am

daros wrote:
Wed Oct 13, 2021 10:02 am
Hi Dade, in this scene we followed your advice however the problem persists... The light beam of the spot should start only wen the light intersects with the fog box. Instead it starts at the origin of the spot where there is not fog at all.
You are still declaring the wrong volume for sun and sky:

Code: Select all

## REMOVE THIS:
scene.lights.84682_sky1.volume = "envVolume"
##
scene.lights.84682_sky1.gain = 2 2 2
scene.lights.84682_sky1.transformation = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
scene.lights.84682_sky1.id = 0
scene.lights.84682_sky1.temperature = -1
scene.lights.84682_sky1.temperature.normalize = 0
scene.lights.84682_sky1.visibility.indirect.diffuse.enable = 1
scene.lights.84682_sky1.visibility.indirect.glossy.enable = 1
scene.lights.84682_sky1.visibility.indirect.specular.enable = 1
scene.lights.84682_sky1.type = "sky2"
scene.lights.84682_sky1.dir = 0.5617219 0.6238551 0.5433906
scene.lights.84682_sky1.turbidity = 1.04
scene.lights.84682_sky1.groundalbedo = 0.5 0.5 0.5
scene.lights.84682_sky1.ground.enable = 0
scene.lights.84682_sky1.ground.color = 0.5 0.5 0.5
scene.lights.84682_sky1.ground.autoscale = 1
scene.lights.84682_sky1.distribution.width = 512
scene.lights.84682_sky1.distribution.height = 256
scene.lights.84682_sky1.visibilitymapcache.enable = 0
## REMOVE THIS:
scene.lights.84682.volume = "envVolume"
##
scene.lights.84682.gain = 0.5 0.5 0.5
scene.lights.84682.transformation = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
scene.lights.84682.id = 0
scene.lights.84682.temperature = -1
scene.lights.84682.temperature.normalize = 0
scene.lights.84682.visibility.indirect.diffuse.enable = 1
scene.lights.84682.visibility.indirect.glossy.enable = 1
scene.lights.84682.visibility.indirect.specular.enable = 1
scene.lights.84682.type = "sun"
scene.lights.84682.dir = 0.5617219 0.6238551 0.5433906
scene.lights.84682.turbidity = 1.04
scene.lights.84682.relsize = 1
##
And using wrong volume declaration for the disk light source too:

Code: Select all

##
scene.materials.89671_1.type = "glossy2"
scene.materials.89671_1.kd = "0.3185468 0.1529262 0.06480328"
scene.materials.89671_1.ks = "0.05"
scene.materials.89671_1.uroughness = "0.0218"
scene.materials.89671_1.vroughness = "0.0218"
scene.materials.89671_1.ka = "0 0 0"
scene.materials.89671_1.d = "0"
scene.materials.89671_1.index = "0 0 0"
scene.materials.89671_1.multibounce = 0
scene.materials.89671_1.doublesided = 0
scene.materials.89671_1.transparency.shadow = 1 1 1
scene.materials.89671_1.id = 16776960
scene.materials.89671_1.emission.gain = 1 1 1
scene.materials.89671_1.emission.power = 1e+08
scene.materials.89671_1.emission.normalizebycolor = 1
scene.materials.89671_1.emission.efficency = 5.5
scene.materials.89671_1.emission.theta = 90
scene.materials.89671_1.emission.id = 0
scene.materials.89671_1.emission.importance = 1
scene.materials.89671_1.emission = "0.7835379 0.48515 0.2961383"
scene.materials.89671_1.emission.mapfile = "imagemap-00001.exr"
scene.materials.89671_1.colorspace = "nop"
scene.materials.89671_1.storage = "float"
scene.materials.89671_1.emission.temperature = -1
scene.materials.89671_1.emission.temperature.normalize = 0
scene.materials.89671_1.emission.directlightsampling.type = "AUTO"
scene.materials.89671_1.bumpsamplingdistance = 0.001
## REMOVE THIS:
scene.materials.89671_1.volume.interior = "envVolume"
scene.materials.89671_1.volume.exterior = "envVolume"
##
scene.materials.89671_1.visibility.indirect.diffuse.enable = 1
scene.materials.89671_1.visibility.indirect.glossy.enable = 1
scene.materials.89671_1.visibility.indirect.specular.enable = 1
scene.materials.89671_1.shadowcatcher.enable = 0
scene.materials.89671_1.shadowcatcher.onlyinfinitelights = 0
scene.materials.89671_1.photongi.enable = 1
scene.materials.89671_1.holdout.enable = 0
##
The 3 light sources are outside the "fog" box and they must have no volume assigned. It will than work fine:

vol.jpg
Support LuxCoreRender project with salts and bounties

Post Reply