Post by VagabondAngel on Jun 12, 2006 18:01:06 GMT
You need the latest NifSkope from NifTools.
Open you new custom Nif in NIfSkope and check the options View->Block List and View->Block Detail
In the Block List, expand the tree until you see the NiTriStrips branch and click on it (alternatively you can just click on the mesh in Render view and it will highlight the NiTriStrips branch - obviously the mesh must be in one piece and mapped to one texture for this to work)
Note - Multi-part meshes will work but you'll have to copy over each seperate NiTriStrip using this method.
Right click on the highlighted NiTriStrips branch and select Block->Copy Branch
Now click File->New Window to open another instance of NifSkope
In the new window, open an exisitng Oblivion Nif of roughly equivalent size/shape to your new mesh.
Right click on the Block List NiNode and select Block->Paste Branch - it will pop up a message about older NIf versios - just click OK. Your new mesh will appear in the Render view.
Now click on the main NiNode tree (not your new NiTriStrip branch) in Block List. Look down at the bottom frame in the Block Detail view and find Num Children, then double click on the number it corresponds to and change it +1 (ie if its 1, change it to 2 )
Below NumChildren in the Block Detail view is the Children branch - right click on it and select Array->Update then expand the branch. In the part that says "none" double click and put in the number from the Block List that corresponds to your new NiTriShape. Press Return and it should update to show the name of your new NiTriShape. Also the NiTriShape will be moved to within the main NiNode tree in the Block List view.
Next, click on the Oblivion mesh you loaded in the Render window - its NiTriStrip should be highlighted in the Block List view... right click on it and select Block->RemoveBranch. The Oblivion mesh should vanish along with its references is the Block List view.. leaving just your new mesh.
Now its nearly ready to save (save it anyway in case you make a mistake)
Select Render->Draw Havok - that will show the Havok collsion box around the mesh. If you chose well, it shouldn't be far off your new mesh.
If the shape/size needs adjusting, its can be a bit fiddly depending on the shape but it is possible...
Expand all the sub-branches of bhkCollisionObject in the Block List view.
At the bottom of the tree will be one or more bhkCapsuleShape objects. Click on the one you want to adjust and its dimensional co-ordinates will be listed in the Block Detail view at the bottom (Unknown Vectors 1 to x) (Alternatively, click on the capsule you wish to adjust in the Render view and its details will be highlighted in the Block List.) To adjust correctly, just experiment.
Make sure you are pointing to the correct texture. It will only list the diffuse texture - n and g maps are applied based on material properties and must have the same name as the difffuse texture with either a _g or _n suffix. You probably know that crap already The NiSourceTexture must show the path "textures\folder\texture.dds" not "folder\texture.dds" or it won't show in game - this usually means the texture won't show in NifSkope but it works fine in-game.
And that's it - Save as whatever you like and you have new mesh with Havok. There are many unknown values in the Havok data at the moment so adjusting other Physics properties is very hit and miss. Its a start though, eh.
Open you new custom Nif in NIfSkope and check the options View->Block List and View->Block Detail
In the Block List, expand the tree until you see the NiTriStrips branch and click on it (alternatively you can just click on the mesh in Render view and it will highlight the NiTriStrips branch - obviously the mesh must be in one piece and mapped to one texture for this to work)
Note - Multi-part meshes will work but you'll have to copy over each seperate NiTriStrip using this method.
Right click on the highlighted NiTriStrips branch and select Block->Copy Branch
Now click File->New Window to open another instance of NifSkope
In the new window, open an exisitng Oblivion Nif of roughly equivalent size/shape to your new mesh.
Right click on the Block List NiNode and select Block->Paste Branch - it will pop up a message about older NIf versios - just click OK. Your new mesh will appear in the Render view.
Now click on the main NiNode tree (not your new NiTriStrip branch) in Block List. Look down at the bottom frame in the Block Detail view and find Num Children, then double click on the number it corresponds to and change it +1 (ie if its 1, change it to 2 )
Below NumChildren in the Block Detail view is the Children branch - right click on it and select Array->Update then expand the branch. In the part that says "none" double click and put in the number from the Block List that corresponds to your new NiTriShape. Press Return and it should update to show the name of your new NiTriShape. Also the NiTriShape will be moved to within the main NiNode tree in the Block List view.
Next, click on the Oblivion mesh you loaded in the Render window - its NiTriStrip should be highlighted in the Block List view... right click on it and select Block->RemoveBranch. The Oblivion mesh should vanish along with its references is the Block List view.. leaving just your new mesh.
Now its nearly ready to save (save it anyway in case you make a mistake)
Select Render->Draw Havok - that will show the Havok collsion box around the mesh. If you chose well, it shouldn't be far off your new mesh.
If the shape/size needs adjusting, its can be a bit fiddly depending on the shape but it is possible...
Expand all the sub-branches of bhkCollisionObject in the Block List view.
At the bottom of the tree will be one or more bhkCapsuleShape objects. Click on the one you want to adjust and its dimensional co-ordinates will be listed in the Block Detail view at the bottom (Unknown Vectors 1 to x) (Alternatively, click on the capsule you wish to adjust in the Render view and its details will be highlighted in the Block List.) To adjust correctly, just experiment.
Make sure you are pointing to the correct texture. It will only list the diffuse texture - n and g maps are applied based on material properties and must have the same name as the difffuse texture with either a _g or _n suffix. You probably know that crap already The NiSourceTexture must show the path "textures\folder\texture.dds" not "folder\texture.dds" or it won't show in game - this usually means the texture won't show in NifSkope but it works fine in-game.
And that's it - Save as whatever you like and you have new mesh with Havok. There are many unknown values in the Havok data at the moment so adjusting other Physics properties is very hit and miss. Its a start though, eh.