dark juice

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.
wasd
Posts: 319
Joined: Tue Apr 24, 2018 7:20 pm

Re: dark juice

Post by wasd »

lacilaci wrote: Sun Aug 18, 2019 10:17 am
wasd wrote: Sun Aug 18, 2019 9:47 am
lacilaci wrote: Sun Aug 18, 2019 7:12 am here's cycles, I don't like the juice look but it demonstrates how it never gets darker in glass (this is without disabling shadows or anything)
Of course it never gets darker, but you're comparing incomparable. Principled BSDF's SSS is fake. I mean, there's no point comparing these two scenes.
Ok, you're right.. So let's not compare them.

How do I make it so that the juice looks just as good in the glass as it does outside?
Some hacks will do, probably :)
If you want them rendered correctly, then there's no way. I think your point is that we need luxcore to render such cases nicely, and I fully agree, as I already said viewtopic.php?f=4&t=1308&start=50#p15621.
CPU Bidir + Metropolis | Core i5-4570
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: dark juice

Post by lacilaci »

I want hacks then... all of them :lol:
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: dark juice

Post by Dade »

I modified few things in your scene (disabled huge variance clamping, using NULL material for juice and couple of other details but none of them should matter for this topic)) just to be in "safe" start point:

orange-start.jpg

The glass material cast a shadow as expected (i.e. because the lack of SDS paths). If I increase the sun size, making possible for eye paths to hit the sun disk, it starts to be possible to render SDS paths. The result using a HUGE sun disk is:

oragne-relsize.jpg

As expected, the juice isn't dark anymore but, indeed, it isn't the same scene. To recap, the software is working as expected (including not being able to render SDS in many cases).

I see only 2 solution to the topic problem:

1) being able to render SDS paths.

2) use some kind of fake to work around the problem.

In both cases, I'm not going to look in any new feature until after the release of v2.2 so we will have to wait before we have general solution to this problem.
For more details about #2 check my next post.
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: dark juice

Post by Dade »

lacilaci wrote: Sun Aug 18, 2019 11:38 am in corona it was introduced as hybrid glass mode back in 2013
https://corona-renderer.com/forum/index ... 51#msg7051

I think it's default behavior unless you specificaly turn on "caustics" option in materials which then renders caustics in newest corona.
It should be, from left o right:

1) true glass;

2) architectural glass;

3) hybrid glass => true glass for eye paths and architectural glass for direct light rays (i.e. shadow rays).

#1 and #2 are symmetrical behaviors and already implemented in LuxCore.

#3 looks like an asymmetrical behavior. It is not like I have some religious motivation against this kind of stuff, it is just it is not going to work with a very long list of stuff: BiDir, MIS, light tracing, PhotonGI, etc. Any time , you do something different from standard path tracing, you are going to have problems.

At the moment, I'm not seeing a way to make hybrid glass work with light paths :?:
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: dark juice

Post by lacilaci »

Dade wrote: Sun Aug 18, 2019 2:37 pm
... it is just it is not going to work with a very long list of stuff: BiDir, MIS, light tracing, PhotonGI, etc. Any time , you do something different from standard path tracing, you are going to have problems.

At the moment, I'm not seeing a way to make hybrid glass work with light paths :?:
1:Bidir
Well from my limited observation luxcore userbase that uses bidir also tends to be against "fakes" so I don't see a problem of this potential feature not being present for bidir. Maybe even reserve whole bidir rendering for simulation features only so that "fake" features won't allow users to break it?

2:LightTracing
I wouldn't suggest using something as hybrid glass as a default behavior so a user that would enable this feature on glass shader would know he's faking glass deliberately..?

3:PhotonGI
I don't see a problem not utilizing photongi for a glass of juice. In fact it would be great if such object would just passthrough light completely so that we could use thick glass panels for complex window systems without needing caustics. Sometimes archglass looks terrible especially if there are multiple layers of glass on screen...

4:MIS
Could this mean performance issues, noisy glass or reflections on glass?

I know that being able to render sds would solve this problem, but I'm a bit worried that the performance will be substantially lower than how lighttracing performs now.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: dark juice

Post by Dade »

lacilaci wrote: Sun Aug 18, 2019 3:10 pm 1:Bidir
[...]
Nope, I will explain may self with an example, let's have the following material:

