Thought I’d start my own thread on this so as not to highjack the initial Impact Tool thread. This is a script I’m working on inspired by the great work of Daniel Ferreira while he was working at Blur. Basically, it makes the process of setting up explosions and bullet impacts faster and easier. To see the original thread and have a look at Daniel’s impact tool, go here.
And now, on to Winchester. I’m posting the first beta version for people to try out.
Instructions:
- Define the “gun” and “target” using the pick buttons at the top. Optionally define the “ground” for particles to come to rest on.
- Define the type of tesselation to use for the target. “Tesselate” is localized around the impact point and results in a lower poly count, but “Turbosmooth” works better for organic objects like the curvy wall in my sample movie.
- Select the type of fragments you want. “Pyramid” is good for testing, or long shots where you don’t need detailed meshes. “Custom” lets you choose one or more objects to use as instances in the particle system.
- “Hit Radius” defines the size of the hole left by the gun shot.
- “Randomize +/-” randomizes the size of the hole so they’re not all exactly the same.
- “Particles Per Hit” does what it says, defines the number of particle fragments for each hit on the target.
- “Begin/End Shooting” defines the time range to calculate the hits.
- “Random Shot Every” randomizes the frames that the gun fires. Choose a range that you want the shots to occur at.
- “DO IT!” does it.
Notes:
- The gun shoots from the +Z axis. Rotate it accordingly. The best way to visualize this is to create a pyramid object on the ground plane. The point of the pyramid shows where the gun will shoot. You can use the pyramid as the Winchester gun object, and link your real gun to it if you like.
- When you’ve defined both the gun and target, a green line will project out from the gun to the surface of the target when it’s pointing the right way. Use this as a guide when animating the gun shooting across the target.
- When you can see the green aiming line, adjusting the hit radius spinner will bring up a circle of the same size so you can visually see an approximation of how big the hole will be.
- VERY IMPORTANT! When the setup is complete, there are still two steps you need to manually do. One is to define the ground node for the ground deflector object. It will be selected, so just hit the pick object button and select the ground mesh. This is a limitation in MaxScript and there’s nothing I can do about it. The second is that you need to manually delete the link in the pFlow system between the parent box to the first event, called, “particle seeds”, and then relink them. This is a bug and hopefully I can find a way to get it eventually.
That’s it. Let me know what you think. Report any bugs you find. This is still a work in progress, so I’ll be adding to it over time.
Planned upgrades:
- smoke
- bullet and muzzle flash animation
- support for mulitple targets
- additional displacement maps for bullet holes
- anything else I can think of or sounds good
Winchester v0.1 script
Sample movie clip