Glass/liquid adjacent surface issue

Started by seank, October 28, 2010, 08:12:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

seank

Any ideas whats going on in the attached image?  This assembly was created in ProE and the interface between the glass and the liquid are bang on.  Tried it as the native ProE and Step (attached).  Tried it at different qualities - same issue.

Cheers, Sean

ProE WF5
KeyShot 2

Speedster

"Bang on" is the problem.  You need a tiny bit of space between the surfaces.  I SolidWorks I scale one component like 0.5%-1% as a simple way to do it.  .0005 may be just enough.
Bill G

KeyShot

The correct way of modeling this glass would be to use 3 parts (interfaces). The air-liquid interface, the glass-air interface, and then one surface that models that glass-liquid interface. For the glass-air interface you can use the liquid material, for the glass-air interface you can use the solid glass material, for the glass-liquid interface you should use the dielectric material with a setting for glass on one side and the liquid settings for the other side.

Take a look at the Wine_Glass.bip included in KeyShot 2.1. It shows this setup as well.

-- Henrik

KeyShot

I should add that having the liquid as a small container inside the glass with a small distance to the glass
will work, but the result will not be quite right as the light will pass from glass to air to liquid, which changes the amount of light reflected and transmitted.

-- Henrik

seank

Henrik,

Could you clarify your suggested method?

Are you suggesting 3 models - the liquid, the glass and then a thin part filling a gap between them between them?  Is the term 'interfaces' used in rendering?

I'm on 2.0 not 2.1, could you post the Wine_Glass.bip you mentioned?

Cheers, Sean

KeyShot

Hello Sean,

You can update to KeyShot 2.1 for free when you have KeyShot 2.0. All our KeyShot 2.x upgrades are free for
KeyShot 2.x users.

Regarding the glass then yes, the model should be made of 3 parts.

-- Henrik

guest84672

Not 3 parts - 3 surfaces. I hope this makes it clearer.

seank

Finally got hold of the wineglass file mentioned and can see the interfaces as described by Henrik - still confused by the forms in the model - why does the glass surface include the liquid volume, why not just the glass surfaces? - I'm sure there's some good technical reasons.

Anyway, got an acceptable result by adding a small gap as suggested by Bill

Sean

Speedster

"Bang on"!  Now drop something in behind it (last image) and be prepared to have your socks knocked off!
Bill G

JeffM

That does look good, but it is still a bit off due to the small gap you had to create. The reason you need to set up this model like the wine glass is to be able to pull the refraction of the liquid inside the glass to the very edge of the outer glass surface. Being able to see the thickness of the glass surface like this is incorrect.

You can see this effect in this real photo:



If you have upgraded to KeyShot 2.1 you will have the wine glass file that we included with the installer. This file is already set up for proper "liquid-in-glass" rendering and it shows the important steps beyond just having 3 surfaces to represent the varying "interfaces" between liquid, air, and glass.

Splitting up the surfaces in this way is important because you need to set different "IOR" and "IOR out" settings for each of the surfaces.

The IOR is the index of refraction for the "inside" of the surface, and IOR out is for the "outside" of the surface.

So, looking at the wine glass bip file we do see that there are three surfaces. The outer most surfaces covers most of the glass itself and you'll find the material is a solid glass with an IOR of 1.5. This means the inside of the surface will refract light like glass since glass typically has an IOR of 1.5. The IOR out for this part would be just 1, since the outside of the surface should refract like air (no refraction) and air has an IOR of 1.

That's the easy surface, the next surface, the top of the liquid is similar. You need to have the inside of the surface represent the liquid and the outside should represent air. So, for the wine glass the top of the liquid has an IOR of 1.33 (the IOR of water) and an IOR out is 1 since it is, again, air.

The third surface, the "interface" of the liquid meeting the glass is the tricky one. On the inside of the surface you have the liquid, and the outside you have glass. So, for the wine glass you will see that this surface has an IOR of 1.33 since the liquid is on the inside, and an IOR out of 1.5 since glass is on the outside.

You can get even more complicated by applying the same technique to the color settings of the dielectric material to create proper colored liquid and colored glass renderings.

Here is my rendering of the wine glass that has these techniques applied, notice the accurate refraction of liquid within the glass. Just like the real photo above.


seank

Thanks for this full explaination Jeff - very useful, although......

I'm still confused on the inclusion of the liquid surface in the glass surfaces - surely this puts two refractive setting in the same place? - liquid/air in the liquid top surface interface and glass air in the glass interface.

Why isn't the glass surface simply open where the miniscus edge meets the glass?

Cheers, Sean

cdspk@lboro.ac.uk

m2tts

Quote from: seank on November 05, 2010, 04:34:13 AM
Why isn't the glass surface simply open where the miniscus edge meets the glass?

I think you might be confused and think the wine  glass is a solid model. The glass surface is "open" where the liquid is. The wine glass model is not a solid manifold glass holding a solid manifold liquid, but three open surface models:the glass, the liquid interface and the liquid top. The liquid material IS the interior surface of the glass (that would complete a solid manifold of the glass), and it's material represents the interface of glass and liquid.

seank

Cheers for the clarification, it's hard to see the surfaces from the .bip - in this image it does look as though the glass has a 'capping' surface to make it manifold - the upper portion of the glass is a different colour from the lower portion, I presume this is just where the glass turns back on itself over the lip and down to the miniscus.

Can .bip files be saved as stp, iges etc.?  There no option in KeyShot but maybe through Rhino or similiar?

Cheers, Sean

m2tts

Bip files are mesh data, not nurbs, so they cannot be saved as igs or step.

guest84672

Also, KeyShot is rendering software, not a data translator.