- it is red for eye paths;

- it is green for light paths;

This material will look:

- red when doing path tracing;

- red when doing path tracing but with green caustics if light tracing is enabled;

- red when doing path tracing but casting green indirect light if PhotonGI is enabled;

- yellow-ish for bidirectional path tracing;

- etc.

As you see, it is a mess.

I can probably come out with a solution that will look like hybrid glass when doing path tracing and like normal glass in any other cases but it will have some odd behavior like having the shadow of hybrid glass and the caustic of a normal glass.

It is a bit hard to predict how this "Frankenstein" material can work in practice. At the end of the day, it is probably worth trying an implementation when I have time (and throw everything out of the window if it doesn't work and/or it is too messy).
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: dark juice

Post by lacilaci »

Dade wrote: Sun Aug 18, 2019 3:44 pm
lacilaci wrote: Sun Aug 18, 2019 3:10 pm 1:Bidir
[...]
Nope, I will explain may self with an example, let's have the following material:

- it is red for eye paths;

- it is green for light paths;

This material will look:

- red when doing path tracing;

- red when doing path tracing but with green caustics if light tracing is enabled;

- red when doing path tracing but casting green indirect light if PhotonGI is enabled;

- yellow-ish for bidirectional path tracing;

- etc.

As you see, it is a mess.

I can probably come out with a solution that will look like hybrid glass when doing path tracing and like normal glass in any other cases but it will have some odd behavior like having the shadow of hybrid glass and the caustic of a normal glass.

It is a bit hard to predict how this "Frankenstein" material can work in practice. At the end of the day, it is probably worth trying an implementation when I have time (and throw everything out of the window if it doesn't work and/or it is too messy).
Edit:
ok i'read it wrong... so lighttracing is the problem with this.

anyway

If I could have a glass that looks like normal glass but let's light through like architectural but then still makes caustics like normal glass!!! That's the best frankenstein ever!

As long as it doesn't break something in the process of course.

So if we ever want to have rayswitching it needs to do it for lighttracing as well as pathtracing. And that would basicaly make it available for bidir as well.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: dark juice

Post by Dade »

lacilaci wrote: Sun Aug 18, 2019 3:54 pm If I could have a glass that looks like normal glass but let's light through like architectural but then still makes caustics like normal glass!!! That's the best frankenstein ever!
Yes, it can work because there is a static partition of tasks between path tracing and light tracing (so they can deliver different results).
lacilaci wrote: Sun Aug 18, 2019 3:54 pm As long as it doesn't break something in the process of course.
It would break BiDir because it mixes (with MIS) path tracing and light tracing so I will have to revert to normal glass in any case when using BIDir.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: dark juice

Post by Sharlybg »

Before making tricky code modification. Is there on earth a valid and non-biased way to make a juice look just normal like in real life ? i mean without hack.

Just like this : http://www.mitsuba-renderer.org/devblog/
Abstract: Translucent materials are ubiquitous, and simulating their appearance requires accurate physical parameters. However, physically-accurate parameters for scattering materials are difficult to acquire. We introduce an optimization framework for measuring bulk scattering properties of homogeneous materials (phase function, scattering coefficient, and absorption coefficient) that is more accurate, and more applicable to a broad range of materials. The optimization combines stochastic gradient descent with Monte Carlo rendering and a material dictionary to invert the radiative transfer equation. It offers several advantages: (1) it does not require isolating single-scattering events; (2) it allows measuring solids and liquids that are hard to dilute; (3) it returns parameters in physically-meaningful units; and (4) it does not restrict the shape of the phase function using Henyey-Greenstein or any other low-parameter model. We evaluate our approach by creating an acquisition setup that collects images of a material slab under narrow-beam RGB illumination. We validate results by measuring prescribed nano-dispersions and showing that recovered parameters match those predicted by Lorenz-Mie theory. We also provide a table of RGB scattering parameters for some common liquids and solids, which are validated by simulating color images in novel geometric configurations that match the corresponding photographs with less than 5% error.
teaser_hd.jpg
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: dark juice

Post by lacilaci »

It will be possible to do this accurately once Dade adds vertex merging to lighttracing in the future I think
Post Reply