PDA

View Full Version : Liquid surface inside glass surface



haknslash
02-15-2012, 05:15 PM
I was goofing around today modeling up a funky shaped beer chugger and noticed some tesselation or mesh artifacts when two surfaces are lying on each other. Basically my "liquid" surface model touches to internal surfaces of the glass bottle just as it would in reality. But I'm seeing some tesselation or mesh artifacts thru the glass as both materials are touching one another. Is the only 'fix' for this to offset the liquid surface model a small amount off the glass surface or is there a better/cleaner way to handle this issue inside Shot?

I rarely have a need for this type of modeling so it's not really an issue for me but I noticed it today and figured I'd ask. See attached. The glass is smooth but looks like a either modeled it with texture or added a displacement but that's just the artifacts you're seeing.

blitz
02-15-2012, 06:03 PM
Try overlapping the liquid mesh with the glass mesh a bit. This is whats normally done when using mental ray or v-ray. It would be interesting to see if the same rule applies to Bunkspeed.

andy
02-15-2012, 06:26 PM
There are 3 solutions for this problem:

1) Easiest, but the worst: Just add an even displacement map to the liquid. This covers the offset for you. Yeah, now you know why it's the worst. That's complex geometry, so it gets expensive on memory Real fast.

2) Semi-easy: Cut the glass where it touches the liquid and delete it. You must adjust the liquid IOR to account for this, but it will never be accurate. It can, however, look pretty darn close.

3) The best: yes, offset your surface a hair. To avoid overtessellating things pay close attention that your glass bottle and the liquid have very similar tessellation so none of it crisscrosses. Other than the tiny tiny edge that overhangs here, this will give you accurate results. Most people don't model a proper meniscus anyway.


last observation: your glass looks a bit too reflective, especially if it's an older bottle.

andy
02-15-2012, 06:49 PM
wait, I took another look and noticed one more thing. Your model is quite detailed, but how many times do you need to rotate the cap around to unscrew it? Isn't standard 1-3 times depending on the style?

"American Brewery Pale Ale - Once you finally get it open, you'll be glad it was filled with beer."

david.randle
02-15-2012, 11:39 PM
Best way to handle it is to offset or intentionally intersect the liquid and glass shared surfaces. You don't even have to do this in CAD. Just select the part and scale it uniformly up or down in our software.

I agree with Andy too....that is a high effort screw cap!

Just whipped this up to show you that what you are after is indeed possible:

117

andy
02-16-2012, 12:21 PM
hmm, good point, a simple scale might be the easiest to achieve that. In complex shapes though I would be concerned of overlapping polygons. It's fairly unlikely though.

If you have access to 3dsMax you can use a simple push which just takes every polygon and pushes it in the direction of the normal. This just grows/shrinks the model slightly, but won't change how much geometry there is.

david.randle
02-18-2012, 04:13 AM
BTW guys, this just popped up on the iray dev blog: http://blog.irayrender.com/post/17763515875/refraction-and-ior-stacks

haknslash
02-21-2012, 02:11 PM
Geh I feel like an idiot now for not thinking to scale it down in Shot versus CAD :o. MUCH easier that way!!

Andy, yea the bottle has like a zillion threads, I know ;). It was just something I threw together in about 3 minutes out of boredom. I didn't mess with fine tuning any materials. Just dropped some default materials on for the sake of creating this thread to help illustrate :cool: