[dismiss]
This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.
Difference between revisions of "Blender/Custom Collision"
Jump to navigation
Jump to search
m
made it more professional (took out all the "I think..."s and any references to myself) and corrected some more collision stuff
imported>Morerunes m (clarified damping) |
imported>Morerunes m (made it more professional (took out all the "I think..."s and any references to myself) and corrected some more collision stuff) |
||
Line 4: | Line 4: | ||
Model | Model | ||
End Search Terms --> | End Search Terms --> | ||
[http://www.fileplanet.com/files/190000/190119.shtml Resource Pack for this Tutorial] | [http://www.fileplanet.com/files/190000/190119.shtml Resource Pack for this Tutorial] | ||
Line 12: | Line 10: | ||
===What's a Collision Mesh?=== | ===What's a Collision Mesh?=== | ||
It tells the game what to bump into (and also whether things can swing and bounce, or are like chains, but that's beyond the current scope of the tutorial), and whether to just sit there, or fall, or bounce, or float, etc. So basically, no collision, | It tells the game what to bump into (and also whether things can swing and bounce, or are like chains, but that's beyond the current scope of the tutorial), and whether to just sit there, or fall, or bounce, or float, etc. So basically, if there is no collision, you can walk through it, and it won't be affected by gravity, and nothing can touch it (kinda like a ghost, but it won't move, and you can't see through it). | ||
===Why Custom?=== | ===Why Custom?=== | ||
Why make custom collision you say? Well, the answer is simple. Because you don't want to walk through your mesh, or have your mesh bounce in mid-air or other weird problems. Sometimes it's | Why make custom collision you say? Well, the answer is simple. Because you don't want to walk through your mesh, or have your mesh bounce in mid-air or other weird problems. Sometimes it's okay to just use collision from another [[Glossary#N|NIF file]], but usually you should use custom collision. It is very easy, and does not take long, despite what some people may lead you to believe. It also does not ''require'' [[NifSkope]] edits. | ||
Line 22: | Line 20: | ||
===Have a Mesh=== | ===Have a Mesh=== | ||
You can't really make your collision mesh until you have a regular mesh, so either make a mesh to use, or download the Tutorial Resources and use those. | You can't really make your collision mesh until you have a regular mesh, so either make a mesh to use, or download the [http://www.fileplanet.com/files/190000/190119.shtml Tutorial Resources] and use those. | ||
First, decide what type of collision you want to use. If it's cylindrical, you want to make a Cylinder. If it's a rectangular prism (i.e. mostly squarish or rectangular), then use Box. If it's a sphere, use Sphere. If it's just some odd shape that needs accurate collision, then use either a Static TriangleMesh, or Convex Hull Polytope. | First, decide what type of collision you want to use. If it's cylindrical, you want to make a Cylinder. If it's a rectangular prism (i.e. mostly squarish or rectangular), then use Box. If it's a sphere, use Sphere. If it's just some odd shape that needs accurate collision, then use either a Static TriangleMesh, or Convex Hull Polytope. | ||
Line 28: | Line 26: | ||
===Making the Collision Mesh=== | ===Making the Collision Mesh=== | ||
If you downloaded | If you downloaded the [http://www.fileplanet.com/files/190000/190119.shtml Tutorial Resources], open '''chapstick.blend''', you want a cylinder. | ||
====Cylinder==== | ====Cylinder==== | ||
Line 35: | Line 33: | ||
[[Image:BlenderCollisionExample1.png]] | [[Image:BlenderCollisionExample1.png]] | ||
Then, fit the cube over your cylinder, stretching and scaling all you need, so that it covers it like this: | Then, while in edit mode, fit the cube over your cylinder, stretching and scaling all you need, so that it covers it like this: | ||
[[Image:BlenderCollisionExample2.png]] | [[Image:BlenderCollisionExample2.png]] | ||
When it fits perfectly how you want it to, go to object mode, and | When it fits perfectly how you want it to, go to object mode, and make any necessary rotations. This must be done in '''object''' mode, otherwise the rotation won't work. Go to object options. Change Draw Type to bounds. Then, go to Logic options, and click on bounds, and change it to cylinder. You should now see a wire cylinder over your cylinder mesh. There you go, you just made a collision mesh. | ||
[[Image:BlenderCollisionExample3.png]] | [[Image:BlenderCollisionExample3.png]] | ||
Line 66: | Line 64: | ||
====Static TriangleMesh==== | ====Static TriangleMesh==== | ||
This one works the same as the Convex Hull Polytope, except this one works for any shape. It does not have to be convex. | This one works the same as the Convex Hull Polytope, except this one works for any shape. It does not have to be convex. Kkeep the vertex count as low as possible to avoid a framerate drop. The only thing you do differently, is choose Static TriangleMesh instead of Convex Hull Polytope for Bounds. | ||
====The "Other way to do it"==== | ====The "Other way to do it"==== | ||
Line 114: | Line 112: | ||
[[Image:BlenderCollisionExample7.png]] | [[Image:BlenderCollisionExample7.png]] | ||
; Mass : Makes it heavy or light, big number = heavy. | ; Mass : Makes it heavy or light, big number = heavy. Will affect how well it flies through the air, and how easy it is to pick up | ||
; Linear Damping : Higher number will make it move through the air slower horizontally. (ex. side to side) | ; Linear Damping : Higher number will make it move through the air slower horizontally. (ex. side to side) | ||
Line 126: | Line 124: | ||
If you go into the bhkListShape (parented to the bhkCollisionObject), you can change the material. This will change the sounds that play when you hit it with a weapon, or throw it at something, or walk on it. You will also probably need to change it in each individual shape. (In 'ChapstickHavok.blend', there is only one, and it's a bhkCapsuleShape). This will allow you a wider selection of materials that aren't in the blender exporter. | If you go into the bhkListShape (parented to the bhkCollisionObject), you can change the material. This will change the sounds that play when you hit it with a weapon, or throw it at something, or walk on it. You will also probably need to change it in each individual shape. (In 'ChapstickHavok.blend', there is only one, and it's a bhkCapsuleShape). This will allow you a wider selection of materials that aren't in the blender exporter. | ||
Good luck! | |||
==See Also== | ==See Also== |