Archives of 34Bit:

Monday, July 23, 2007

Tutorial: Exploding Rockets in Particle Flow: Part 1



Exploding Rockets in Particle Flow: Part 1 – Particle Setup and Animation

Disclaimer: This exercise is only covering Particle Flow and the basic motion, to get the whole effect you will need to also apply materials to the particles. Materials and Final Touches will be in Parts 2 & 3… look for them soon!!


Scene Start: Rocket Object, Ground Plane, Gravity, UDeflector

UDeflector:



Gravity: Default



Now add a Particle Flow Source to the Scene. It is okay to keep this default for now but once in particle view strip the event down to the Birth and Display only. Add a Send Out Test to the event Birth.



Next create a new Event and Name it Rocket… Add a Spawn test and the following operators to the event; Position Object, Shape Instance, Speed, a Collision Test, and Force… note always put collisions on the bottom of the event stack. Next wire together the Send Out test in Birth to the Rocket event.



Spawn: Leave the default except check the delete parent box.

Position Object:



Shape Instance: choose the rocket.

Speed: We will change up speed in a second but first we need to align and link the PF Source object to our rocket. This way it does not matter how the rocket is positioned it will always line up with the icons arrow allowing us to just use the simple old speed instead of one of the variants.

Note: Once you add Speed to the event the particles will start to move. At this point you may notice that you have a stream of rockets instead of one rocket.

This is caused by the Birth event, during this tutorial I only want one Rocket Particle to be emmited. This way the particles will not slow down the computer to much, and if you ever want more than one rocket to launch it will only be the toggle of the Birth event.



Collision: add the ground plane deflector.

Force: add gravity… by default the gravity will only allow my rocket to get up only half of its own height. I will need to adjust the Speed and the influence of the Force Operator to get the desired look. For this exercise I only want my Rocket to go up for a couple of seconds and come back down so that we can complete the explosion, later I may want to adjust for longer flight times.

The only other adjustments I have made at this time was to change the Collision to Stop from Bounce and to slightly tilt my Rocket Object to get a better trajectory. The main problem we get at this point is the fact that the rocket just falls back to the ground, well we want it to turn with its trajectory. To do this we will need to add a Rotation operator to the Rocket event. Out of the options in rotation choose Speed Space Follow. You will notice that the rocket will now rotate based on its trajectory. If it still needs to be adjusted you will want to follow these steps to fix it:



Create a copy of your Rocket… then choose the New Rocket to be the Shape Instance. Now you will need to adjust the New Rockets Pivot Point until you get the desired result. We want to do this because we do not want to mess with the Original Rockets pivot. That may lead to complications later during animation.



You can also just adjust the Orientation Matrix to get the same result, but setting up the copy of the rocket it allows us to; add a wobble effect by changing the instanced geometry and its pivot, more control over rotation animation with particles, to keep the base object default while still having the ability to morph the instanced particle and even animate it.


Excellent now it is time for the Rocket Exhaust… in this exercise we are only going to do the particles for smoke. To take it a step further you would want to also apply fire to the exhaust. Add a Spawn Test under the Collision Test in the Rocket event, also create a new event with a Shape Facing operator in it… rename this event Exhaust. Wire together the Spawn02 test in Rocket to Exhaust event.



Spawn02:



I have also changed the display in Exhaust event to Geometry.

Note: With shape facing you must choose either a camera or an object to have the Facing objects face. I like to make a control object to align the Shape Facing to. This way if I switch cameras all I need to do is re-align the control object. Much easier than changing the Operators. I created a Point object to aid me in this. Once created I will choose this Point object for the Shape Facing operator in the Exhaust event… remember to rename this object.



To fix the Exhaust from going through the ground add a Collision Test to the Exhaust event and choose the ground deflector. Also we will need to add a Delete operator to the Exhaust event. Depending on the effect you may want to choose different life spans, but for now I am going to choose 65 with a variation of 30.



We are now done with the exhaust effect; it is time to move on with the explosion particles of this exercise. When the rocket hits the ground we want it to explode into fire and smoke leaving a scorch mark.

