Hybrid Back/Forward path tracing (aka BiDir without MIS)

Discussion related to the LuxCore functionality, implementations and API.
lighting_freak
Posts: 234
Joined: Thu Jan 18, 2018 6:02 pm

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by lighting_freak »

Hi,

I was hoping that adjustment of the parameters plus the little amount if roughness that is added to surfaces may do the trick...

I'm afraid diffuse volumes doesn't act like a diffuse surfaces as long as they are hidden behind a clear polished surface. Again the last refraction must point into the camera's eye point, which is statistically close to be impossible.

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
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by CodeHD »

One thing I noticed is that you set the glossiness threshold extremely low. This means all your rays will be camera rays so it is effectively standard path tracing. By setting it very high (0.1 was too low) You can actually squeeze something out of it, although it is still a lot slower, only shows a contour of the red face and you need to disable auto brightness because it gets swallowed quickly by fireflies...
untitled.png
I have two more questions, maybe Dade can answer them, related to what epilectrolytics wrote:
epilectrolytics wrote: Wed Jul 03, 2019 6:45 pm Remember, BiDir can render SDS-paths with mesh lights like in your scene, albeit slowly.
Shouldn't that logic then apply equally to normal path tracing, i.e. intersectable lights can be hit?
In this case owever, path tracing returns only black and light tracing shows something.

Similarly, I had tried the other way round that enabling the depth of field on the camera should make it intersectable, since it then has to render from/to a finite (in the physics sense) camera aperture radius? I have found this to have no effect so far.
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

CodeHD wrote: Wed Jul 03, 2019 8:54 pm
epilectrolytics wrote: Wed Jul 03, 2019 6:45 pm Remember, BiDir can render SDS-paths with mesh lights like in your scene, albeit slowly.
Shouldn't that logic then apply equally to normal path tracing, i.e. intersectable lights can be hit?
In this case owever, path tracing returns only black and light tracing shows something.
Yes, path tracing is unbiased and gets all paths right only it may take millions of samples :D

I cannot confirm your observation regarding path balance:
When I set light rays to 100% I get a black render which is the logical thing to expect.
Once camera rays get in the mix, I start to see red fireflies, which is the path tracing finding emitters and may converge after a day or more :D

But aside from this being impractical, light tracing is not contributing so there is no sense in using hybrid on this scene.

BiDir Metropolis on the other hand is way more effective which bothers me because theoretically it should be as effective as PathCPU + metro :?:

Regarding DOF:
That would depend on how the DOF sampling is done.
If the camera is randomly shifted in a theoretical aperture range from sample to sample it would still be impossible to get hit by specular rays.
Only if a "collecting aperture field" was defined it would work.
I have no idea how LuxCore does this.
CodeHD
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by CodeHD »

epilectrolytics wrote: Thu Jul 04, 2019 7:19 am When I set light rays to 100% I get a black render which is the logical thing to expect.
No, not the amount of light rays, the glossiness threshold!
epilectrolytics wrote: Thu Jul 04, 2019 7:19 am Regarding DOF:
...
I have no idea how LuxCore does this.
Neither do I, hence my question :D But yes, could be implemented like that as well...
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by acasta69 »

CodeHD wrote: Thu Jul 04, 2019 8:58 am
epilectrolytics wrote: Thu Jul 04, 2019 7:19 am Regarding DOF:
...
I have no idea how LuxCore does this.
Neither do I, hence my question :D But yes, could be implemented like that as well...
As far as I know, DOF is taken into account by tracing eye rays from slightly different positions to sample the aperture.
I don't think this can make the camera "intersectable"... but let's wait for Dade's answer on this.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by Dade »

acasta69 wrote: Thu Jul 04, 2019 10:43 am As far as I know, DOF is taken into account by tracing eye rays from slightly different positions to sample the aperture.
I don't think this can make the camera "intersectable"... but let's wait for Dade's answer on this.
Yes, only very few BiDirs check paths/camera lens intersection, mostly some research focused BiDir, LuxCore doesn't.
Support LuxCoreRender project with salts and bounties
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by FarbigeWelt »

lighting_freak wrote: Wed Jul 03, 2019 8:23 pm Again the last refraction must point into the camera's eye point, which is statistically close to be impossible.
Correct if a ray should hit a point because a point is probably and per definition without any extension. This would mean you can hit an eye point only if the point is at the position of a convex lens‘ focus point, the point where all pass through rays cross. At this very point never ever any image exists. Of much more interest should be the image plane. Aside of optical real world issues we can consider we have the perfect lens in our math defined system. Place the camera sensor of given size and resolution at the location of image plane. What you get is the intersect-ability of every caught ray now no matter from where it left or in which direction as long as it passes the lens‘ surface, which can be quite big by the way, the ray intersects with one of the sensor‘s pixel in the image plane.

I still cannot follow so called non traceable rays. It actually does not matter for traceability which direction you take. You can step equivalent from image plane to light or vice a versa. Any other model may miss what reality shows every moment in every glimpse. Every simulation not covering what we can see is by experience wrong or lacks something important. Nothing is more real than our experience, specially if experiments confirm with a frequency of at least 15 Hz, day for the day a life long.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

CodeHD wrote: Thu Jul 04, 2019 8:58 am No, not the amount of light rays, the glossiness threshold!
Oops, now I see!
Yes, with higher glossiness threshold light starts to leak around the corners of the cover glass.
If that is supposed to be or an artefact I don't know.
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

FarbigeWelt wrote: Thu Jul 04, 2019 11:25 am I still cannot follow so called non traceable rays.
The renderer does not model a system with lens & sensor.
There is also no image plane.
There's only a point defining the camera position.
For path tracing rays are sent from this point, with the pixel position translated into an angle.
For light tracing to hit that point exactly, well, I don't know if that is possible and if floating point matters here.

If the camera was set at the origin (0,0,0) pointing in X direction and a light was set at 1,0,0 on the X-axis,
could we expect a light ray to be emitted with an angle of zero exactly so it must hit the camera point?
After how many samples it would become probable?
And would it register then?
The camera is not even meant to register something.
If it is visible to a hitpoint, a connection will be constructed and a value registered.
Just like direct light sampling in path tracing, only the other way round.
There is no camera but a target point or point of origin for virtual rays and this point has no properties.
If a property like aperture for DOF is needed, it has to be simulated by shifting the point.

Did I make a point now :?: :? :lol:
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by B.Y.O.B. »

epilectrolytics wrote: Thu Jul 04, 2019 12:59 pm And would it register then?
The camera is not even meant to register something.
I am pretty sure the camera behaves like a spot light (non-intersectible).
Post Reply