Liquid in a basin...how to create?

truk77
Registered
Joined: 09 Aug 2002, 00:19

31 Mar 2003, 14:55 #1

If I've just created a basin (or a bottle, or a glass) and I'd like to put a liquid inside of it, what's the best way to create a contour-fitting liquid? I can select the interior faces and do an extract region, but can I turn the extracted stuff into a solid object?
Help me, Wings Pros :)
Reply

wasamonkey
Registered
Joined: 20 Sep 2002, 11:51

31 Mar 2003, 15:28 #2

yes
with the liquid object selected
rmb and choose invert
this will flip all the face normals and
should give you the results you are wanting
cheers
Reply

truk77
Registered
Joined: 09 Aug 2002, 00:19

01 Apr 2003, 01:24 #3

Hey, thanks man, that worked great!
Reply

Mauritius
Registered
Joined: 03 Sep 2002, 18:13

01 Apr 2003, 12:04 #4

If you're going to raytrace later, you'll get wrong images with your approach. There is only one refraction between the glass surface and the liquid. But you seem to have modeled the inside of your liquid container in areas where the liquid is and the liquid.
.mm
Reply

truk77
Registered
Joined: 09 Aug 2002, 00:19

01 Apr 2003, 14:17 #5

For raytracing, then, what approach would you suggest?
Reply

OwenR
Registered
Joined: 16 Feb 2003, 19:13

01 Apr 2003, 21:17 #6

truk77, are you using a RenderMan compliant renderer?
If so, I can probably help.
Reply

truk77
Registered
Joined: 09 Aug 2002, 00:19

01 Apr 2003, 23:14 #7

Quote:
truk77, are you using a RenderMan compliant renderer?
No, I'm using Art of Illusion ([url=http://www.artofillusion.org).]www.artofillusion.org).[/url] However, how would it be done were I using a RenderMan renderer?
Reply

OwenR
Registered
Joined: 16 Feb 2003, 19:13

02 Apr 2003, 00:35 #8

>how would it be done were I using a RenderMan renderer?
I'll have a go at doing this for AIR asap, so for now this is a guess...
Consider a cylindrical glass beaker containing water.
There are three interfaces through which light travels (in both directions):
air/glass - ior 1.5 approx
air/water - ior 1.333 approx
water/glass - ior 1.125 approx
Important: since we're talking Wings, I assume the beaker is one subdiv mesh.
The tricky part is that the glass interfaces air in most places, but water on the inside.
Each interface has a different index of refraction.
Edit: Garbage deleted. Continues below.
Reply

Mauritius
Registered
Joined: 03 Sep 2002, 18:13

02 Apr 2003, 23:30 #9

I suggest a different approach (that won't bring you into trouble regarding the inside shared by two suraces/shaders, having a different ior). Here's a quick demonstration:
- Create a cylinder
- Switch to face mode
- Pick the top face
- Inset 10%
- Extrude -1
- Extrude -0.9
- Pick the horizontal edge loop inside, lying on the grid
- Loop Cut
- Hide the new object 'cylinder1_cut2'
- Select the face where the water surface is
- Assign the _hole_ material
- Hide the 'cylinder1' and unhide 'cylinder1_cut2' again
- Select 'cylinder1' in body mode
- Invert
- Assign your water material to 'cylinder1_cut2'
- Unhide 'cylinder1' again
- Assign your glass material to 'cylinder1'
Remember that reagrdless of the renderer you use (assumed you're going to raytrace), you need to ensure objects are rendered double sided and your refraction/ray depth must be set to 9 at least to see the background behind the glass.
Presto
.mm
Reply

OwenR
Registered
Joined: 16 Feb 2003, 19:13

03 Apr 2003, 02:05 #10

Mauritius, maybe I'm reading your instructions wrong.
But I don't see how you're creating the correct ior where, in the real world, the glass would be in contact with the water.
Is this not necessary?
I like how you're using the 'hole' material to cut away faces.
So scrap my 'textured' glass shader.
But I think you might have to extend the modelling a little bit, so that you can use three materials:
- glass shader with ior 1.5 for the air/glass interface
- glass shader with ior 1.333 for the air/water interface (or dedicated water shader)
- glass shader with ior 1.125 for the water/glass interface

New method for raytraceable transparent beaker of water.
Create three materials:
- "air_glass" - glass shader with ior 1.5
- "air_water" - glass (or dedicated water) shader with ior 1.333
- "water_glass" - glass shader with ior 1.125
We need three objects:
- "beaker" with "air_glass" material
- "water_body" (extracted from "beaker") with "water_glass" material
- "water_top" (extracted from "water_body") with "air_water" material
Apply _hole_ material to:
- faces of "beaker" which coincide with "water_body"
- faces of "water_body" which coincide with "water_top"
- faces of "water_top" which are not required

I'll try to arrange a host for some screenshots and make this easier to follow.
In the meantime, please criticise.
Edit: there's no point in screenshots unless there's any interest. So let me know ;)
Reply