Here is the setup: create a new event by adding a Shape Mark, link this event to the Collision in Rocket and rename the event Scorch Mark, you will need to select the Shape Mark operator and pick the ground as the contact object, also adjust the size to fit the explosion… a big explosion will want a big scorch mark while a small explosion will only require a small mark. Once you adjust the Shape Mark event add a Spawn test to the Scorch Mark event, also add a Shape Facing as an event and rename it Initial Explosion. Add a Speed by Surface to the Initial Explosion event.



Select Spawn 03 in the Scorch Mark event and change the Offspring# to 10… later we will crank this number up, but for now 10 will due. As for the Shape Facing in the Initial Explosion event choose the same helper to align it to as the Exhaust. Choose the appropriate size for the particles. Remember to always add variation to chaotic effects like fire, smoke, explosions, water effects … it adds a nice sense of realism to the scene.

Select the Speed by Surface Operator and choose the Surface Geometry that the particles are moving against… for now it is the ground otherwise it would be the contact object. Change the Speed to 600 with a variation of 600. This number will also vary based on the size of the explosion wanted. What you want to do is scrub the time line about three frames after the Initial Explosion event takes place. Then adjust the speed and variation so that it is the size of the explosion that you are looking for. Change the Divergence under Direction to 43.



These particles that we are setting up are going to represent the size of the explosion, they are going to die fast but we need them to move fast. Watch a couple of slow motion videos of explosions and you will notice that even in slow-mo they move very fast. Most people when creating this effect would just skip to the nest step but that creates very hollow explosions… this is not the case an explosion is not hollow it does not contain air pockets, explosions are thermodynamics, thermal expansion and entropy at work so we must represent them in that fashion. To do so some particles are going to move very fast while some will not move at all, we will also split the explosion up in two different explosions; one along the ground, the other upward pushing off the contact object. We will do the upward explosion first.

Now it is time for the actual Explosion; add an Age Test to the Initial Explosion event, and create a new event by adding a Spawn Test… rename this event Explosion. Add a Shape Facing and a Speed operator to the Explosion event. Wire the Age Test in the Initial Explosion event to the Explosion event.



Age Test: Test Value: 2, Variation: 1

Spawn: Check Delete Parent, Offspring# 20, Variation% 50

Shape Facing: Choose the Helper from the previous Shape Facing operators, Size 15, Variation% 50.

Speed: Speed: 50, Variation 50… number may vary based on desired outcome.

Adding in the smoke to the explosion is almost the exact same process as adding the explosion, only we will let the explosion live longer before it turns into smoke. Add an Age Test to the Explosion event.

Age Test: Test Value: 10, Variation 15

This will allow form some quick smoke but still having particles last just under a second. You may want o vary these numbers to make the explosion last longer or even shorter. To finish off the smoke add Spawn as an event and rename it Explosion Smoke. Add to the Explosion Smoke event a Shape Facing, Force and Delete operators.



Delete: Life Span: 90, Variation: 45

Shape Facing: Choose the Helper from the previous Shape Facing operators, Size 8, Variation % 50. We want to just make sure that the smoke particles are slightly smaller than the explosion particles.

Spawn: Check Delete Parent, Offspring# 4, Variation % 50, Speed: Inherited % 8, Variation % 50, Divergence: 90.

Force: Add the Scenes Gravity, change the Influence% to -20%, this may vary depending on the size of your scene. We are using this Force to lift the smoke up in the air. We do not want to use a Speed to achieve this because that will cause our smoke effect to look sparse. Instead we will only give it a slight movement from the Spawn test and then make it rise by giving it a slight negative influence of the scenes gravity.



As mentioned earlier in this exercise, we split up the explosion into two parts. One going upward reflected off the contact object, while the other travels outward across the contact object. Both, for the most part, will have the same properties so we can simply copy and paste the upward explosion to create the outward explosion. We still want to do this one step at a time:


First select and copy the Initial Explosion event… rename this event Initial Explosion Outward.



Select the Spawn operator in the Scorch Mark event, copy and paste the Spawn operator back into the Scorch Mark event… paste as an instanced. You will notice that the Spawns in Scorch Mark become italic, this allows you to now that it is in instance. Wire this Spawn to the Initial Explosion Outward event. Select the Speed by Surface operator in the Initial Explosion Outward event and change the Direction to Parallel To Surface with a Divergence of 35.



