Common Problems With Meshes
From GECK
This page lists problems meshes can suffer from and reasons that they happen. Note that inidvdual causes listed are not always bad in and of themselves.
Problems
- General Performance Issues
- Description: In general it's rare a single NIF will cause performance issues, most of the time optimization problems stack with many other factors during play.
- Potential Causes:
- Many strips or shapes with the same properties and effects that are not merged.
- A single strip / shape that is physically big compared to the player with many triangles (All triangles in a strip are rendered if even a small fraction of the strip is on camera). In cases like this it can be good to split some geometry into another strip for more effective culling. In general split geometry sparingly and opt to merge in most cases.
- Geometry blocks containing certain blocks like Stencil and Alpha properties when not needed.
- High triangle counts in general.
- Geometry block bounds that are too big. Can be fixed by tweaking the "Radius" and "Center" settings by hand or using SNIFF to generate bounds.
- NumStrips being greater than 1. Typically a result of a bad Blender export, greatly increases draw call count.
- Performance Issues With Collision
- Description: Most performance issues with collision usually involve movables and in general are not as much of a problem with statics.
- Potential Causes:
- High triangle counts: In general only a concern for collision with physics enabled. With convex type collision make sure triangle count is kept low and in general avoid using MOPP collision and favor convex and primitives as much as possible, if higher detail is needed on the movable favor using "listshapes" which can contain multiple convex and primitive shapes.
- Very low penetration depth value: If the penetration depth setting on the bhkRigidBody is very low this effects how hard the engine will try to prevent penetration (Increased effect depending on "Quality Type"), additionally extremely low values can cause odd behavior when objects interact.
- Motion Quality: The "Motion Quality" set on the bhkRigidBody effects how aggressively the engine tries to prevent this object from penetrating.
- Broken Lighting With Multiple Lights
- Potential Causes:
- Single Pass shader flags: The mesh has geometry that has one of the "Single Pass" shader flags enabled.
- Alpha Blending: Geometry block contains an alpha property with "Blending" enabled which forces single pass.
- Invisible Mesh
- Potential Causes:
- Small bounds: Geometry block has bounds that are too small and thus culls when it shouldn't (controlled by the "Radius" and "Center" settings in nifskope)
- Wrong NiAVObject flags: Flags like "Hidden" are set or flags are set on the wrong nodes. See: NIF NiAVObject Flags for more info.
- Material property with Maximum Alpha: A geometry block has a Material property with Alpha set to 0 which is the maximum alpha value.
- Flipped faces: Meshes with flipped faces can give the illusion of being invisible when they otherwise look normal in a 3D editor.
- Wrong CollisionObject target: In rare cases a CollisionObject that has the wrong target node can cause parts or all of the NIF to turn invisible in-game.
- Actors Being Unable To Navigate The Environment Properly
- Potential Causes:
- BSBound is too large: A BSBound on the actors skeleton being too large can cause actors to not be able to path through narrow gaps that they otherwise visually look like they should fit through.
- Bad collision: If the collision on the NIF is too big / not properly aligned it can prevent actors from pathing properly.
- Holes Or Cracks Where It's Possible See Through The Mesh
- Potential Causes:
- Improper face alignment: Using various snapping features in modeling programs when moving faces / verts can prevent these sorts of issues.
- Alpha Property: A geometry block in the mesh has an alpha prop which is making certain parts of the texture transparent that it shouldn't be.
- Missing Texture
- Potential Causes:
- Incorrect file path: A BSShaderTextureSet block has a incorrect filepath set or the texture itself was stored in the wrong location.
- Textures pathed without the textures\ prefix will render in Nifskope but not ingame
- Shader flag: A geometry block in the mesh has the "Multiple Textures" shader flag set.
- Missing / Intangible Collision
- Potential Causes:
- No collision shape: The NIF doesn't have any bhkCollisionObject or a bhkRigidBody is missing a collision shape.
- Wrong layer type: A bhkRigidBody is using a wrong Collision layer type which depending on the type can allow different types of objects to pass through.
- No Target Specified: Having no target or wrong target node set (should be the NiNode the block is nested in) on a bhkCollisionObject can have collision that at best doesn't function and at worst, crashes the game.
- MOPP not updated: When MOPP type collision is created or edited, it needs a MOPP code update which can be done with SNIFF 1.4 or old versions of Nifskope.
- Transforms: In some rare instances transforms on the collision geometry or on a NiNode the collision is nested in can cause MOPP code updates to give you intangible collision. In most cases keep your transforms baked into the mesh itself.
- Animated Collision: Collision synced to animations will be intangible without the "USE_VEL" flag set on the CollisionObject.
- Impact Decals Not Applying
- Description: For various different reasons impact decals such as those left by firearms in the form of bullet holes will not apply to the visuals in game.
- Potential Causes:
- Geometry block is a NiTriShape: NiTriShapes do not support impact decals, instead NiTriStrips must be used.
- Collision object is nested deeper then then the actual geometry blocks you want decals on.
- Transforms: In rare cases unapplied transforms can make a geometry block unable to receive impact decals unless applied first.
- "No Decals" is set: The "No Decals" flag is set in NIF NiAVObject Flags.