Want to have a diffuse air inside a room and clear air outside

Use this forum for general user support and related questions.
lighting_freak
Posts: 162
Joined: Thu Jan 18, 2018 6:02 pm

Re: Want to have a diffuse air inside a room and clear air outside

Post by lighting_freak » Sat Jan 05, 2019 9:21 pm

Hi both,

Lot of information to catch for me... thanks for your frequent replies.
The half window beam happens where the rays coming from the sun through the window hit the second windows inside the room.
Made this finding last night on my own. It also creates this visible beam if you remove the first window completly. :D
Btw., in your new file, the interior windows were not fixed correctly, your old glass-to-dust plane does not overlap with the remaining glas-box. Also, I would run a "remove doubles" after joining to really fuse them back into one object.
Sorry for the troubles the blend file caused. I'm afraid all the adding and removing of faces damaged the data quality. I'll set it up new.
IIRC with Bidir you currently have the problem that you can't define a starting volume for light sources (apart from meshlights).
So you have to resort to tricks like boxes in some cases because of this oversight/missing feature.
I have already realized that this volume feature is missing for all other light sources than mesh-lights.
Could we integrate such a feature in upcoming versions, please?
Does it also infect the handling of the "environment" light sources?
I thought Sky and Sun and HDRI rays does always start in "world volume". Further I thought that the detected rays have to be in the camera volume. While having those two information, an unique solution of this volume problem should be possible (at least for this example).
For the unidirectional engines this doesn't matter because all rays start from the camera there.
Do you mean that a path engine may understand the setup correctly? I'll give it a try.

In general, is there something wrong with my way of thinking or did we found kind of a bug?

BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Want to have a diffuse air inside a room and clear air outside

Post by CodeHD » Sun Jan 06, 2019 6:21 pm

lighting_freak wrote:
Sat Jan 05, 2019 9:21 pm
Hi both,

Lot of information to catch for me... thanks for your frequent replies.
Nice to get example scences from which to learn ;)
lighting_freak wrote:
Sat Jan 05, 2019 9:21 pm
Sorry for the troubles the blend file caused. I'm afraid all the adding and removing of faces damaged the data quality. I'll set it up new.
I don't think it is "illegal" in general to have disconected meshes, but just think about what happens when a ray exits the object between two faces...
Furthermore, I use blender also to create objects for 3D-printing. There you start getting the real issues with this sort of sh*t ;)
lighting_freak wrote:
Sat Jan 05, 2019 9:21 pm
Do you mean that a path engine may understand the setup correctly? I'll give it a try.
As you probably learned by now, it won't work (even if it "understands" the scene), as Path is not as good to render this situation.
lighting_freak wrote:
Sat Jan 05, 2019 9:21 pm
In general, is there something wrong with my way of thinking or did we found kind of a bug?
I don't think we discovered a bug so far.
In your very first post, you prensented the case with a diffuse world setup, where the air outisde looked foggy, which seems to be both relaistic and reasonable in terms of the render engine given all that we discussed in the other posts.
Your current setup creates the somehwat ill-defined situation where a ray exits an object into the world-volume, but gets told by the object it enters something else. Now again, I lack source code knowledge to judge what is supposed to happen, but at least it sounds like potential trouble ;)

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Want to have a diffuse air inside a room and clear air outside

Post by CodeHD » Sun Jan 06, 2019 8:01 pm

B.Y.O.B. wrote:
Sat Jan 05, 2019 4:24 pm
I think the sun is placed on a bounding sphere that encloses all meshes in the scene, plus some margin. Look into the sun lamp code to see how it is calculated exactly.
So far I partially found what you described. However, it is difficult to track all functions when you are new to the code ;)
In any case, it might be interesting to consider whether the position of the sun lamp is included in the bounding sphere or not.

I played around a bit with this in lighting_freak's scene, but couldn't get a result there. No matter how low I set the scattering scale, the background ends up just diffuse. The margin you mentioned might be intresting here, but as I said I didn't find it yet. Actually, if I get too low with scattering scale, the background actually becomes black :?

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

Re: Want to have a diffuse air inside a room and clear air outside

Post by Dade » Sun Jan 06, 2019 8:07 pm

CodeHD wrote:
Sun Jan 06, 2019 8:01 pm
In any case, it might be interesting to consider whether the position of the sun lamp is included in the bounding sphere or not.
Nope because sun light definition include only the direction, not the position, in LuxCore SDL. However, for completeness, it is the bounding sphere of the scene and the camera position.
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Want to have a diffuse air inside a room and clear air outside

Post by CodeHD » Sun Jan 06, 2019 8:52 pm

