| Thinking Particles Dust from Collision Map |
|
|
|
| Written by Panait Mihai | |
| Tuesday, 02 March 2010 22:25 | |
|
Thinking Particles Dust from Collision Map.
In this tutorial we want to use a collision map to create dust like particles on the impact with the floor. Why to use a collision map to create particles on intersection points? Because it’s only being calculated once, meaning that it doesn’t require processing power to calculate intersection on every frame. On the other hand if you change the animation and the collision happens in different places then you have to export again the collision map. What is the collision map? It’s a gray scale sequence of images. White where collision happens and black elsewhere. In this case we have an animation done with reactor, baked into the fragments, and it’s less likely to change it once we have it done. So this is the perfect case for a collision map. Click read more and go to the bottom of this page to download the package containing the video and the scene files. Tutorial Length 18:33 min. Thinking Particles Operators Used in this tutorial: (O) CollisionMap, (O) MatterWaves.
Thinking particles 12 - Dust From CollisonMap from Mihai Panait on Vimeo.
Preview
Collision Map
Dynamic Sets
Transcript: Create a box in the scene. Set the length and width to 220 and height to 5. It’s best to make it square because we will export a square collision map. Also don’t use a plane because it’s hard for TP to calculate collision with an object that has no thickness. Move the box at the place of impact. Rename it Collision Box. Add an UVW Mapping Modifier to the box. Set the mapping to planar. Select the original floor object and hide it. Create a Thinking particles system in the scene. Select it and open the TP UI. Create a new dynamic set and name it create collision map. From operators, tools, add a collision map operator to the set. Select the Pick object button and select the collision box. Click the pick object button again and type H. This will display a pick object list. Select in the list all the geosphere fragments. Click Pick. The first object in the list must be the object for which you are calculating the collision map. Click the button below the group rollout. This will open a save dialog. Select the folder and the file name and type for the exported sequence. Let’s increase the quality of the map. Set the map width and height to 512. This is why the box needs to be square. Push the record button and wait until the export finishes. Open the folder to check if everything was fine. It seems that we have more files than we need. What it did was to export a sequence for each face of the box. So we have six material IDs and respectively six jpeg sequences. Select all the files and delete them. Select the box in the scene. And an edit poly modifier and enter the face selection sub object mode. Select all the faces and go to the material IDs rollout. Set the ID to 1 and click enter. Collapse the modifiers stack. Now our box should have only one material ID and should be mapped planar. Open the TP UI. Press the record button again to export the collision map. Now it took less time to export, which is a good sign. Open the export folder. Now we only have one sequence. A file for each frame. The problem with this map is that it remains white where a collision occurred. We only want to emit particles on impact. This means that we have to modify somehow the file. The white path must fade out. The dust doesn’t keep rising after the fragment has passed. So we need to keep the white spots only beneath the fragments. Fortunately this is easy to do. Open after effects and import the collision map sequence. Drag it to create a new composition with the same dimensions. From effects, blur and sharpen, add a Gaussian blur. Set it to 9. Create a new black solid underneath the collision map layer. Select the collision map layer and click control d to duplicate it. Add a levels effect. Drag the white point towards black and vice versa to invert the color. Set the mode to Linear Burn. Drag the top layer about five six frames to left. This will do exactly the effect we’re after. Create another black solid and fade all to black just before the third second. All it’s fine now. We are ready to export the sequence. Create a new folder and export the composition as jpeg sequence. Go back to max. Minimize the TP UI. Create a new plane in the top view, the same size as the box. Rename it emitter plane. Select the collision box and hide it. We don’t need it anymore. Select a new material and create a diffuse bitmap. Navigate to the newly exported sequence and select the first file. Enable the sequence checkbox. Click open. Enable show in the viewport. Click go to parent. Assign the material to the Emitter plane. Drag the time slider to see the results. Drag the map to a new slot as an instance. Name it collision map. Drag it once again. Name it collision map inverted. Go to the output rollout and enable the inverted checkbox. We will need this inverted map later. Open the TP UI. Create a new dynamic set. Name it emitter. Create a new particles group. Name it dust. Set the color to yellow. From generators, add a new matter waves operator to the set. Click the pick object based emitter button. Select the emitter plane from the scene. Set the group to dust. Set the type to particles per second. Set the lifespan to 0.5. set the speed to 30. Go to the emitter rollout. Uncheck the coordinates checkbox. Enable the show check box. This will display a red dot for every emitter. Set the scene to wireframe. Now you can see the red dots. Each dot represents an emitter. Go to emit on off manipulation. Enable use material map. This will use the current map from the object to activate the emitters. First we have to add more detail. Select the plane and set the length and width segments to 100. This will produce more emitters on square unit. We have to increase the number of particles now. Open the TP UI. Enable per emitter check box. This sets the particles per second to 1. This means 1 particle per second per emitter. There are still some emitters that do not emit particles. We have to increase the particles per second value. Increase the value until you are happy with the results. I’ll leave it to 7. Let’s add some variation. Set the variation for the lifespan to 50 percent. We will also use a map to control the lifespan of the particles. Open the material editor. Drag the inverted map to the mask slot as instance. The lifetime will be higher on the margins and will tend to zero underneath the fragments. Drag the same inverted map to the speed mask slot. Set the speed value to 50. This will be the maximum value. This will also give the particles more speed towards the margins. After the fragments stop we still have some particles emitting. To solve this problem we have to increase the threshold. Increase the threshold value to something around 0.1. Now all it’s fine. You can hide now the emitter plane and unhide the ground box. We are ready now to render the dust using fume fx or after burn, but this in another tutorial.
To DOWNLOAD Video Tutorial and Project Files CLICK HERE. *if you can't download the file, or the archive is corrupt you may need to use a download manager.
MediaFire
|












