• Welcome to Freedom Reborn Archive.
 

Building Issue

Started by GogglesPizanno, August 16, 2007, 07:51:27 PM

Previous topic - Next topic

GogglesPizanno

So Ive been attempting to add some new buildings to the game.
I get them exported out of gmax just fine.
I can place them, characters can walk on them, but they don't take any damage.
You can pound away on them till the cows come home and they never get reduced in health.

The templates they are using are just copies/renames of existing building templates, so I'm thinking it has something to do with the mesh itself (or some nifskope flag).

Does anyone have any ideas what I might be missing, or some kind of setting in Nifskope or Gmax I should be looking for that might cause this kind of quirk?

I suppose I could be ok with new buildings that just stood there looking majestic...but its much more fun when they can be destroyed.

ow_tiobe_sb

From the "Art Docs" provided by IG:

Quote from: Art Docs
Buildings

Every building that can be destroyed has a special destruction version file (along with its initial version file). This file consists of the building broken into segments, with the segments arranged to form the original building. These segments are grouped together under the group name "building" and the pivot of the group is set such that the building is in exactly the same place as the initial building when swapped into the same location in game.

The actual destruction is handled by the game code and occurs by lowering segments of the building into the ground, and playing a smoke effect as this happens. Some generic pieces of debris will also be thrown out into the game world under physics control and piles of flattened rubble will be placed at the base of each segment as it sinks.

Note: For information on setting up the resources for building destruction, see the separate FF Editor documentation.

Buildings are divided into vertical *sections* which are 100 units across. This is done by the game engine. When a building takes damage it assigns it to a section. Once that damage exceeds a threshold, all the segments that overlap that section are collapsed. This overlap is calculated by comparing top down projected areas (i.e. the segment falls if its top-down area overlaps the top-down area of the section).

Naming Conventions

Initial Version:

"BldgName".nif

Contains:

"building_name"
"boundingbox"
environment light (optional)

Notes:

1. Buildings can be a single object, made up of multiple parts, or can be grouped together. Generally they are named according to the build set they belong to, which makes placement in the level layout much easier.

2. Bounding boxes are added to each section for the purpose of providing collision for physics and for path finding. These can also double as shadow stand-ins for the actual geometry which is usually quite complex and can cause too much overhead on performance. For this the bounding boxes will require the user property flags "shadowgeomertry" and "NiHide".

3. Environment lights can be added but don't provide illumination. A bitmap is added to it instead which is used in conjunction with a gloss map in the material for the object. This gives a reflective surface appearance on the parts of the model that the gloss map allows. The parts of the building will need to appear in the light's Include list if they are to be affected.

Destruction Version:

"BldgName"_destruction.nif

Contains:

"[building]"

"section1"
"boundingbox"

"section2"
"boundingbox"

"section3"
"boundingbox"...

environment light (optional)

Notes:

1. The contents of a building file must contain the name "building" as a group which itself contains all the segments that will collapse. These should be named "sectionN", where N is 1 up to the number of segments.

2. Bounding boxes are added to each section for the purpose of providing collision for physics and for path finding. These can also double as shadow stand-ins for the actual geometry which is usually quite complex and can cause too much overhead on performance. For this the bounding boxes will require the user property flags "shadowgeomertry" and "NiHide". Each bounding box must be linked to its own related section.

3. Environment lights can be added but don't provide illumination. A bitmap is added to it instead which is used in conjunction with a gloss map in the material for the object. This gives a reflective surface appearance on the parts of the model that the gloss map allows. The contents of the building group will need to appear in the light's Include list if they are to be affected.

My advice: download the "building13" max file from Modforce (whose bandwidth is currently exceeded...again) and study how that mesh is constructed.  I've never devoted the time to learning how best to do this myself, but perhaps you will have more time and better luck.  Take care.

EDIT: More advice: work on your building in editable poly mode instead of editable mesh.  Once you have your completed, unbroken building, click on "Vertex" under "Editable Poly" in the stack and use "Slice Plane" to chop it up into at least three or four pieces.  Switch to "Polygon" under "Editable Poly" in the stack, select the faces on one piece, and then click on "Detach" under "Edit Geometry" in the scrolling menu below the stack window.  Give the new, separate object the name "Section 1."  Once the "Section 1" object has been selected, add a "Cap Holes" modifier from the modifier list (under "Mesh Editing") and watch gmax close the hole you just made in your mesh. Do the same for all pieces of the broken building.  Select all objects and click on "Group" under the "Group" menu at the top of the gmax window.  Give the group the name "building."  Select the [building] group, right-click on the mouse, and convert to editable mesh.  Save your file as "BUILDINGNAME_destruction.max" and export to "BUILDINGNAME_destruction.nif."

ow_tiobe_sb
Phantom Bunburyist and The Prat in the Hat