A NIF mesh's BSBound property

Post » Tue May 10, 2011 1:40 pm

A few questions:
  • What does the BBX (BSBound) property used for, in a NIF file ?
  • Is its data reproduced in some other property that's present in all NIF files ? (I'm looking to calculate the center and extent fields)

User avatar
CHangohh BOyy
 
Posts: 3462
Joined: Mon Aug 20, 2007 12:12 pm

Post » Tue May 10, 2011 10:00 am

I believe that BSBound is used for collision and hit detection ...
User avatar
xemmybx
 
Posts: 3372
Joined: Thu Jun 22, 2006 2:01 pm

Post » Tue May 10, 2011 7:16 am

Bump. And a new question: How does an actor's skeleton differ from any other mesh, apart from the BBX property ? More specifically, has anybody got an idea about the differences b'ween an actor's node in the game world and non-actor reference's ?
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Tue May 10, 2011 11:06 am

They are not any different a Skeleton.nif can be used as any other item but not any other items can be a skeleton.nif as the game expects a few nodes to be present namely the BSBounds (this is the living Collision shape), the game also expects either the Bip01/Bip01 NonAccum nodes or the Bip02/Bip02 NonAccum nodes as well trying to create a creature without any of these leads to difficulties, you also need a BSXFlags set to allow Anims Collisions and Skeletons at the very least.
User avatar
maya papps
 
Posts: 3468
Joined: Mon Aug 07, 2006 3:44 pm

Post » Tue May 10, 2011 2:20 am

They are not any different a Skeleton.nif can be used as any other item but not any other items can be a skeleton.nif as the game expects a few nodes to be present namely the BSBounds (this is the living Collision shape), the game also expects either the Bip01/Bip01 NonAccum nodes or the Bip02/Bip02 NonAccum nodes as well trying to create a creature without any of these leads to difficulties, you also need a BSXFlags set to allow Anims Collisions and Skeletons at the very least.
I see. I do recall seeing BSX related routines in the code. Can a regular static's mesh (say a barrel's) have a BSXFlag property ? Also, can you calculate the center and extents (basically the components of the BSBound property) of any given mesh, provided it's got collision data ? Assuming I the NifLib library exposes enough data.
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Tue May 10, 2011 3:16 am

I see. I do recall seeing BSX related routines in the code. Can a regular static's mesh (say a barrel's) have a BSXFlag property ? Also, can you calculate the center and extents (basically the components of the BSBound property) of any given mesh, provided it's got collision data ? Assuming I the NifLib library exposes enough data.


Almost all nifs have a bsx flag since you set the basic properties of the nif there (like 'has collision', 'has animation' etc). Without a bsx flag a mesh can't have working collision, so only very few nifs have no bsx flags (like _far meshes or objects without collision or animation like cobwebs).

The BSBound data is a rough estimate of the skeletons extents. It has a xyz coordinate for center and dimensions. Not sure what you can access by script. But BSBound is only used for skeletons, no other nifs have this data. But other nifs have something similar in their TriStripsData/TriShapeData (xyz coordinates and center). A nif can consist of many different TriStrips though. For a 100% accurate calculation of the extents you'd probably need to check the vertex positions of all TriStips and their biggest expansion along the positive and negative xy and z axis.
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm


Return to IV - Oblivion