Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 13-12-2006 , 04:04 AM
Zefiris's Avatar
Registered User
Join Date: Mar 2006
Location: Germany # B-W # S. Gmünd
Posts: 9

Liquid in a container with booleans

Hi there,

when searching for info on how to create a liquid in a container I often find the answer "use booleans". Actually even the official Maya tuts say so. Well, I tried lots of containers. Having a simple glass and a cube around it got me this result:
user added image

What I actually need is an object that fits inside the glass, as you might have guessed.
Could anyone tell me if I do things wrong? Or could anyone pm me on how this is done right? Actually I'd prefer it to be posted here in the thread, so more ppl wondering about this stuff can see it. Hopefully I'm not the only one getting that problem ;D


-- Zefi


www.fallofmankind.de

It's a small world but not if you have to clean it.
# 2 13-12-2006 , 05:45 AM
enhzflep's Avatar
Subscriber
Join Date: Oct 2006
Location: Melbourne
Posts: 313
Man, you're soo close!

1) Create your tumbler in polygons
2) Copy this tumbler and move it off to the side
3) Create a cube that encompasses the bottom of the glass
4) Select the glass, then the cube & do booleans->Difference
5) Select this block and do Polygons->Seperate
6) Delete the bottom chunk
7) Move the copy of the glass back to the origin

Simon.

In a picture:

Attached Images
# 3 13-12-2006 , 08:54 AM
mirek03's Avatar
Subscriber
Join Date: Feb 2006
Location: Australia
Posts: 2,752
then what?? soft bodies?? caustics?? intersting this! never seen this, thought fluids were 2D or 3D containers scaled to suit?? unless you're not using fluids??

live and learn, '.., and i think to myself what a wonderful world user added image'


take it easy and life will be easy
# 4 13-12-2006 , 09:08 AM
Joopson's Avatar
Registered User
Join Date: Jul 2005
Location: Boston, MA
Posts: 2,314
no, looks like thats not fluids mirek...

but yes, caustics and other things will help make it look real anyway...


idk, maya fluids seem a bit low tech IMHO compared to realflow or even Glu3D. hopefully they fix that in the next maya version...


anyway, i would actually just use a nurbs circle with the use of surfaces>planar, and do that, or do a custom curve and do surfaces>revolve, but thats just me ^_^

anyway, nice job on figuring that out enhzflep


cheersuser added image ,
Andy


Environment Artist @ Plastic Piranha
www.joopson.com
# 5 13-12-2006 , 09:27 AM
mirek03's Avatar
Subscriber
Join Date: Feb 2006
Location: Australia
Posts: 2,752
yea, thought the same thing myself, maybe import a texture map via surface sculpt tool and animate it, or a soft body with a bit of turbulance, ect, direction blah blah??

but yea, good detective work from Simon., bool;eans, i thought they were great once but now, well, anything can happen lol?


take it easy and life will be easy
# 6 13-12-2006 , 02:39 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
I know this might sound mad but maya fliuds are not really suited to making fluids, there better for fire, smoke, clouds, explosions etc.

If you want to make a liquid (say a glass of water) then I would create the "liquid" as a poly object and then use softbodies on the surface


"No pressure, no diamonds" Thomas Carlyle
# 7 13-12-2006 , 02:50 PM
mirek03's Avatar
Subscriber
Join Date: Feb 2006
Location: Australia
Posts: 2,752
yea, thats my piont, couldn't agree more, even the fluids maya is good for isn't good for, they can be faked easier, the fire is not to bad but considering sprite render and fluids render time, well..?? I would probably go the sprites, any takes on that??


take it easy and life will be easy
# 8 13-12-2006 , 03:08 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
yeah if you want realism then sprites are the way (as you map real images to them) so you cant get better than a real image!

I really think that using a combination of particles and fluids gives very good explosions smoke etc (T3 I think used fluids for the nuclear explosions at the end)

