PDA

View Full Version : Pro way to put condensation droplets on a bottle a secret?


phleX
12-29-2009, 10:19 AM
So after I tried three different approaches to put condensation droplets on a bottle, searched the threads for solutions to the various issues I stumbled across and opened a few new threads on my way, I'd like to put it all together in one thread now.

Anyway it seems like a big secret how to best achieve that but somehow that's comprehensible, too.

The aim is to find an efficient but controllable way of distributing the droplets.

First attempt was using particles generated on the bottle's surface and render as blobby surfaces.
The main problem: The droplets' refractions look odd because it's 'whole' droplets that penetrate the bottle. Actually it should be more like 'half' droplets that end at the bottle's surface.
As you can't convert the blobby surfaces to polys you can't cut off the spare part.

Next I tried nParticles which you can convert to a mesh but when trying to cut off the part that penetrates the bottle I noticed that Maya's Boolean function seems to have some issues. Somehow it wasn't possible to subtract the bottle from the droplets' mesh, no matter what mesh resolution I used. In forums I found mainly people who recommended not to use Booleans at all.

The new approach is to use particle instances with a number of different pre-modeled dropshapes. I managed to control the emission rate as well as the instance scale on a texture and random basis. That way I can control how many droplets are generated in certain areas of the bottle and their size.
The particles are aligned to the surface's normals but I haven't yet figured out to give them random rotation along the normal axis.
The main problem however is, As the particles are more or less generated randomly, some are so close to each other that the droplets interpenetrate each other, which they are of course not supposed to. Because I can't convert the particle instances to polys either, again I can't delete the spare geometry.
Guess the best way would be to write a script that automatically keeps a certain distance between the particles dependent on their scale but my scripting skills end there...

Maybe another way would be to use realflow but when I generated particles randomly on my surface in RF I noticed that the particles are randomly distributed within the geometry's faces but hardly on their edges which led to a pattern. As I'm not into Realflow too much anyway, I tried the above mentioned approaches in Maya.

I'm curious about other people's experiences with that task and hope to find answers or even better, solutions.

Cheers!
phleX

Remi
12-29-2009, 02:15 PM
you could try paint geometry and then nCloth as well, there's a lot of different ways to do things in maya, which you've pointed out, there is no RIGHT way, only the way that works for you.

Cheesestraws
12-29-2009, 03:09 PM
With nParticles you can have them cull any particles that overlap on emission.

eddgarpv
12-29-2009, 03:25 PM
And with a renderman renderer you could use CSG.

InfernalDarkness
12-29-2009, 08:22 PM
You could also use nMesh with nParticles, tweak your collision settings, and get the droplets to look pretty clean. No geo inside the glass object, and with some tweaking the droplets can even take on water-like properties (surface tension, etc.)

spPaint3D is another instancing tool you could use with your pre-made droplets. You can randomize everything (rotations on each axis indepently, scale, etc.). You can find it here (http://www.creativecrash.com/maya/downloads/scripts-plugins/polygon/c/sppaint3d), and it works very well for billions of polys too.

http://www.creativecrash.com/system/photos/000/059/671/59671/big/sppaint3d_window.jpg?1252958522

The reason I think this one will be helpful for you is the "Distance threshold" at the bottom. Very useful for keeping things spaced apart. It's a raycast instancer, and the instances would conform to your glass object's normals, which would be helpful.

Pete2003
12-30-2009, 09:57 AM
I just tried an 'old-school' method using softbodies that seemed to work pretty well.

Basically, I created a rigid body cylinder acting as the bottle and a poly-sphere acting as a water droplet. I moved the sphere outside of the cylinder, duplicated it and moved the duplicate so it intersected the edge of the bottle. I then made the sphere a soft-body and made the duplicate object a goal.
Make the bottle a collision object for your soft-body droplet, and you should find that the droplet moves and 'sticks' to your bottle.

To duplicate the droplet I found that I had to move the pivot point of the softbody sphere to the centre of the bottle and parent the goal-droplet to the softbody-droplet. This allowed me to duplicate the softbody object with input connections and rotate and move the duplicates around the bottle.

Im not yet too familiar with nParticles and suspect that they would be the more up-to-date technique but good-old softbodies might help if you are having problems :)

Pete.

FirechameleoN
12-31-2009, 08:51 AM
You could also use nMesh with nParticles, tweak your collision settings, and get the droplets to look pretty clean. No geo inside the glass object, and with some tweaking the droplets can even take on water-like properties (surface tension, etc.)

spPaint3D is another instancing tool you could use with your pre-made droplets. You can randomize everything (rotations on each axis indepently, scale, etc.). You can find it here (http://www.creativecrash.com/maya/downloads/scripts-plugins/polygon/c/sppaint3d), and it works very well for billions of polys too.

http://www.creativecrash.com/system/photos/000/059/671/59671/big/sppaint3d_window.jpg?1252958522

The reason I think this one will be helpful for you is the "Distance threshold" at the bottom. Very useful for keeping things spaced apart. It's a raycast instancer, and the instances would conform to your glass object's normals, which would be helpful.



for those using maya 2008

http://www.rtrowbridge.com/blog/2008/11/27/maya-python-import-scripts/

u'll have to add pythonpath in maya.env..



btw, ty infernal for the link..

Remi
12-31-2009, 01:41 PM
Thanks for the link Infernal!!!

phleX
12-31-2009, 03:43 PM
Thanks guys for your tips.
I'll have to give it a try the next days.
Especially the spPaint3d script looks promising - thanks Infernal for the link!
Would be perfect if one could define a brush size so that the objects can be placed in a broader streak instead of one line. Maybe that's gonna be implemented in the future.
Happy new year to all of you!
phleX

CGTalk Moderation
12-31-2009, 03:43 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.