Part 2 Shaping up

 

Lets look at the Trishape branch. This is the 3D mesh part you see in game. The first part is the NiTrishape, this block contains certain settings of the object. Again I use the gold coin for an example.

 

 

Name: string for name of trishape

Extra Data: Rarely if never used for trishapes

Controller: For morph animations

Flags: For shadows or hidden collisions using RootCollisionNode

Translation: position of the trishape in relation to it’s parent node

Rotation: rotation of the trishape in relation to it’s parent node

Scale: scale of the trishape in relation to it’s parent node

Velocity: ???

Num Properties: number of property blocks for the trishape

Properties: list of properties for the trishape

Data: block number of the trishape data

Skin Instance: for skinned aka physiqued aka vertex weighted meshes.

 

 

A Trishape must have a material property to be visible in game, it does not need a texture property. So lets look at the material property.

The important parts here are the colors and the alpha. The majority of the time when using textures you’ll set the Ambient and Diffuse Colors white and the Specular and Emissive Colors Black. Without a texture property the mesh will appear the color of the material, in this case white. Clicking the color wheel icon lets you set the color.

 

The Alpha sets transparency of the Trishape. 0 is invisible, 1 is solid, or any decimal in between. The trishape must also have an alpha property for this setting to work.

 

While we’re on the subject, lets add an alpha property. Right click on the trishape block and select node then attach property.

 

Then select NiAlphaProperty.

This will automatically add the new block and update the property array of the trishape to include the property. It also sets the flag of the alpha property to 237. This is the ‘default’ setting for transparency in MW. You can experiment with other settings, 4845 is a common setting.

Clicking the flag icon brings up another cool menu.

 

You’ve notice the coin is broken up into 2 pieces, this is because it uses 2 different textures. In Morrowind it seems only one texture is allowed per Trishape. In 3dsmax a multi-textured object gets split up when exported. Though each Trishape has it’s own texturing property, they can share the same material property. In this case they share block number 5. I went ahead and set the material alpha setting to 0.5. Only the Trishape with the AlphaProperty is affected.

 

 

Now when I attach an Alpha Property to the second trishape the whole coin gets faded. Wow.

 

Now instead of using the attach property method as I did above which would create a new block, I used the same AlphaProperty I just created. First I changed the Num Properties to 3, updated the array, then inputted the block number of the alpha property

 

 

Back to Main Page