Yellowing in glass dispersion

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.
Post Reply
TStrolia
Posts: 40
Joined: Mon Jun 22, 2020 10:29 am

Yellowing in glass dispersion

Post by TStrolia »

I have spoke to BYOB before about this over on Blender Artists but haven't been able to resolve a problem I am having. When I set glass to have a dispersion C coefficient of 0.012, around the lowest it should be, the glass becomes extremely yellow, even at 18,000 samples and with a high IOR The actual visual effect looks great but the yellowing is not something I am familiar with in real crystal glass or diamonds, or at least when I have seen it is conditional where as this seems to be 100% of the time, any shape, any angle. I tested on a sphere and a cube and a prism and it is the same result all around where the glass becomes dark, some how seems like it is forgetting about many specular bounces (set to 14 just to be safe) I get a lot of black in it with just an over all brownish dinge to it. A reference of what I would expect to see is more like this: https://www.bluenile.com/diamond-detail ... rce=google

or this: https://www.prairieice.net/sites/prairi ... bg=default

On a ball I would expect to see something like this: https://ibb.co/jvcCKyn Very subtle, very hard to see, but sorta that slight tipping point in realism that sells that it is crystal and not some recycled coke bottle glass. kindof ironically, the orange browning from the dispersion now makes it look a lot like cheap glass because there is no clerity.

Still perfectly clear with little bits of dispersed light bouncing around heavily angle dependant.

I am hoping someone here might know what is causing this. Is there maybe a specific setting I need on to get this to perform correctly?
CodeHD
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Yellowing in glass dispersion

Post by CodeHD »

Do you have a Blender scene that shows this?
We just had Diamonds as a topic on Discord, and yellow glass was not seen anywhere there.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Yellowing in glass dispersion

Post by B.Y.O.B. »

A test scene would be good indeed.
So far I have only observed this yellowing effect when clamping was used with dispersion - does your scene use clamping?
TStrolia
Posts: 40
Joined: Mon Jun 22, 2020 10:29 am

Re: Yellowing in glass dispersion

Post by TStrolia »

B.Y.O.B. wrote: Tue Aug 18, 2020 8:58 am A test scene would be good indeed.
So far I have only observed this yellowing effect when clamping was used with dispersion - does your scene use clamping?
No clamping in my scene, but it does seem to be somewhat related to the complexity of the scene. I am aware dispersion takes a lot of samples to calculate clean but this is a lot.... like a LOT a lot.... Here are some images.

This one is one with just an HDRI and a ball... the result looks prety good, at least in VP render with a 10 second halt.
https://ibb.co/gDKb5mT

These 2 are from a scene I am working on (denoised but it was pretty clean to begin with EXCEPT for the glass) These are rendered with a halt at 8,392 samples. The chandelier is basically just straight red and the wine glass is basically yellow and black with a black eye to add to it lol. I am positive there is a solution to this problem. I don't know if lux supports render layers yet. I haven't honestly tried but I suppose that might be a possible way to focus resources on just the glass and comp the 2 together. Or if there is a way to suggest sampling priority on the glass so it gets more samples than the rest (also adaptive sampling is on in the following 2 images).
https://ibb.co/7YLLQcb
https://ibb.co/94zXcjj
TStrolia
Posts: 40
Joined: Mon Jun 22, 2020 10:29 am

Re: Yellowing in glass dispersion

Post by TStrolia »

B.Y.O.B. wrote: Tue Aug 18, 2020 8:58 am A test scene would be good indeed.
So far I have only observed this yellowing effect when clamping was used with dispersion - does your scene use clamping?
I just started maxing 32gb of ram in path so I switched to BiDir and strangely it seems to have fixed the issue with the glass. As far as I can tell the issue I am having is related to the path engine.

Also just out of curiosity, why is it that I am using less ram in BiDir. I honestly thought it would use more and not less. For some reason path GPU even with out of core off is using 32gb of ram and only 2gb of graphics ram, which seems a little odd to me. Path was just crashing blender the minute my ram use shot up, so I switched to bidir just to see and my ram usage dropped to 16gb, I just figured since now all the calculations are happening on the CPU that would mean it would use more of the system ram.
TStrolia
Posts: 40
Joined: Mon Jun 22, 2020 10:29 am

Re: Yellowing in glass dispersion

Post by TStrolia »

B.Y.O.B. wrote: Tue Aug 18, 2020 8:58 am A test scene would be good indeed.
So far I have only observed this yellowing effect when clamping was used with dispersion - does your scene use clamping?
Ok, update, it seems the problem is happening in the metropolis sampler. When I use CPU BiDir Sobol the dispersion is gorgeous but path and bidir metro I think is taking a lot more samples to solve. I accidentally overwrote the last render. I was going to show a comparison, but these renders are taking hours so I didn't want to wait to say anything, but the scene is around 100+ image textures now and is 3.8 million polygons in total (I have my reasons for why it is so high) so it is taking a long time to render and metro does seem to be faster but not as good at figuring out dispersion. I am wondering if it is because the glass is not in as well of a lit area so it is not prioritizing it? I don't know, but something about it just isn't giving as nice of results in regards to disperison as sobol.
Post Reply