Note: a 3D Max user sees instances as bold, but in Particle Flow they are italic.

You may notice that some of the particles from Initial Explosion Outward event travel through the contact object. To fix this add a Collision test to Initial Explosion Outward event, and choose the ground deflector. This will send the particles that traveled through the contact object outward, aiding in the explosion.



Next we will copy the Explosion event and rename this new event Explosion Outward. You will want to wire the Age Test in the Initial Explosion Outward to the Explosion Outward event. The only other change you will need to make is to add a Collision test to the Explosion Outward test… if you want you can even copy/paste the Collision test from the Initial Explosion Outward event. This will stop the bulk of the explosion from going through the contact object.



Last but not least copy the Explosion Smoke and rename this new event Explosion Smoke Outward. Simply wire the Age Test in the Explosion Outward event to the Explosion Smoke Outward event. The property I changed was the Force operators Influence% to -11.5. We want to do this so that the center of the explosion rises faster than the edge. The center is where the most intense heat is located, and since heat rises we want the center to rise faster.



The last step in this part will be to increase the Spawn’s Offspring# in the Scorch Mark event, right now they are at 10. I want my explosion to be thick and full in volume so I will want to increase the number. I will increase it to 25, by the very end of this effect we may go as high as 100, but for now 25 will work.











Thursday, July 19, 2007

Tutorial: Basic Keyframing in Character Studio

Ralph Apgar's 4 1/2 Step Process for Key Framing in Character Studio
*Using this process involves using the Key Info rollout in Character Studio to record the keys. Do not use Auto Key or Set Key.

Step 1 -> 3: Setting the Tracks
The Tracks are located in the Character Studio Rollouts

Step 1: Select Track "Body Horizontal", Position the character along the X and Y axis. Record the key from the Key Info rollout.
Also, you need to realize that once you select any track you now have the Bip selected. The Tracks are how you set the keys for the biped.

Step 2: Select Track "Body Vertical", Position the character along the Z axis. Record the key from the Key Info rollout.

Step 3: Select Track "Body Rotation", Rotate the character along the X,Y, and Z axis. Record the key from the Key Info rollout.
These steps are just to position your character in world space.

Step 4: Position your character into its proper pose. Once you have the desired look select the whole biped minus the Bip. To do this double click ont the pelvis. If you have objects linked to the biped that don't belong, sword, shield, and object that isn't part of the original config, you will need to unselect those objects. If so make a selection set for easy selecting in the future. Next, Record the keys from the Key Info rollout.

Step 4 1/2: Choose your Planted, Free, and Sliding Keys. In the Key Info rollout you have some other key framing options that just normal key frames. The Planted Keys, used to plant feet and hand in world space. Sliding keys, used similar to Planted Keys but allow for slight movement. Free Key, used to replicate a normal key. This step is about deciding what keys are your planted keys and what keys need t be free keys. For example, if your character is walking the foot that supports your characters weight will be the planted key frame, while on the other hand the foot that is in motion is a Free Key.

------------------------------------------------------------------------------------------------------------------------------



The Start - create a biped, with the biped still selected open up motion panel for all Character Studio rollouts.



Step 1 - Select the Horizontal Track. "A", Hit the record button. "B", notice a key for the bip has been created. "C"



Step 2, Step 3 - Repet for Body Vertical Track "A", and Body Rotation Track. "B".



Step 4 - Douple click on the pelvis to select the whole biped "A", record the keyframe. "B"



Step 4.5 - Select the right/green foot "A" and set a planted key"B".



Step 1 - 3
Scrub out to frame 20 "A". Position the character using each track. "B" and record. Remember to do the rotation track even if your character doesn't rotate. One this forms good habbits, two it helps prevent minor mistakes down the line.



Step 4 - Position the biped in the disred pose. Double click ont he pelvis and record.



Step 4.5 - Select the left/blue foot and use a planted key "A". Select the right/green foot and use free key "A".



Step 1-3
Scrub out to frame 40 "A". Position the character using each track. "B" and record.



Step 4 - Position the biped in the disred pose. Double click ont he pelvis and record.



Step 4.5 - Select the left/blue foot and use a free key "A". Select the right/green foot and use planted key "A".

Tween as needed.



tween @ frame 10



tween @ frame 30