Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | PrefabsOverview  

Prefab Overview

Tutorial Author:Clifton Poli

Prefab

The bulding block of the Reality Engine. To add a prefab model to your scene, you can either import an .X, or XML file, or merge a XML file.

Properties

  • CollidesRays
    • Whether this Actor collides standard raytests for things like gunshots passing through fences and water volumes.

  • GhostObject
    • Sets whether an object has collision or not.

  • IsHidden
    • Sets whether an object is rendered or not.

  • Inside/Outside
    • Has inside flag for lighting, etc. Outside lights case on Outside meshes, and vice versa. An actor can be both inside/outside.

  • ShadowType
    • Shadow casting type. 0 = None, 1 = Blob, 2 = Drop, 3 = ShadowMap

  • LODRatio
    • For first LOD switching. Multiplied by config 'LODRange' to get distance in meters.

  • VisibleDistanceRatio
    • Distance ratio to no longer render prefab. Multiplied by 'visibleRange' to get distance in meters.

Animated Model

Three Steps to adding an animated model to your scene:

1. Import an unanimated version of the .X file into RB, add shaders and save as XML to the Models folder in the game directory.

2. Export the animated .X file from your 3d application too the Models folder.

3. Open up the level you want the animated model in, Insert the AnimatedModel script into the scene, and type YourModel.XML and YourAnimatedModel.X in the appropriate fields.

Properties

  • ModelXMLFileName
    • Skinned XML Model file located in the Models subdirectory.

  • XAnimationFileName
    • X Animation file that corresponds to XML model.

  • XAnimationSizeScale
    • Scaling in meters of the X animation. Should be set equivalent to the original import scaling value on the skinned XML model. Must set to appropriate value before animation set is loaded.

PrefabsOverview   Edit | Attach | Ref-By | Printable | Diffs | r1.4 | > | r1.3 | > | r1.2 | More