Page 5 of 8
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 5:43 pm
by Voidmonster
Stromberg90 wrote:I have seen other topics on this aswell at other forums, but they never seem to get to an answer

In the newest rendering i still feel the left one looks most correct, to my eye atleast.
And i love these kind of expriments

I'll have more to say on the subject of which looks right pretty soon.

I've got too many things rendering at the moment. Fortunately, Octane and CPU renderers are happy to run at the same time without slowing each other down!
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 6:03 pm
by Voidmonster
Proupin wrote: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.
Sorry, I hadn't intended to not answer your question about what I flipped... I even added that information into my diagram, then just didn't say anything in my post. Sorry!
I'm not really sure why the flipped normals matter, but they very definitely do.
You'll note that the single-sided method described on that page requires you to fake double-sidedness. I always hated the air-polygon method (and sadly, by the time they implemented the proper dielectric shader I'd moved on to Maxwell Render). The air-poly method really quickly amplifies model geometry, which isn't a problem if you're using simple models, but for complex glass sculptures (with inclusions) it becomes really onerous. Plus if you intend to animate deformations of your glass it bogs things down even more due to the amplified geometry and adds more things you need to look out for (when the glass and air poly go out of sync, which you fix by doubling all the weighting and geometry modifiers and rigging).
The major drawback to the method in Octane is that it makes fluid-sims problematic to animate, but the interpenetrating geometry is close enough to accurate that it may not be a huge issue. For static models it's really not particularly difficult to set up compared to anything else.
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 6:05 pm
by radiance
when 2.1 and 2.2 are out of the door,
i'm going to have some time to have a propper look at this.
although MLT will definately help.
i've scheduled it for beta3.
Radiance
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 7:56 pm
by Voidmonster
Just to throw another data point on the fire here, I found this tutorial for Maya which sort of confirms what I guessed about IOR:
http://download.autodesk.com/us/maya/20 ... nd_Liquids
Problem being, Octane doesn't support IOR below 1.
So for my example the interface between the glass and the liquid should have an IOR of 1.36/1.564 = 0.8695
A render of the overlapping geometry is coming next. It just needs to cook.
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 9:03 pm
by SurfingAlien
Hi!
but does an IoR < 1 make sense (in a physical way?)
have you tried using the inverse value: 1.586 / 1.36 = 1.166 ?
please note this is a question and not a statement (I'm no physicist

)
...and keep up this very interesting thread
cheers,
A
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 9:09 pm
by radiance
SurfingAlien wrote:Hi!
but does an IoR < 1 make sense (in a physical way?)
have you tried using the inverse value: 1.586 / 1.36 = 1.166 ?
please note this is a question and not a statement (I'm no physicist

)
...and keep up this very interesting thread
cheers,
A
IOR < 1.0 is not physically plausible...
Radiance
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 9:19 pm
by Proupin
SurfingAlien wrote:Hi!
but does an IoR < 1 make sense (in a physical way?)
sure, even negative refraction is physically possible. The IOR is meaningful as a factor between two mediums. When we say glass has an IOR of 1.5, it usually refers to the refraction factor between glass and void (void is the reference medium whose IOR is equal to 1). It just means light travels 1.5 times slower when going from void to glass.
EDIT: an IOR of a SINGLE material<1 wouldn't be plausible in a strict way because light cannot travel faster than 'c' (speed of light in vacuum). But if you were to say: "what is the IOR between glass (1.5) and a less denser medium like water (1.3)?" that would be sort of like a "group refractive index" whose resulting IOR between the two would be 0.866... and since voidmonster is working on glass-to-liquid interactions, IOR<1 could be helpful ATM
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 9:42 pm
by SurfingAlien
some interesting reading here:
http://hyperphysics.phy-astr.gsu.edu/Hb ... fr.html#c1
this somehow confirm what I was thinking (and what Radiance said);
also consider this: if the glass was empty, then the light passes from air to glass (let's say IoR 1.5), goes through the glass material and finally goes outside to air again. IoR is still 1.5 and not 1/1.5 (no matter the "direction" of light, i.e. air -> glass or glass -> air). is it correct?
EDIT: I mean, in real life we always have "relative" IoR between two materials, usually one is air which IoR is
about 1
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 9:58 pm
by Proupin
SurfingAlien wrote:some interesting reading here:
http://hyperphysics.phy-astr.gsu.edu/Hb ... fr.html#c1
this somehow confirm what I was thinking (and what Radiance said);
also consider this: if the glass was empty, then the light passes from air to glass (let's say IoR 1.5), goes through the glass material and finally goes outside to air again. IoR is still 1.5 and not 1/1.5 (no matter the "direction" of light, i.e. air -> glass or glass -> air). is it correct?
EDIT: I mean, in real life we always have "relative" IoR between two materials, usually one is air which IoR is
about 1
Yes, refractive index is always in respect to void, so it will always be higher than 1. Irrespective of direction. But that's not the point here I believe, since what we want to achive is a simulation between a liquid and glass, and at the current state of things an IOR<1 would be helpful, as a definition of a "group refractive index" between two mediums, as I said in the previous post if you read carefully.
Ideally, the only thing Octane should do (in the future) is be aware in what medium a ray has entered, and if it encounters another medium with a different IOR, internally calculate what would go on... the Snell's law in short.
Let me put an example: let's say a ray has entered and is in a medium such as glass with an IOR of 1.5. This glass is filled with a liquid with also an IOR of 1.5. Question: what happens to the ray when it goes from the glass to the liquid? does it bend? the anwser tomorrow morning, good night!
EDIT: no it wouldn't bend; we could then say the "group refractive index" is indeed 1 (no change in speed or direction)
Re: Working with glass and liquid.
Posted: Wed Apr 21, 2010 10:17 pm
by SurfingAlien
Proupin wrote:Ideally, the only thing Octane should do (in the future) is be aware in what medium a ray has entered, and if it encounters another medium with a different IOR, internally calculate what would go on... the Snell's law in short.
yep, I agree that would be nice and handy (I think this is what some others have managed to do with "volumetric glass"?)
...nighty night
