Detail box

From FreeSpace Wiki
Revision as of 08:04, 9 January 2014 by Z64555 (talk | contribs) (Included note on the Detail level settings, and added link to $Detail Distance)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Places to use the feature

The detail box feature can be used for multiple purposes. It should mainly be used to add details to big ships on close-ups. It's an addition to the lod system and works quite similar. The rendering of an object depends on the distance to it. This allows you to create ultra detailed models with less worrying about he polygon count, as only the objects close to you will be rendered.

Using detail boxes in 3d Studio Max

The detail box models have to be separate models. They can not be part of the main mesh. Creating the actual 'detail box' can be done by simply adding it to the 'User Defined' Tab.

-Right click on the the model you want to be used as detail box model.

-Select 'Properties'.

-Add this to the 'User Defined' values:

$detail_box: x

$box_min: x,x,x

$box_max: x,x,x


These models have to be linked to one lod (detail-0) or a subobject of it. They'll move with the object they are linked to. So they'll appear on rotating objects if they are linked to them.

Using detail boxes in PCS

Make sure that all models you want to use as detail box models are separate objects before you convert your model. Also make sue that the models are linked to one of the lods (probably lod-0) or one of the subobjects if needed.

-=Open the model in PCS==

-Go to the 'SubObjects' tab

-Select the object you want to use a detail box for

-Add this to 'Properties':

$detail_box: x

$box_min: x,x,x

$box_max: x,x,x


Detail box values

You can define the type, shape, and size of the detail box.

$detail_box: x Sets up the type of the detail box. "1" is a detail box which renders the object when you fly into it, while "-1" will render it when your on the outside of it only.

$box_min: x,x,x -and-

$box_max: x,x,x Define the size and the shape of the detail box in x,y,z direction.

Example: $detail_box: 1

$box_min: -1200,-1200,-1200

$box_max: 1200,1200,1200 (For medium sized details)


Notes

-You can use the inner and outer box with the same values for two different models, as lod system.

-The 'model' setting in the FS2 options has a direct influence on the detail box sizes. Making it smaller on low settings, so the details will appear later when you move to an object.

-The coordinates entered for box_min and box_max are centered on the pivot of the subobject not the model itself. The x axis is also inverted from PCS2. So from Max it's x,z,y, from PCS2 it's -x,y,z.

-Detail boxes are affected by the Detail level setting, just as the LOD system is. (see $Detail Distance) However, they use their own scaling factors (which are not currently modifiable). From Lowest to Highest detail level setting, they are 0.2, 0.5, 0.8, 1.0, and 1.2.

--For coders that are interested, the variable is named "Interp_box_scale" and is located in modelinterp.cpp