Dade wrote:
Sun Jan 06, 2019 8:07 pm
Nope because sun light definition include only the direction, not the position, in LuxCore SDL. However, for completeness, it is the bounding sphere of the scene and the camera position.
Ok thanks for the clarification.

I followed this up a bit more with a fresh and simpler setup consisting only of 4 cubes of different material and color, and a camera. I observe the folllowing:
  1. Case: Only Sky and homogeneous world volume, trying various scatterign scale values between 1.0 and 1e-06.
    Observation: The background is never clearand gets darker with reduced scale. The illumination of the cubes changes to some degree but they don't disappear.
    Question: Is it possible that with a homogeneous (non-clear) world volume, the sky background itself is not shown anymore, only its scattered part.
  2. Case: Sun and homogeneous world volume.
    Observation: Same as for the Sky-light. In addition, a line perpendicular to the sun-direction is rendered.
  3. Case: Heterogeneous world volume.
    Observation: All sorts of odd behaviour. With the Sky lamp, the background is always clear, the color of the cubes fades to grey for high scattering scales and or large max. step size. With only Sun-light, anything from everything is black, rendered as with clear volume, and diffuse scatter only in direct line between the cubes and the sun. For the latter, try a scattering scale of 0.05.
  4. No difference for all above cases between Path and BiDir.
Attachments
world_volume_test.blend
(567.4 KiB) Downloaded 51 times
hetero.png
Homo_Sun.png

lighting_freak
Posts: 162
Joined: Thu Jan 18, 2018 6:02 pm

Re: Want to have a diffuse air inside a room and clear air outside

Post by lighting_freak » Mon Jan 07, 2019 7:20 am

Hi there,

may thanks do Dade joining the thread.
I think I found a way to solve the diffuse air inside issues. It works without boxes, but is hard to setup.

EDIT:
Could you tell me please, how lux core render determines the volume were the ray is in?
Form my current observations it seems to be the external volume of the first intersection.
But in that case the volume on ray's way from camera to first wall may ignore that its already running through a diffuse volume...

Every surface (also the ones that are reflective only) has to have a set external volume.
Further on the world volume can be unset and the camera volume remains in auto-detect mode.

This is my sample file:
Diffuse_World_Volume.blend
(1.25 MiB) Downloaded 61 times
This is the result image:
Diffuse_World.jpg
BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease

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

Re: Want to have a diffuse air inside a room and clear air outside

Post by Dade » Mon Jan 07, 2019 10:05 am

lighting_freak wrote:
Mon Jan 07, 2019 7:20 am
Form my current observations it seems to be the external volume of the first intersection.
Yes if camera volume and world volume are not explicitly set.
lighting_freak wrote:
Mon Jan 07, 2019 7:20 am
But in that case the volume on ray's way from camera to first wall may ignore that its already running through a diffuse volume...
Just explicitly set the camera volume or the world volume (and disable camera "auto-volume" option), camera rays will use the defined volume in that case.
Support LuxCoreRender project with salts and bounties

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

Re: Want to have a diffuse air inside a room and clear air outside

Post by Dade » Mon Jan 07, 2019 11:20 am

CodeHD wrote:
Sun Jan 06, 2019 8:52 pm
Question: Is it possible that with a homogeneous (non-clear) world volume, the sky background itself is not shown anymore, only its scattered part.
It is shown but the its, in practice, never directly reachable: a scattering event over a ray will always happen before to reach the sky. Sky/HDR/Distant/etc. are called infinite light sources for a good reason.
No matter how low is the scattering probability, it will always happen before to reach the "infinite" distance of Sky/HDR/Distant/etc.

If you want to see the Sky/HDR/Distant/etc. you have to use a volume with a finite extension, if you use the world volume, it is unavoidable (and correct) to not be able to see the background because it is "infinite".
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Want to have a diffuse air inside a room and clear air outside

Post by CodeHD » Mon Jan 07, 2019 11:44 am

Dade wrote:
Mon Jan 07, 2019 11:20 am
Sky/HDR/Distant/etc. are called infinite light sources for a good reason.
Makes sense as an explanation for what we observed. But let me ask this: Is there any reason it is not placed on the bounding sphere like the sun-lamp?
If it were, one could still manually place a larger enclosing volume if desired, but the result would be more "as expected" when not using it.

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

Re: Want to have a diffuse air inside a room and clear air outside

Post by B.Y.O.B. » Mon Jan 07, 2019 12:35 pm

CodeHD wrote:
Mon Jan 07, 2019 11:44 am
If it were, one could still manually place a larger enclosing volume if desired
But this would make the bounding sphere larger as well and you gain nothing.
Support LuxCoreRender project with salts and bounties

Post Reply