Working with glass and liquid.

Discuss or ask critique about your current works
Forum rules
Important notice: All artwork submitted on our public gallery forums gallery forums may or may not be used by OTOY for publication on our website gallery.
If you do not want us to publish your art, please mention it in your post clearly. (put a very red small diagonal cross in the left right corner of the image)
Any images already published on the gallery will be removed if the original author asks us to do so.
We recommend placing your credits on the images so you benefit from the exposure too, and use a minimum image width of 1200 pixels, and use pathtracing or PMC. Thanks for your attention, The OctaneRender Team.


For new users: this forum is moderated. Your first post will appear only after it has been reviewed by a moderator, so it will not show up immediately.

This is necessary to avoid this forum being flooded by spam.
User avatar
Voidmonster
Licensed Customer
Posts: 54
Joined: Thu Apr 08, 2010 6:20 am
Location: Oceanside, CA
Contact:

Stromberg90 wrote: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 :)

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!
-Zak Jarvis
Rendering with Phenom X4 9550 @ 2.20Ghz, 8 gigs of ram, Win7 64bit, GeForce GTX 260 @ 576MHz, 216 core
User avatar
Voidmonster
Licensed Customer
Posts: 54
Joined: Thu Apr 08, 2010 6:20 am
Location: Oceanside, CA
Contact:

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.
-Zak Jarvis
Rendering with Phenom X4 9550 @ 2.20Ghz, 8 gigs of ram, Win7 64bit, GeForce GTX 260 @ 576MHz, 216 core
User avatar
radiance
Posts: 7633
Joined: Wed Oct 21, 2009 2:33 pm

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
Win 7 x64 & ubuntu | 2x GTX480 | Quad 2.66GHz | 8GB
User avatar
Voidmonster
Licensed Customer
Posts: 54
Joined: Thu Apr 08, 2010 6:20 am
Location: Oceanside, CA
Contact:

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.
Attachments
Shot glass with bourbon photograph (1/60th a second rendering, iso 400, F/22, 206mm lens (135x1.6)). Note the boundary between the liquid and the glass at the bottom. Discrepancies have more to do with the difficulty of getting an accurate thickness measurement at the bottom of the glass due to the size and taper. My poor calipers.
Shot glass with bourbon photograph (1/60th a second rendering, iso 400, F/22, 206mm lens (135x1.6)). Note the boundary between the liquid and the glass at the bottom. Discrepancies have more to do with the difficulty of getting an accurate thickness measurement at the bottom of the glass due to the size and taper. My poor calipers.
Octane render (1.5ish hours, sampling 16,000). Note the boundary between the liquid and the glass at the bottom.
Octane render (1.5ish hours, sampling 16,000). Note the boundary between the liquid and the glass at the bottom.
-Zak Jarvis
Rendering with Phenom X4 9550 @ 2.20Ghz, 8 gigs of ram, Win7 64bit, GeForce GTX 260 @ 576MHz, 216 core
SurfingAlien
Licensed Customer
Posts: 355
Joined: Thu Jan 21, 2010 12:05 am
Location: Italy

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
MacBookPro unibody 2x2.4GHz | 4Gb | 9400M+9600GT 256Mb | OSX 10.6.8
i7 2600-K @3.4GHz | 8Gb | GTX560Ti 2Gb | Windows7x64 | Octane 1.0 b2.52
User avatar
radiance
Posts: 7633
Joined: Wed Oct 21, 2009 2:33 pm

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
Win 7 x64 & ubuntu | 2x GTX480 | Quad 2.66GHz | 8GB
User avatar
Proupin
Licensed Customer
Posts: 735
Joined: Wed Mar 03, 2010 12:01 am
Location: Barcelona
Contact:

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
Win 7 64bits / Intel i5 750 @ 2.67Ghz / Geforce GTX 470 / 8GB Ram / 3DS Max 2012 64bits
http://proupinworks.blogspot.com/
SurfingAlien
Licensed Customer
Posts: 355
Joined: Thu Jan 21, 2010 12:05 am
Location: Italy

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
MacBookPro unibody 2x2.4GHz | 4Gb | 9400M+9600GT 256Mb | OSX 10.6.8
i7 2600-K @3.4GHz | 8Gb | GTX560Ti 2Gb | Windows7x64 | Octane 1.0 b2.52
User avatar
Proupin
Licensed Customer
Posts: 735
Joined: Wed Mar 03, 2010 12:01 am
Location: Barcelona
Contact:

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)
Last edited by Proupin on Thu Apr 22, 2010 10:05 am, edited 1 time in total.
Win 7 64bits / Intel i5 750 @ 2.67Ghz / Geforce GTX 470 / 8GB Ram / 3DS Max 2012 64bits
http://proupinworks.blogspot.com/
SurfingAlien
Licensed Customer
Posts: 355
Joined: Thu Jan 21, 2010 12:05 am
Location: Italy

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 ;)
MacBookPro unibody 2x2.4GHz | 4Gb | 9400M+9600GT 256Mb | OSX 10.6.8
i7 2600-K @3.4GHz | 8Gb | GTX560Ti 2Gb | Windows7x64 | Octane 1.0 b2.52
Post Reply

Return to “Works In Progress”