Module 3 Crowd Animation Using Points, Particles and PFX Linker for creating crowd simulations in LightWave 8.3 Exercise 2 Section A Crowd Control Crowd simulation is something you see in movies every day, from the well known battle scenes in the Lord of the Rings saga to the secondary fish schools in Finding Nemo. Lightwave can handle some of these simulations to a degree using particles, baked animation and some linking, creativity and manipulation. The robot character was created by Epic Studios (www.epicsoftware.com), this I acquired on the CD from 3D World magazine # 64 Note: Most of the features that you encounter in the following exercises we did in reasonable detail in the previous modules. The main new tools/techniques used in the following exercises are the FX Linker, MDScan/MD Plug and using object emitters for geometry. Exercise 2a (Save As ex2a.lws) Army of Robots 1. Load the spam_robotwalk1.lws file. It contains a walk cycle of 36 frames for the robot. 2. Select the robot and open the properties window and go to the Deform tab. In the Add Displacement menu choose MDscan. 1
3. Open it and click on the arrow for the MDD filename name the baked walk cycle robotwalk1.mdd. Enter 36 for the Last Frame value (there are 36 frames in the walk cycle). Click OK to accept the settings. 4. Double click on the MDD displacement in the Add Displacement that you just created. This saves the settings to the file. 5. Now open the spam_robotwalk21.lws file. Add the MDscan displacement as you did before. Name this baked walk cycle robotwalk2.mdd and set the Last frame value to 36. Don t forget to double click on the plugin to save! 2
6. Though we may not use this animation in the class, open the spam_robotjump.lws. Add the MDscan displacement, naming this jump robotjump1.mdd and setting the Last Frame value to 32. Click OK the double click on the plug-in to save. Now we setup particles to place our robots into. Note that there are different techniques that you can use for battle/crowd scenes of this nature. I ll touch upon two, one the organized army march and two the chaotic battle charge with random movements and actions. The organized army march [This technique uses a plane/flat box created in modeler with 5 * 5 total edge segments giving us 25 points which will be used with particles to create a marching army of 25 robot soldiers. The distance of the points on the plane and its size determines the distance of the characters] 7. Clear the scene. Load the object called walkplane1.lwo into layout. Change the end frame value to 240 frames. 8. In the properties->dynamics tab add an emitter dynamic to the plane object 9. In the Generator tab change the Birth Rate to 25 and the Generate by to Frame to generate 25 particles a frame therefore 25 frames will always be there based on their life (set in the particle tab). Set the Nozzle to Object-Vertices to use the points on the plane object we loaded, we don t need more than 26 particles for the Particle Limit. To pre start the animation (though not necessary for this tutorial) turn on the Fixed option and set the Start Frame to -5. See image below 3
10. For the Particle tab set the particle resistance to 0 so that only the weight (somewhat) and the velocity vaues determines the speed of the particles/march. Our animation has 240 frames with 5 extra frames for the fixed start frame value we set in the Generator tab, so set the Life Time(frame) to 246 (240 + 5 + one extra for the love of prudence). 4
11. Changes to the Motion tab would only include changing the value of the velocity at the Z axis to -5 m so the march heads towards the camera (the model/animation is also facing the Z axis any other velocity setting would be a sideway, backward or floating march :D ) 12. You can also experiment creating and using a null at any location of your choice and using the null for the target option in the motion tab; the particles should follow the null in the same order. We have already create d and setup the path and speed for the armies march now we use load the robot soldier object from before, and link it to the particles copying it 25 times, giving us our 25 fold marching army 13. Load the object Soldier1.lwo into layout. 14. With the new object selected open the properties window and go to the Deform Tab and choose the MDplug from the Add displacements menu. 5
15. Open the settings dialog for the plug-in by double clicking on it. Load the robotwalk1.mdd file that we created. Set the end behaviour to repeat, and turn on Key move so that translations such as moving and rotions can be added/key framed with the baked mdd animation 16. Click OK to accept. Note: When using MD with other displacement plug-ins (which should be loaded aftermd) be sure Key-Move is ON. Motion Designer ignores any plug-ins loaded above MD_Plug). 17. If you scrub your timeline now you will see the walk animation on the soldier. Now we are going to use a tool that allows great flexibilities to link and clone the soldier and its animation called FX Linker which is found in the Utilities tab -> Plugins category -> Additional WARNING: Using FX Linker is a one-way shot. You can t undo what it does after you click OK. Therefore, you should definitely save your scene before running this modifier. However it should be noted that a Particle FX Link modifier is added in the motion options (m) for each copy of the object made. Of course you can multiple select the copies in scene editor or otherwise and clear them from the scene and start over. (see first pic on page 7) 6
18. Open the FX Linker and choose Soldier1 for the Replace object if not already selected. Enter 25 for the copy value 19. Click OK to accept and wait a little, when its finished you should see 25 little soldiers in your scene. Create scene preview to view the animation in real-time. 7
Bonus info!! a. Select any ONE of the copies and open the MDplug setup dialog (properties/deform tab). Set the End Behaviour to Composite which allows you to use multiple baked animations as mdd files to an object by just applying multiple instances of the MDplug and the new mdd file(s) b. Add another MDplug displacement and apply the robotwalk2.mdd file to it, set the End Behaviour to Composite. Now we have to sets of animations for the object you selected. Heres what I had. If you want a more spaced army, size the plane before linking the particles to the object 8
9
Battle cry crowds [For this animation we will use a particle emitter from a null that is sized to suit the battle scene and number of combatants. We will set the particles to be in a random order for the chaos of the battle field. We will also randomize the animation and colour of the robot soldiers after they have been linked and cloned] 1. Clear the scene. Create a null and name it crowdemitter_null. 2. Set the Last frame to 360. 3. Add an emitter dynamic to it from the properties/dynamics tab. 4. Use the settings below for the following tabs. The main changes here from the last exercise are we are using a random value for the weight to spread the particles a little. We will also give the particle a size for the self interaction option in the Into simulate a bouncing/pushing collision when the robots collide with each other Generator Tab Particles Tab 10
Motion Tab Interaction 5. Load the Soldier2.lwo file. Use the MDplug displacement (Properties-Deform tab) to add any of the three mdd files that you created to the soldier2 object (add the animation which you think the majority of the army should take for example the robotwalk1.mdd which I will be using for this exercise). 11
6. Apply the FX Linker plug-in to it (Utilities-Plugins-Additional) use 30 copies. Press OK to accept and wait a little. When finished you should see your 30 strong army. Now we ll add some variation to the battle scene by selecting random soldiers and changing their mdd animation file and action start time and for some using object replace in the Items tab to replace the yellow soldier with the red soldier (Soldier1.lwo), then applying a different mdd animation to it. The replaced object will work with our baked mdd files because it contains all the polygons and points of the first object it only has a different colour. I am only going to do two you can experiment with the rest, or even create new mdd actions using the scene file spam_robotsetup.lws which is the red robot with bones, IK and its base pose. 7. Select any robot in the scene and use the Replace with object found in the Items tab-replace category. Choose the Soldier1.lwo file. You should see the yellow robot change to the red robot. 12
8. Open the Properties-Deform Tab MDplug displacement and change the mdd fie to robotjump2.mdd also change the action start to -9 to break the monotony of the systematic march (this should be done for most of the copied soldiers using different negative value to create a more chaotic disorganised battle scene). 9. Select another robot this time from the front and change the mdd to robotjump1.mdd and change the action start. Do this again for random soldiers. 10. Note that you can add wind or gravity dynamics to control the direction et al of your soldiers. 11. Create a Preview. 12. If you want you can change your camera view to recreate the intensity of the battle field now is a good time to do so. Note that if your OpenGL screen movements are a bit sloppy change the OpenGL setting to Bounding Box and set your camera. 13. Experiment and create some interesting mierda from these techniques. Think gladiator arenas, schools of fish, shuttle traffic etc. 13
Bonus to Try!! Gladiator Arena Setup a. First thing make sure you have random characters and random mdd animations for these characters (unless you are having them do the wave). Know that you can replace FX linker linked and copied objects to a totally different object and use a mdd file that was created using its geometry for it. b. In modeler simply create a cylinder with any many sides as needed depending on the scale or circumference of the cylinder. Create segments based on how many rows of seats you want. The creation of this cylinder should be based on the dimensions of the actual arena model and the desired spacing of your characters. c. Use the Taper Constraint tool found in the Modify tab Transform category, change the top view to bottom and taper from the centre of the cylinder 14
d. Size and stretch the cylinder as desired. When satisfied, delete the polygons by pressing k on the keyboard, leaving only the points. Lasso select all of the points and check to se how many points you have (I had 104).Refine if needed then save. e. In Layout load the object and apply an emitter to it then set it up, Set the Birth rate to the number of points in the cylinder unless you want less, generate by frame, change Nozzle to object vertices, and set the Particle Resistance value to 0. We do not need any velocity here. f. Load your main crowd object and Particle FX link it making as many copies as set by the points or Birth rate value. g. Change random copies to different objects and mdd animations depending on your intended result and that s it!! Compiled and Researched by Stephan Noreiga LightWave 3D for the professional - Course Lecturer SBCS Trinidad and Tobago 15