Chaos Corona for 3ds Max > [Max] General Discussion

IOR guide

(1/2) > >>

maru:
I was trying to create a _more or less_ realistic glass with liquid and ice cubes inside. At some point I realised I'm completely dumb when setting proper IOR for different surfaces. My worst problems are:

-Air bubbles inside ice cubes (visible from air). air -> ice -> air? (yellow arrow)

-The part of ice cube that is under the surface of liquid. (air -> liquid -> ice), what material should it have?? Ice or liquid? (red arrow)

-The liquid/glass surface. If we assume that IOR for glass=1,55 and for liquid=1,33 then if we are looking from air, at the liquid, through the glass, this IOR should be 1,55/1,33=~1,16. But what if we are looking from above the glass (pink arrow) so that rays travel like this: air (ior 1) -> liquid surface (ior 1,33) -> liquid/glass surface (NOT 1,16 this time and it's the same surface!)?

I couldn't find any sensible explanation of this on the web. Is there any simple way to do it as realistic as possible?

Realish:
I thought about this a lot myself.  To get it perfect I think there needs to be a special surface or material option in Corona made for when two clear surfaces with different ior interact.  Until then I do what I mention below.

I generally get good results by having a single layer of geometry where the to surfaces interact and making the ior of that geometry the ior of the substance more in the center.  In this case the orange juice ior should be used inside the glass, the ice cube inside the juice, and the air inside the cube.  There should also be no geometry inside the other.  That might have not sounded right so I will give an example.  In this case the surface of the orange juice should not be inside the cube at all.  There should be a cut made in the surface geometry of the juice where any cubes poke out so the surface perfectly touches the surface of the cube and does not go inside the cube at all.

I actually see a lot of people do this wrong and the results always come out looking not as real as they should.
Please post your revised results.  I'm really interested to see how your pic will change.

maru:
I think I've figured this myself. What you wrote is correct. Here are some images - the one with ice cube is so you can see that I cut holes in fluid surface matching the ice cube's shape. I can also upload the scene if you wish. It's 6mb so I would have to find a place to drop it.

Ondra:
It does not make sense to describe the scene with relative IORs (for example 1.55/1.33 = 1.16), because you still need absolute IORs of both materials to compute fresnel reflection. You should NEVER EVER set this relative value to any glass/water material. Corona handles the fractions automatically where media meet. However, I was never able to come with a scheme of how to guess which side of each polygon is inside/outside.  What I do now is in most parts OK, but breaks when light enters side of the glass, and exits via the water surface (and vice versa).

The only way I could do it 100% correctly (and consistently, which is important for bidirectional methods) is, if I would take the normals into account. That would of course mean, that you would have to model scenes with correct orientation of normals. Then the correct way of modelling water in glass would be to model the glass, detach polygons inside the glass, flip them, cap it, and assign the water material to it (this should actually give you good results even now).

maru:

--- Quote from: Keymaster on 2012-12-18, 13:22:11 ---Corona handles the fractions automatically where media meet.
--- End quote ---
I don't get this. "Where media meet"? This would mean overlapping polygons or a little space between the two surfaces. Both methods produce very unnatural renders. There's no two-sided material for Corona yet, right?


--- Quote ---The only way I could do it 100% correctly (and consistently, which is important for bidirectional methods) is, if I would take the normals into account. That would of course mean, that you would have to model scenes with correct orientation of normals. Then the correct way of modelling water in glass would be to model the glass, detach polygons inside the glass, flip them, cap it, and assign the water material to it (this should actually give you good results even now).

--- End quote ---
In current version of Corona, is there any difference between flipped and not flipped normals?
Rendering a glass of water with a material with IOR 1.33 applied to sides of the inside of the glass gives unnatural results.

Navigation

[0] Message Index

[#] Next page

Go to full version