Editing Arcane University:Mesh Collisions
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 6: | Line 6: | ||
==Common Shape Types== | ==Common Shape Types== | ||
[[File:WRjaildoor.png|350px|thumb|right|The Whiterun jail door uses a box primitive.]] | [[File:WRjaildoor.png|350px|thumb|right|The Whiterun jail door uses a box primitive.]] | ||
− | There are three main types of collision meshes: '''Primitives''', '''Convex Shapes''', and '''Compressed | + | There are three main types of collision meshes: '''Primitives''', '''Convex Shapes''', and '''Compressed MOPP Shapes'''. Primitives are the simplest, and MOPP shapes are the most complex. The CPU usage required to simulate physics, therefore, is lowest for primitives, slightly higher for convex shapes, and much higher for MOPP shapes. For this reason, primitives and convex shapes are preferred, and are the only viable option for moving objects (weapons, clutter that you can pick up, etc.). MOPP shapes are reserved for static objects only (architecture, furniture, etc.). |
===Primitives=== | ===Primitives=== | ||
Line 14: | Line 14: | ||
Convex shapes are the easiest to create, and are extremely common for clutter items and simple furniture. Simply right-click the mesh in NifSkope, and select ''Havok > Create Convex Shape''. Adjust the roundoff error value if you need more or fewer vertices. The collision radius is an invisible shell around the collision shape, and may need to be adjusted later after testing. Smaller values result in a thinner shell. Generally, if the object is very small, it will likely need a smaller radius. | Convex shapes are the easiest to create, and are extremely common for clutter items and simple furniture. Simply right-click the mesh in NifSkope, and select ''Havok > Create Convex Shape''. Adjust the roundoff error value if you need more or fewer vertices. The collision radius is an invisible shell around the collision shape, and may need to be adjusted later after testing. Smaller values result in a thinner shell. Generally, if the object is very small, it will likely need a smaller radius. | ||
− | Convex shapes necessarily can not have concave areas, or "indents." For an object that needs this, use either a | + | Convex shapes necessarily can not have concave areas, or "indents." For an object that needs this, use either a MOPP shape (if it's a static) or a [[#List Shapes|list shape]], if it is dynamic. |
− | === | + | ===MOPP Shapes=== |
− | + | MOPP shapes are created in [[AU:Software#3D|3D software]] such as Blender, 3ds Max, or Maya. They are typically much simpler (i.e. fewer vertices) than the visible mesh. This can be done either by decimating a copy of the visible mesh, or removing edge loops manually for a higher quality collision mesh. MOPP meshes can also contain multiple collision materials. They can be exported to nif format using either [[Arcane University:CK-CMD for Skyrim#Including Collision Mesh|ck-cmd]] or [[Arcane University:Niftools/Chunkmerge for Skyrim|ChunkMerge]]. | |
==Special Cases== | ==Special Cases== | ||
Line 23: | Line 23: | ||
===List Shapes=== | ===List Shapes=== | ||
List shapes are collections of convex shapes or primitives. They are often used for bowls, that need to have dynamic collision, but cannot use convex shapes, as well as many weapons. These are most easily made in NifSkope by copying a bhkCollisionObject from a similar nif and adjusting it to fit, or making the list shape by hand in NifSkope. Lists of convex shapes can also be made using [[AU:Nifskope for Skyrim#Forks|Spectral's NifSkope fork]]. | List shapes are collections of convex shapes or primitives. They are often used for bowls, that need to have dynamic collision, but cannot use convex shapes, as well as many weapons. These are most easily made in NifSkope by copying a bhkCollisionObject from a similar nif and adjusting it to fit, or making the list shape by hand in NifSkope. Lists of convex shapes can also be made using [[AU:Nifskope for Skyrim#Forks|Spectral's NifSkope fork]]. | ||
− | |||
− | |||
===Constraints=== | ===Constraints=== | ||
Line 53: | Line 51: | ||
*'''Translation/Rotation:''' Translates and rotates the collision mesh. Only enabled in bhkRigidBodyT blocks. | *'''Translation/Rotation:''' Translates and rotates the collision mesh. Only enabled in bhkRigidBodyT blocks. | ||
*'''<span id="inertia tensors"></span>Inertia Tensors:''' Determines the force necessary to rotate an object around each axis. Ideally would be calculated based on the mass and dimensions of the object, but can be copied from a similar vanilla object, or tweaked until it looks right in game. m11 corresponds to the X-axis, m22 to the y-axis, and m33 to the z-axis. Higher values make the object turn more slowly around that axis. Importantly, if a clutter object lacks inertia tensors, it will slide or float away when Havoked, carrying other nearby clutter with it. Conversely, if a static object has inertia tensors, it will move around when Havok simmed in CK, when it should not. | *'''<span id="inertia tensors"></span>Inertia Tensors:''' Determines the force necessary to rotate an object around each axis. Ideally would be calculated based on the mass and dimensions of the object, but can be copied from a similar vanilla object, or tweaked until it looks right in game. m11 corresponds to the X-axis, m22 to the y-axis, and m33 to the z-axis. Higher values make the object turn more slowly around that axis. Importantly, if a clutter object lacks inertia tensors, it will slide or float away when Havoked, carrying other nearby clutter with it. Conversely, if a static object has inertia tensors, it will move around when Havok simmed in CK, when it should not. | ||
− | *'''Center:''' The center of mass. May not be where the object is held when picked up, since that is determined by the origin point of the nif | + | *'''Center:''' The center of mass. May not be where the object is held when picked up, since that is determined by the origin point of the nif. |
*'''Mass:''' Mass in kg. | *'''Mass:''' Mass in kg. | ||
*'''Linear Damping:''' How much the object's linear velocity is slowed over time. Typically 0.1. | *'''Linear Damping:''' How much the object's linear velocity is slowed over time. Typically 0.1. | ||
Line 66: | Line 64: | ||
===Collision Material=== | ===Collision Material=== | ||
− | Collision material is set in each shape. It determines the sound and visual effect when the player strikes it with a weapon, as well as whether arrows stick in it or bounce off, whether it bleeds, and what sound it makes when walked on. Stair materials are used to keep the player from getting stuck when walking up stairs. | + | Collision material is set in each shape. It determines the sound and visual effect when the player strikes it with a weapon, as well as whether arrows stick in it or bounce off, whether it bleeds, and what sound it makes when walked on. Stair materials are used to keep the player from getting stuck when walking up stairs. MOPP meshes can have multiple materials per shape. |
==Troubleshooting== | ==Troubleshooting== |