Butterfly Tutorial: Using Sub-ObjectsBy: Tiffani Banaszak |
| Requirements: |
|
Particle Storm 2.0 Jr or Pro and LightWave 5.5 or higher.
Sample Content location: Tutorials/PStorm2/Butterfly/ |
| Basic Overview: |
|
This tutorial will show you how to use Flocking and Swarming, how to parent emitters, cameras, and goals to objects in Layout, using Envelopes, and how to use both Sub-objects and the Item Motion plug-in. |
| Initial Setup: |
Parenting the camera to the Particle Storm camera Start by loading the scene Flocktut.lws. Press Play. You will see three null objects moving around. We will be using null two as our goal and null three as the emitter. Run PS2. Clear the PS scene to start from fresh. In Simulation, set the stop time to 15 seconds. To start with, remove the Gravity controller by right clicking on it and selecting Delete. We will not need gravity for this scene. Then let's parent our first camera to the Layout camera. To do this, select the camera, and then right click on Position. Select Parent to LW Item. A drop-menu will appear that says (none). Select this, and choose Camera. Do the same for the Orientation. |
| Parenting the Fountain: |
Now we will parent our Fountain emitter to Null 3 for Position only. Set the Orientation manually to 0, 270, 0. Change the Birth Rate to 500. Press Play. You will see a steady stream of particles emitting from the Fountain. But we only want about 40 butterflies total in the scene, all emitted in the first 4 frames, so we will need to create an Envelope. To do this, we need to tell the Particle Group that it is turned on for frames 0 through 4 only, and then off after frame 4. This way, it will be forced to send out a small group of butterflies before frame 4. |
| Enveloping the Fountain: |
![]()
The envelope editor To do this, click on Affected Particle Groups in the emitter controls. You will see PGROUP is turned on, and the value is Constant. We want to create an envelope, so choose Envelope and then click Edit Envelope. The Envelope Editor will pop up. You will see the setting is a constant value of 1 (for PGROUP, 1 means on and 0 means off). Create a key at 4 for 1, and another key at 5 for 0. Make the values Linear and click OK to save the envelope. You should now have a group particles emitted in the first 4 frames and then nothing else. Save. |
| Animating using Flocking and Swarming: |
![]() The flocking particles. Now create a Flocking and Swarming Controller. We want to parent the controller to Null 2, the same way we parented the emitter. Pushing Play should show you both the goal object and the emitter object moving. The particles are zooming past the goal too strongly, so set the Max. Acceleration to 1.5. Now you will see them moving more the way a flock of birds or butterflies might. Set the Max. Divergance to 135. The relevance of this setting will become very apparent once we load in the butterfly objects, as it makes them rotate back and forth like they are animated. At around frame 325, the particles go past the goal object into the ground. To create a motion where they swoop back upwards towards the goal, we need to use an envelope on the Max Acceleration setting. Let's set the strength to 5 at frame 325. Remember to also make a keyframe around 320 for 1.5 to keep the strength consistent throughout the simulation, and set all the keys to Linear. Click OK. Play, and you will see the particles swoop back upwards towards their goal. Now, we will make our particles show up in the Particle Storm interface as butterflies. We do this by using the Sub-Objects feature. Sub-Objects is a useful tool when you want to substitute objects for particles. If the objects are of a fairly simple geometry and do not need to be animated (i.e. flapping wings), you should use Sub-Objects. If they are large objects or need to be animated, you should use the Item Motion Plug-in. We will go through both procedures here. |
| Setting up and creating Sub-Objects |
First, Sub-Objects. In the PGROUP menu, change the Particle Type to Sub-Objects. Click Add and choose psbutterfly.lwo. Then set the number of particles to 40. Turn Show Tails to Off, and make sure the Particle Shape is set to Actual Geometry. Also, make sure Align to Path is set for the Orientation. You should now see the actual butterflies in the OpenGL preview window. |
| Recording and Importing. |
|
Importing and Recording sub-objects is done exactly like any of the other particle type. 1. Right click on the Butterfly particle group and select Create Effect Object. |
![]() ![]() |
|
2. You will notice that a dialogue pops up containing the locations and names of the newly created Sub-Objects. These are special .lwo objects that Particle Storm created, and you must use these objects only when you import them into layout. 3. Click Rewind, select Record, and then press play. The Particle Storm data is now being recorded to file in the same name as the effect file base. 4. Close out of Particle Storm. 5. Go into the Objects panel, and load the particle objects. (all of them if there are multiples) 6. For each of the objects, go into Displacement Map plug-ins and select Particle Storm. 7. For the effect file base, chose the PSM file that you recorded. 8. Exit back into layout. You should see some flocking butterflies. Notice that the butterflies are static, their wings dont animate. How would we use an animated object as a particle. Go to part two of this tutorial. |