Difference between revisions of "NifSkope: Adding Collision Model"
Jump to navigation
Jump to search
added a new step - Pack Havok Strips
imported>Entim (updated links) |
imported>Entim (added a new step - Pack Havok Strips) |
||
Line 1: | Line 1: | ||
The purpose of this article is to give a step by step guide to the [[Finessing Physics#Better Collision Modelling|Better Collision Modelling]] method described in [[Finessing Physics]] tutorial. The goal of the process is to create a simple model properly interacting with its environment. | The purpose of this article is to give a step by step guide to the [[Finessing Physics#Better Collision Modelling|Better Collision Modelling]] method described in [[Finessing Physics]] tutorial. The goal of the process is to create a simple model properly interacting with its environment. This method gives the most resource demanding type of collision model, but the easiest to create. | ||
==Getting Started== | ==Getting Started== | ||
Line 114: | Line 113: | ||
|[[Image:CollTut11.gif|100px|right|thumb]] | |[[Image:CollTut11.gif|100px|right|thumb]] | ||
|- | |- | ||
|valign="top"|<font size=2>'''9.''' </font> | |valign="top"|<font size=2>'''9.''' </font>Here comes the step which makes it worth to use this type of collision. Right-click on the '''bhkNiTriStripsShape''' block, and choose '''Havok -> Pack Strips'''. The bhkNiTriStripsShape block will be converted to a bhkPackedNiTriStripsShape. The NiTriStripsData becomes hkPackedNiTriStripsData. | ||
|[[Image:CollTut20.gif|100px|right|thumb]] | |||
|- | |- | ||
|valign="top"|<font size=2>'''10.''' </font>The collision data blocks must be in a specific order, which the | |valign="top"|<font size=2>'''10.''' </font>The meshes may not line up at all at this point. Select '''5 bhkRigidBodyT''' block in the '''Block List''' window, and double-click on the '''Value''' of the '''Translation''' in the '''Block Details''' window. Play with x, y, and z until the collision geometry lines up with the mesh. | ||
|- | |||
|valign="top"|<font size=2>'''11.''' </font>The collision data blocks must be in a specific order, which the hkPackedNiTriStripsData doesn't fit in yet. Choose '''Reorder Havok Blocks''' from the '''Spells''' -> '''Sanitize''' menu. To reorder the blocks manually, right-click on the '''1 NiTriStripsData''' block, and choose '''Block -> Move Down'''. Notice the reference number has changed to '''2'''. Repeat the '''Move Down''', so the number becomes '''3'''. See [[Finessing_Physics#Simple_Collision_Modelling|Finessing Physics]] tutorial's explanation of the correct block order. | |||
|[[Image:CollTut15.gif|100px|right|thumb]] | |[[Image:CollTut15.gif|100px|right|thumb]] | ||
|- | |- | ||
|valign="top"|<font size=2>''' | |valign="top"|<font size=2>'''12.''' </font>Save the NIF. | ||
|} | |} | ||
Example of the result NIF is [http://www4.rapidupload.com/d.php?file=dl&filepath=27622 here]. | Example of the result NIF is [http://www4.rapidupload.com/d.php?file=dl&filepath=27622 here]. | ||
Line 145: | Line 137: | ||
[[Image:CollTut13.gif|100px|right|thumb]] | [[Image:CollTut13.gif|100px|right|thumb]] | ||
Select the '''bhkPackedNiTriStripsShape''' block. Expand the Sub Shapes array in the '''Block Details''' window. Double-click on the '''Value''' of the '''Material''' property (currently '''HAV_MAT_STONE'''). You get a drop-down list of available materials. This list with some explanation is available as tooltip (hold your mouse over the '''Type''' field of the Material property). Choose the material from the dropdown list, or enter the appropriate number which can be found [http://www.niftools.org/doc/nif/HavokMaterial.html here] as well. This setting controls the hit sound, step sound, arrow penetrability, and particle effect of the surface. | |||
===Collision properties=== | ===Collision properties=== | ||
Line 155: | Line 146: | ||
Most important properties: | Most important properties: | ||
*The '''layer''' settings control the | *The '''layer''' settings control the collision model's color in the '''CS''', and other properties as well, for example the NONCOLLIDABLE layer will make the collision body to behave like a harvestable object (no collision, but the activator icon shows up). The list of layers with some explanation is also available as tooltip. | ||
*'''Motion System''', '''Unknown Byte 1''' and '''2''', '''Quality Type''' controls wheather the object is static or mobile. See [[Finessing_Physics#The_Main_Blocks|Finessing Physics]] tutorial's bhkRigidBody explanation. | *'''Motion System''', '''Unknown Byte 1''' and '''2''', '''Quality Type''' controls wheather the object is static or mobile. See [[Finessing_Physics#The_Main_Blocks|Finessing Physics]] tutorial's bhkRigidBody explanation. | ||