LuxCore AOV outputs are strange When using few spp(1spp)

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: LuxCore AOV outputs are strange When using few spp(1spp)

Post by Dade »

MonkeyDLuffy wrote: Tue Apr 28, 2020 2:00 pm 1. I still think that the geometric channels' outputs are unrelated to the material properties(If there is a problem with my understanding, please let me know).
It is not true, see below.
MonkeyDLuffy wrote: Tue Apr 28, 2020 2:00 pm Or LuxCore's method is on the contrary with my view, if this is the case, please tell me the relevant code(I am learning LuxCore's code).
Check the scene intersect function: https://github.com/LuxCoreRender/LuxCor ... e.cpp#L585
As you see the ray is continued to trace if the "!transp.Black()".

Now check material "bsdf->GetPassThroughTransparency(backTracing)": https://github.com/LuxCoreRender/LuxCor ... al.cpp#L87
The material is solid/not solid with a distribution equal to the opacity.
MonkeyDLuffy wrote: Tue Apr 28, 2020 2:00 pm 2. I am curious about that the edge of the object is not smooth, as the picture showing.
edge.PNG
"the edge of the object"
Again, on an edge pixel, you hit/not hit the object with a probability equal to the how much the object cover the pixel. It is anti-aliasing done by super-sampling, it is how MC integration work. MC is based on the idea of having many samples and converging to the correct solution on the long run.
Indeed, with only one sample, the error can be very high.
MonkeyDLuffy wrote: Tue Apr 28, 2020 2:00 pm 3. I'd like to reconfirm that the reason for this situation, whit and bright spots. After the rendering was over, after a while, I saved the pictures. There still are annoying white spots. Every pixel should has been rendered.
white spots.PNG
"whit and bright spots"
This one is a problem I have not yet understood and may be a bug if the material is just plain matte.
Support LuxCoreRender project with salts and bounties
User avatar
fluxfish
Posts: 8
Joined: Thu Aug 09, 2018 9:27 pm

Re: LuxCore AOV outputs are strange When using few spp(1spp)

Post by fluxfish »

Dade wrote: Tue Apr 28, 2020 9:50 am
MonkeyDLuffy wrote: Tue Apr 28, 2020 8:02 am Add a cube object and use glossy translucent material node, set "Opacity" to 0.500, then rendering with 2 SPP. I got the the following pitcures.
But if you set opacity to 0.5, it will hit a face of the cube only 50% of the times so this result is normal (or am I missing something ?). This is due to the reason Zeealpal linked as first answer. It is not like the ray color is multiplied by 0.5 and the path always continued, Opacity is really the probability to hit the surface.
hmm, don't want to eat up your time but is this the only way Lux handles those situations? Stopping a path at a translucent material, let's take glass, is less efficient than continue and having a look for what's behind the glass, what's next. One of the next rays might hit the same object just next to this point..
The concept of halt-conditions like ..%-ray-energy and nb bounces, to not stupidly follow ultra-bounces, might come into mind - or is 1st thing only with bidir and source-rays reasonable?
Sorry for asking, honestly I am more around with optics-calculation and mostly source-rays or photon-mapping - camera-paths, engines unidirectional/bidir, still a bit twisted sometimes.. :lol:
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: LuxCore AOV outputs are strange When using few spp(1spp)

Post by Dade »

fluxfish wrote: Tue Apr 28, 2020 9:21 pm hmm, don't want to eat up your time but is this the only way Lux handles those situations? Stopping a path at a translucent material, let's take glass, is less efficient than continue and having a look for what's behind the glass, what's next. One of the next rays might hit the same object just next to this point..
The concept of halt-conditions like ..%-ray-energy and nb bounces, to not stupidly follow ultra-bounces, might come into mind - or is 1st thing only with bidir and source-rays reasonable?
Sorry for asking, honestly I am more around with optics-calculation and mostly source-rays or photon-mapping - camera-paths, engines unidirectional/bidir, still a bit twisted sometimes.. :lol:
It is called "ray split": it is when you follow 2 (or more) possible paths of lights (like glass reflection/refraction). LuxCore doesn't use it because it is very detrimental for GPUs (often it is not possible at all) .
Support LuxCoreRender project with salts and bounties
MonkeyDLuffy
Posts: 8
Joined: Thu Apr 23, 2020 1:50 am

Re: LuxCore AOV outputs are strange When using few spp(1spp)

Post by MonkeyDLuffy »

Check the scene intersect function: https://github.com/LuxCoreRender/LuxCor ... e.cpp#L585
As you see the ray is continued to trace if the "!transp.Black()".

Now check material "bsdf->GetPassThroughTransparency(backTracing)": https://github.com/LuxCoreRender/LuxCor ... al.cpp#L87
The material is solid/not solid with a distribution equal to the opacity.
I viewed these code, and found that LuxCore's Geometric data are saved in here https://github.com/LuxCoreRender/LuxCor ... e.cpp#L534,
and then https://github.com/LuxCoreRender/LuxCor ... df.cpp#L80.
I havn't got that how does the Opacity affect geometric data.(Or maybe I should continue to learn this part of the code? :?: )
This one is a problem I have not yet understood and may be a bug if the material is just plain matte.
This scene is "Cannelle&Formage", downloaded from this URL https://luxcorerender.org/example-scenes/. Render this scene with 1 SPP or 2 SPP, several channels selected, such as POSITION, SHADING_NORMAL, ALBEDO.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: LuxCore AOV outputs are strange When using few spp(1spp)

Post by Dade »

MonkeyDLuffy wrote: Wed Apr 29, 2020 1:43 pm I havn't got that how does the Opacity affect geometric data.(Or maybe I should continue to learn this part of the code? :?: )
It is explained in my previous post: a ray hits the object, the opacity is checked, it is randomly (%50 in your test) solid or transparent, if transparent the ray tracing is continued and the hit is like never happen.
Support LuxCoreRender project with salts and bounties
Post Reply