Refraction color bring a milky effect (build8)
I’ll check to see if the value is being properly used
Refraction color bring a milky effect (build8)
I’ll check to see if the value is being properly used
Refraction color bring a milky effect (build8)
Ok I have reproduced the black refraction effect in 3ds max.
If in max I use a refraction color white, with normal settings, and I put the dino in a white environment, the whole dino is white.
If I decrease the max depth in the material to 2, the dino is still white.
But if I then turn on the exit color, which is set to black, the dino is rendered as in rhino:
So as I already though, the max depth for refraction in rhino doesn’t work anymore. it is by default set to 2, with a black exit color. I think it would be good if we could specify that exit color, or choose to turn it off, as in max. In max, when exit color is turned off, the color of the environment is chosen as the exit color (I think).
Here’s a test in rhino with my wineglass:
I assume that the global max depth doesn’t work either.
Refraction color bring a milky effect (build8)
Wouter, great that you confirm the bugs. ![]()
Refraction color bring a milky effect (build8)
Well on my initial check, I looked in Vlado’s code for his GlassBRDFs and they are still making use of the global max depth variable. I checked that the global max_depth is actually making it correctly to VRay, so I guess there is something more subtle happening. I’ll continue looking into this and will contact Vlado for his thoughts on the matter as well
Refraction color bring a milky effect (build8)
Hi Micha,
Uncheck “Double-Sided” in Material Editor Options rollout and turn on Fresnel Reflections should help.
Refraction color bring a milky effect (build8)
I’m not sure why your post isn’t showing this image properly…
Refraction color bring a milky effect (build8)
Thank you. It works. The black area problem is solved. Also the global max depth option works.
I ask me now, will it be better if the “Double-Sided” option is unchecked per automatic if the material work in refraction mode? Or should be “Double-Sided” unchecked per default allways? I have the feeling this should be the standard mode.
Refraction color bring a milky effect (build8)
Sorry, but it doesn’t work… You’re clearing up the black parts because of reflections kicking in.
Try it without reflection, you’ll see it’s wrong. There is definatly a problem in refraction:
http://www.aversis.be/vrayrhino/dino\_refract.zip
Just open, and render the persp viewport. It is a black diffuse, white refraction, no reflection material, double sided is turned off. In a white environment color. If I render the same in max, I get a fully white image, which is normal.
Refraction color bring a milky effect (build8)
Yes this has been discussed and is on my list for this round of UI fun and excitement. What is going to happen is the option will grey out and not be used whenever a refraction layer is added to the material.
Refraction color bring a milky effect (build8)
I think, it will be good so.
Refraction color bring a milky effect (build8)
The black areas correpond to total internal reflections; as such, you need to enable reflections to make them go away. This is the way things work in newer versions for 3dsmax too. This is in difference from previous versions, where this would work, but the result was not correct as the internal reflections were multiplied by the refraction color instead of the reflection one.
Best regards,
Vlado
Refraction color bring a milky effect (build8)
Ok, but what if you want a refractive material without any reflections, can this be rendered correctly then?
Refraction color bring a milky effect (build8)
No, because there is no such material in practice. I have considered this issue for quite some time, but I couldn’t find a way to resolve both this problem and tie reflections, refractions and fresnel properly, without strictly separating reflections from refractions, regardless if the reflections are internal or not. So for now, it will have to stay this way.
Best regards,
Vlado
Refraction color bring a milky effect (build8)
Hmm, sorry, I lied - there may be a way to do that… enable reflections, set the reflection color to white, tick Fresnel and set the Fresnel reflection IOR to 0.0…
Just tried it, but it doesn’t look very correct. I suppose an option could be added to simulate that special case, but there is no way to do it now.
Best regards,
Vlado
Refraction color bring a milky effect (build8)
Even with reflections on, it doesn’t look right imo.
Here is a test with a normal glass setup:
And the same scene in max:
The max version doesn’t look nice or anything, but it looks more logical to me that it has white regions instead of black when there is no black in the scene at all. Max depth is set to 16.
Here I set the exit color for refraction in max to black:
I really think that the max depth in rhino is by default set to 2 with a black exit color, and it can’t be changed.
Here is the scene in max and in rhino:
http://www.aversis.be/vrayrhino/glasstest.zip
Refraction color bring a milky effect (build8)
Set the fresnel and refraction IORs to the same value… here is my rendering in rhino with both IORs at 1.55.

Anyways, I realise this is a bit too restrictive, so I’m thinking of possible work-arounds, so we will see…
Best regards,
Vlado
Refraction color bring a milky effect (build8)
Ha, that looks good. But indeed, this removes the use of seperating the two ior’s. It was nice if you could use a higher reflection ior than refraction ior to bump up reflection strength a bit.
Refraction color bring a milky effect (build8)
I know, I’m sure I’ll think of something ![]()
Best regards,
Vlado