Page 4 of 8

Re: Working with glass and liquid.

Posted: Tue Apr 20, 2010 11:10 pm
by Proupin
what normals did you flip?

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 2:27 am
by Voidmonster
Stromberg90 wrote:Where the edges are thin it's supposed to look like the liquid is filling the glass completly to the edge.
So in you latest test the left one looks more correct, but in the way of noise and rendertime the right one will be more effictient.
You're quite right about the edges.

Apparently I'm doomed to forever prove that months of lab work can save you hours in the library. :)

PhilBo's description has one detail wrong -- he says that the IOR for the interior liquid layer should be glass + liquid / 2. The average IOR. That's incorrect, and if I'd thought about it I would have figured it out. Instead I looked at my photo and monkey-grabbed the sliders until things looked more right, then tried to figure out why.

See this diagram:
OctaneGlassLiquidDiagram.png

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 2:40 am
by Voidmonster
In case anyone else wants to play, I'm attaching the Octane scene and the .OBJ file to render the shot glass model.

A render comparing this technique to the VRay technique is forthcoming. It just needs an hour or so to cook.

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 4:48 am
by Stromberg90
Realy wierd that "no-one" knows the answer, i did take a look at a fryrender tutorial about it and it says something diffrent from the Vray version, the fryrender version looks alot like the picture you posted.

Nice that you posted the scene, sharing is important :)

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 6:52 am
by Voidmonster
Stromberg90 wrote:Realy wierd that "no-one" knows the answer, i did take a look at a fryrender tutorial about it and it says something diffrent from the Vray version, the fryrender version looks alot like the picture you posted.

Nice that you posted the scene, sharing is important :)
In the past I've benefited a great deal from folks who've done this kind of exploration, so it really feels great to give back a little!

The comparison shot is taking longer than expected. Rendering both models in the same scene was introducing a ton of noise and just generally looking crappy. So I'm redoing it as separate images that more closely match my shot glass photo.

Early on I said I didn't have the patience to do a 1:1 photo-to-render comparison, but it's looking more and more like I'm doing just that. I guess I had to sneak up on it to make sure I still thought I was playing instead of doing work. :)

As for all the different techniques, there's a surprisingly small number of people who really chase these things down to the minute details and there's a surprisingly large number of ways to implement dielectrics, and then there are a ton of variables within each implementation.

Attached is the very noisy comparison image.

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 7:18 am
by Stromberg90
I have seen other topics on this aswell at other forums, but they never seem to get to an answer :P
In the newest rendering i still feel the left one looks most correct, to my eye atleast.

And i love these kind of expriments :)

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 8:25 am
by Proupin
Stromberg90 wrote:Realy wierd that "no-one" knows the answer, i did take a look at a fryrender tutorial about it and it says something diffrent from the Vray version, the fryrender version looks alot like the picture you posted.

Nice that you posted the scene, sharing is important :)
I will forever claim this is one of the situations where rendering as single-sided would be key... I shall remain in my little cave rejected from society for being a madman :)

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 8:33 am
by Proupin
Proupin wrote:what normals did you flip?
by this I mean, why do you think flipping normals would make a difference? Theoretically Octane renders geometry as double-sided, and therefore it Should render the geometry the same way regardless of where normals are facing. So I'm struck to read it behaved that way...

Why single sided would solve this, it's because you could model your glass and liquid without gaps or interpenetration (that's just wrong), you could just overlap the things together and the ray would correctly "march" through void-glass-liquid-glass-void, instead of void-glass-liquid-glass-glass-liquid-glass-void (in the case of interpenetration), or void-glass-glass-liquid-glass-glass-void (in case of making a gap)

EDIT: I don't expect you to read the whole forum, so I'll post this again; this is a Lightwave tutorial showing how this guy approaches the problem, believe me it makes sense, but it requires single-sided): http://www.robinwood.com/Catalog/Techni ... ass-1.html

the detaching surfaces method is then what comes closer to this technique ATM, because the ray's marching as it should... but I believe the fresnel is not that complete, and it doesn't recognize when the ray is inside a particular medium in order to determine if it's going "in" or "out" of the denser medium, that as you know makes a huge difference in the way the ray behaves.

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 3:09 pm
by mlody47
Proupin wrote:
Stromberg90 wrote:Realy wierd that "no-one" knows the answer, i did take a look at a fryrender tutorial about it and it says something diffrent from the Vray version, the fryrender version looks alot like the picture you posted.

Nice that you posted the scene, sharing is important :)
I will forever claim this is one of the situations where rendering as single-sided would be key... I shall remain in my little cave rejected from society for being a madman :)

I know what You mean but its not physically correct :)

Re: Working with glass and liquid.

Posted: Wed Apr 21, 2010 3:16 pm
by Proupin
mlody47 wrote: I know what You mean but its not physically correct :)
hehehe... is that some sort of irony? :lol: back to the cave gollum-style...