You could use particles with fields on each so they dont go over the top of each other (the playback speed isnt too bad i've found) even with lots of fields) if you want it to pour. (maybe with the blobby particle surface...)

Just another thought


"No pressure, no diamonds" Thomas Carlyle
# 9 13-12-2006 , 03:20 PM
mirek03's Avatar
Subscriber
Join Date: Feb 2006
Location: Australia
Posts: 2,752
yea, i'd go the particls and fluids combo, sprites and blobby surface or streaks (whatever they are`called) and these days would probably try and render them for composite. user added image

specially good for explosions as you have pionted out. might do a WIP on it soon. (when the computer comes back user added image )

so we have pinned down another area of contention user added image


take it easy and life will be easy
# 10 13-12-2006 , 04:10 PM
Zefiris's Avatar
Registered User
Join Date: Mar 2006
Location: Germany # B-W # S. Gmünd
Posts: 9

Originally posted by enhzflep
Man, you're soo close!

1) Create your tumbler in polygons
2) Copy this tumbler and move it off to the side
3) Create a cube that encompasses the bottom of the glass
4) Select the glass, then the cube & do booleans->Difference
5) Select this block and do Polygons->Seperate
6) Delete the bottom chunk
7) Move the copy of the glass back to the origin

Simon.

Simon you're the best! Though I'm wondering why you got that result by doing difference, and i got it by intersection.
I guess the Maya tuts said 'Difference' too, but I get different results with that.. but thanks man. Polygons -> Separate is some nice thing.

@others - I never used fluids much as they take a hella time to render and most particles are unrenderable for me cuz my gCard doesn't support hardware rendering.


www.fallofmankind.de

It's a small world but not if you have to clean it.
# 11 13-12-2006 , 05:17 PM
enhzflep's Avatar
Subscriber
Join Date: Oct 2006
Location: Melbourne
Posts: 313
Cool, no worries Zefiris.

That's weird that we had to use different tools to get the same result. As long as the result's the same, then who cares i guess.

On a side note (EDIT: that turned out rather long user added image)
Just today, I picked up a _really_ cheap video card, as in $51 australian - at Dick Smith of all places!

It's a Legend Radeon 9550, so it's got an ATI gpu. Sure it's by no means a firegl7350, but I just bought it to get something a bit faster than the onboard intel 865 stuff I had.

Turns out it's really quite a lot faster just for 2d stuff and modelling, I can turn on hardware shading in the viewport and get 10 or more fps with near identical quality to what I can generate a single frame in 2 seconds using Software Render.

It'll also do particles too. :bandit:

As for render times, tried on a scene I've got here and how does 13 seconds vs 2 mins and 26 seconds sound?

Though Hardware Render doesn't like subds too much - they just don't appear!(they do in the viewport, but not the renderuser added image) Nor do shadows look too spectacular, nor is there any glow where there is with a software render. But still, it's helped more than I thought it would with modelling already and for the price, I reckon it's not too bad.

Thanks gster123 for the soft bodies tip. It's sure going to look a whole lot better than my crappy attempts with software particles thus far. Nice one.

Simon.

edit: thanx for the kind comments one and all.


Last edited by enhzflep; 13-12-2006 at 05:22 PM.
# 12 13-12-2006 , 06:12 PM
Zefiris's Avatar
Registered User
Join Date: Mar 2006
Location: Germany # B-W # S. Gmünd
Posts: 9
Yeah well, I guess anything is better than my Radeon 8500 user added image.

And I got some problems with the shadow when I use caustics on a glass with a liquid object in it. By simply using ray trace shadows it turns out fine, but if you want to add photons to make the shadow appear more realistic the shadow turns out fully opaque and not transparent as it did without caustics. I'll post the renders in a bit, as I closed Maya and now have to render the stuff again.

EDIT: Here's the stuff..
RayTrace w/o caustics:
user added image
Standard caustics:
user added image
Better caustics with more refractions, max depth and photon intensity:
user added image
And here's some phenomenon i just figured ;D
It looks like there're bubbles in the liquid, though I didn't add any.
user added image

Hope someone knows how to make a nice looking caustics shadow with this.

-- Zefi


www.fallofmankind.de

It's a small world but not if you have to clean it.

Last edited by Zefiris; 13-12-2006 at 06:40 PM.
# 13 14-12-2006 , 05:08 AM
enhzflep's Avatar
Subscriber
Join Date: Oct 2006
Location: Melbourne
Posts: 313

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads