Model system

From PioneerWiki
Revision as of 19:01, 8 October 2012 by Luomu (talk | contribs) (Detail levels)
Jump to: navigation, search

Overview

Importing models

Materials

Detail levels

Meshes can be grouped into detail levels using the lod pixelsize directive:

lod 100
mesh hull_low.dae

lod 200
mesh hull_med.dae

lod 1000
mesh hull_hi.dae
mesh landing_gear.dae

A detail level will be picked if the approximate size of the model on screen is less than pixelsize (for the highest level it does not matter as long as it's larger than the others). Use the modelviewer to find optimal sizes.

You may specify any number of detail levels in any order, they will be sorted according to size.

Animations

Attachments

Models may have special "tag point" Group nodes where other models may be attached. You may define a tag point in Blender by placing an Empty object and giving it one of the predefined names.

The system is meant for attaching equipment: guns, cargo pods, turrets...

Example: A generic gun model attached to a point "tag_gun_right":

Newmodel tagpoints01.png

The actual list of available names has not been determined yet.

Collisions

By default, the collision mesh of a model is the bounding box of all the meshes. For more control, you can import a custom mesh using the collision directive in the model definition:

collision collision.obj

Newmodel collmesh01.png

Decals

Decals are meant for customizable insignia on spaceships and changing advertisements on space stations. Up to four unique decals are available for a model (multiple identical decals are allowed). Place a piece of geometry, usually a flat quad, with proper UV coordinates and name it decal_01, 02, 03 or 04. The game will then use a special material on the geometry.

Newmodel decals01.png

Other special nodes

  • Labels
  • Thrusters
  • Billboard lights

New systems that need to be developed

Lots of them :)

  • Lua API
  • System to handle attachments
    • Tag points may be rotated in code to implement target tracking guns
  • System to handle spaceship logos, station advertisements and shipyard UI to customize your ship
  • UI to paint your ship and a system to give faction-appropriate colour schemes to NPC ships
  • Building sets
  • etc