Jump to content

NifSkope and MOPP collision problem


ThePersyn

Recommended Posts

I'm making some interior models (wall, floors, hallways, etc.) for FNV and I'm able to get them in game but they are causing problems with the 3rd Person camera.

 

I make the models in 3ds Max 2012, export with NifTools 3.9 and convert/copy/paste with NifSkope 1.1.3. In order to get the destination file to update for the new MOPP collision, I have to select: Spells/Batch/Update all MOPP code. While that does update the collision, it also breaks it. When standing on a floor using the new collision in 3rd person mode, the game will either crash or the 3rd person camera will pass through the wall of the room showing the model from the outside.

 

I've also tested it on vanilla models and it has no effect unless the collision is altered in some way, and then it breaks the vanilla models as well.

 

Is there anyway to get the MOPP code to update correctly? Is there another way to get statics into the game?

Any help/insight would be greatly appreciated.

Link to comment
Share on other sites

What are the settings that you are using to export your collision from max?

 

I import a vanilla file like utlhallbgendexbg02.nif, make the changes, apply XForm and then export.

 

Material: Stone

Bounding Volume: Packed Strip Shapes

 

Exporter options checked:

Collision

Flatten Hierarchy

Update Tangent Space

Collapse Transforms

Zero Transforms

Transforms

Sort Nodes

Add Accum Nodes

 

After export, I run Spells/Optimize/Stripify all TriShapes, copy/paste over to the vanilla file it is based from and then run Spells/Batch/Update all MOPP code.

 

It usually crashes when the PC steps on the collision and looks down which cause the camera to swing up or to the side. If the game doesn't crash, the camera goes through the roof or wall.

 

EDIT: It also does it to vanilla files with no export from 3ds Max involved. Using utlhallbgendexbg02.nif I manually moved around some verts on the collision mesh, ran the MOPP Update and it crashed the game as well under the same conditions listed above.

Edited by ThePersyn
Link to comment
Share on other sites

Collision objects in max have to be attached to a bhkRigidBody

 

You have to attach a bhkRigidBodyModifier to the collision object - with the correct bounding volume, in this case Packed Strips Shape

 

When you export from max, select the bhkRigidBody to export collision, not the actual collision object in your scene.

 

Then you shouldn't need to update MOPP code at all.

Link to comment
Share on other sites

As far as remember, Max doesn't produce a valid nif that can be imported directly into the GECK. My understanding is that it needs to have the NiTriStripsData swapped into a valid nif so it can be used in the GECK. Is that no longer true?

 

The problem I'm having happens during the swap, and the collision doesn't behave correctly until MOPP code is updated. The model behaves as if there are two collision objects in the scene, the old one and the new one, until updated. The files I'm starting with are vanilla files with the proper Havok modifier, I'm simply replacing the originals meshes with my own. Everything works as it should except in 3rd person mode it crashes.

 

I've imported more than 300 models into the game but those were typically convex collision. Pretty easy. Now I'm trying to do architectural statics and the MOPP collision isn't going as smooth.

 

Are you saying I need to export the collision separately rather than as a part of the full file?

 

Thanks for your help!

Link to comment
Share on other sites

You should be able to select your mesh or meshes as well as the bhkrigidbody in max when you go to export your .nif.

 

I really want to help you out because I deal with creating collision for static objects on a daily basis and I've never encountered the issues you are describing. This is puzzling. Why do believe your problems stem from updating the MOPP code to begin with?

 

The niftools for max do allow you to create a valid .nif that's ready for importing into the GECK. In most cases, however you do have to either swap out the BSShaderProperties or the NiTriStrips, but this is irrelevant since the NiTriStrips belong to a different node entirely separate from the collision object in nifskope.

 

I mean, are you deleting the old bhkMoppByTreeShape after you've pointed the bhkRigidBody to the new one?

 

Another possibility here is that you're doing everything right and for whatever reason the collision model you're working with has issues on its own: unwelded vertices or overlapping faces. In max, try converting the collision object into an editable poly and welding vertices together.

Link to comment
Share on other sites

I got it now. When I originally tried exporting from Max a few months ago the mesh crashed my game. The tutorials I found described the swap method and that's what I was using. Exporting works now when using Stripify all TriShapes and Update all MOPP Codes before importing into the game. Thanks for clearing that up.

 

After export though, the Shader Flags and the Consistency Flags get changed which is easily fixed, but the textures show up noticeably brighter than the originals. Is there any way to fix that or prevent that from happening? I tried swapping BSShaderPPLightingProperty with the original and adding a NiMaterialProperty to the node (because none shows up after export), but neither of those attempts had any effect. Any ideas?

Link to comment
Share on other sites

Try updating all tangent spaces from spells → batch.

 

When you import a .nif into max, faces are separated along UVs which screws up smoothing groups. At least, that's my theory. I always weld vertices together when I've imported a mesh from the game.

 

The shininess is controlled in the material properties as well. Look at the glossiness and specular color. Specular color for most objects is usually null (black).

Link to comment
Share on other sites

Correct, correct, and correct.

 

Updating tangent spaces and adding NiMaterialProperty to each node (with the correct settings from the original) fixed most of it, but some parts had a gloss to them. When imported into Max one of the parts got a smoothing group added to it because Auto Smooth Mesh was checked in the import options. Unchecking that option imported it correctly.

 

Thanks for all your help!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...