View Full Version : urgent !
maxguy 02-16-2003, 03:37 PM hi,
I got stuck up with a small problem..i like to animate flying debris around a character ..debris mostly consists of paper..can u guys tell me a way out to get the realistic results of paper flying..i am trying out doing manually and instancing it ..i like to know any other way out there..,
regds
max
|
|
luminis
02-16-2003, 07:02 PM
You can use particles - using instanced geometry particles. Then you can control how they move with fields, and even collissions if necessary, or you can only give them a certain velocity so that they move uniformly accross the scene.
I'd be more than glad to write a quickie tutorial on how to do this to help you out - but since there are many different ways of doing this, I would need you to just tell me the following things to create it as best suited to your needs as possible:
- What's your experience with particles and dynamics? (so I know what you already know, and what to explain).
- Are there going to be different kinds of paper debris, or would it be enough to have them all look the same?
- Is it going to be moving around in different directions (such as moving with turbulence)? or just flying accross the scene (as if wind was blowing them away)?
Let me know these things, and I'll show you the steps to do it.
luminis
02-17-2003, 09:20 PM
Ok, as promised, here's the quick tutorial for creating this effect using particle instancing.
From the info on the e-mail you sent me, I decided to create three types of object. A box, and two bits of paper in two colors.
So let's get started...
1.) Start creating three pieces of geometry.
http://www.luminis3d.com/etc/cgt/img/paper/01.jpg
Here I created three poly objects, and named them: "bCube", "wSquare", and "rSquare" respectively.
2.) Create the particle groups that will be replaced by the geometry.
On the 'Dynamics' menu set, go to 'Particles/Particle Tool []' and open its options. Set some options similar to these:
http://www.luminis3d.com/etc/cgt/img/paper/02.jpg
Now, start clicking several times on the perspective view panel. Everytime you click, 20 new particles will be randomly placed around a volume of 5 units in radius (this is how it was set up in the particle tool options).
http://www.luminis3d.com/etc/cgt/img/paper/03.jpg
Keep clicking a few times on other places, until you have a good amount of these particles spread out throughout the grid, and press the Enter key.
http://www.luminis3d.com/etc/cgt/img/paper/04.jpg
All these particles, are part of a single particle group, which by default has the names "particle1" and "particleShape1" for its transform and shape nodes. Rename this to "wSquareParticles" so that we can easily keep track of what's going on.
3.) Instance the particle group to one of the geometry objects.
Select the "wSquare" object (the white square) and with this selected, go to 'Particles/Instancer (Replacement) []', also in the Dynamics menu set. This will open the Particle Instancer Options window. Select the particle group and the piece of geometry that will be instacned to this particle group.
http://www.luminis3d.com/etc/cgt/img/paper/05.jpg
When you click on 'Create', you will see that every point particle that existed before is transformed into a white square. This is what instancing is.
http://www.luminis3d.com/etc/cgt/img/paper/06.jpg
4.) Instance other particle groups.
Repeat steps 2 and 3 twice, for the other geometry objects, naming the particle groups "rSquareParticles" and "bCubeParticles". Instance them to their corresponding objects.
http://www.luminis3d.com/etc/cgt/img/paper/07.jpg
luminis
02-17-2003, 09:21 PM
5.) Fix the size and rotation of the particles.
The particles look too big to be considered debris. To make everything smaller, scale down *only the 3 initial geometry objects*, until everything reaches a size small enough.
http://www.luminis3d.com/etc/cgt/img/paper/08.jpg
Next thing we observe, is that they are all aligned perfectly. This is truly unrealistic, so we must rotate
them all randomly.
http://www.luminis3d.com/etc/cgt/img/paper/09.jpg
If we were to rotate the original geometry as we did when scaling, all particles would rotate accordingly, but they would all still be aligned with each other. We must look for a way to make them all rotate in random directions with no particular arrangement. One thing that can be done, and fixes this almost instantenously is this: Select one of the particle groups, such as "bCubeParticles" and open the attribute editor for its shape node.
http://www.luminis3d.com/etc/cgt/img/paper/10.jpg
Look for the 'Instancer (Geometry Replacement)' field and set 'Position' for the 'Rotation' attribute. What this will do is to set the rotation of each single particle according to its position in the scene. This will also ensure that as the particle moves, it will keep rotation (as it would be expected from debris flying around).
http://www.luminis3d.com/etc/cgt/img/paper/11.jpg
Notice now how all the cubes are rotated randomly. Repeat this step for the other two particle groups ("wSquareParticles" and "rSquareParticles"). The end result should look like this:
http://www.luminis3d.com/etc/cgt/img/paper/12.jpg
6.) Adding fields for particle motion.
Right now, everything looks quite static. Nothing is moving. We will take care of this by adding two fields. Fields are what make particles move. You could add things like wind, gravity, or newtonian force fields. But for this example, I will use two fields. A 'Vortex' field, which will make the particles move around the center of the scene, and a 'Radial' field, which will maintain particles inside a specified volume, so they don't fly out into emptyness.
So first, the Vortex field. Select *all three* particle groups ("bCubeParticles", "rSquareParticles", and "wSquareParticles"). Having them selected while you apply the field, ensures the field is dynamically connected to these particles, and actually affects them. Now, in the 'Dynamics' menu set, go to 'Fields/Vortex'. However, applying only a Vortex field by itself, although it makes all particles rotate around the center, it also blows them away.
http://www.luminis3d.com/etc/cgt/img/paper/13.gif
luminis
02-17-2003, 09:22 PM
7.) Add a Radial field to keep things inside.
Again, select all three particle groups to be sure they get connected to the field. Now go to 'Fields/Radial []' and open its option box. Set the options as follows:
http://www.luminis3d.com/etc/cgt/img/paper/14.jpg
'Volume Shape' makes the field only active inside a given volume, instead of working the same way throughout the scene. 'Volume Exclusion' makes the field active exclusively outside this volume, so it will be active everywhere except inside the selected sphere. The negative magnitude will make sure it pulls back in the particles instead of blowing them out even more. When you click on 'Create', a sphere is created. This is only a display aid, and is never rendered. Rescale this sphere so that it covers all particles at the beginning of the animation.
http://www.luminis3d.com/etc/cgt/img/paper/15.jpg
In summary, what this will do is this - A sphere will be created, and any particle that moves outside this sphere (because it was pushed away by the Vortex Field) will be sucked back in.
Essentially, that is the whole process... If you play the animation now, it might not be animated perfectly, because the exact values for the Radial and Vortex fields need to be tweaked until a good result is obtained. Something that can be useful also is to animate the Vortex Field magnitude from a certain number to 0, so that it is not on continuosly, as this will make the particles spin faster and faster each time. Additonally, for the Radial Field, the 'Use Max Distance' attribute should be unchecked.
Download this for reference if you want:
Sample Movie (http://www.luminis3d.com/etc/cgt/img/paper/paper.mov)
Maya .ma file (http://www.luminis3d.com/etc/cgt/img/paper/paper.ma)
Let me know if you need any help deciphering this stuff - I'd be glad to help. :)
luminis
02-17-2003, 09:26 PM
:surprised Hmm... Perhaps this was too long to post on a forum. Oh well, it's already done. :)
darkdeathdreame
02-18-2003, 12:36 AM
wow, you are really kind :applause:
glad to have people like you in the maya community :buttrock:
Boolieman
02-18-2003, 12:41 AM
Hey i think this thread should be known as a tutorial
CGTalk Moderation
01-14-2006, 10:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.