Skip to content

Guide for asset contribution

Benoît edited this page Jul 8, 2015 · 5 revisions

This page gives details about assets and data, best practices, and explain how the engine manage them.

Models

3D models are used to draw units, projetiles, trinkets and cliffs.

Models are stored into assets/models.

Placement, orientation & scale

Exemple of asset with nodes

OpenRTS considers Z+ as up vector, and Y- as front, as shown above.

OpenRTS rotates things around the origin. So your model should have its mass center at x=0, y=0.

OpenRTS considers the ground at z=0. Your tree should be placed between z=0 and z=5. A plane should be between -1 and +1.

In OpenRTS, a map tile measures 2 meters aside and 4 meters high. Your cliff element should fit inside (x,y,z) -1,-1,0 and 1,1,4.

Keep in mind that scales are hardly respected in RTS games. A ground vehicule should fit in two tiles max to avoid motion problems. An infantry unit should occupy at least a quarter of a tile to stay clickable.

There are three cliff elements, with three base orientations :

  • the orthogonal elements face east,
  • the salient elements face north/east,
  • the corner elements face north/east two.

Bones and animations

You can play an animation with an AnimationActor, specifying the animation's name and cylce to play.

You can also use model's skeleton to give the engine the localisation of model's parts. For example, to spawn flames inside the mouth of a fire-eater, or the trail of a plane, you create a bone at the source and another for the direction.

These bones may have any axis configuration since OpenRTS compute the vector between them.

To rotate a turret, you also need two bones. One to attach the body's vertices, the other to attach turret's vertices. That particular bone have to spin around it's Y axis (as shown on the picture above).

Morphing is not supported.

Format

OpenRTS supports two formats : .j3o (jMonkey's standard) and .mesh.xml (Ogre Format)

Whatever modelling tool you want to use(Blender if possible, Maya, 3DS-Max, ...), you will need to translate your meshes and skeletons to these format.

You can use the OgreXMLConverter, the jMonkeyEngine SDK, or simply send your file to a team member for the translation to be done.

2D art

2D art are needed for particle sprites, textures, icons, GUI elements, loading and menu screens and of course, concept arts.

All arts are stored into assets/textures.

Sprites are static images or animation grid of any size and format used for particle effects like flames, debris, smoke...

OpenRTS uses textures of any size and format for the terrain. It accepts diffuse and normal maps. It doesn't know specular, bump, displacement or glow maps. The scale is given for each texture in the XML definition.

Textures for 3d assets are linked into assets' material file.

OpenRTS doesn't draw icons in the GUI for now but will need tons of them. Idem for GUI skins, cursors, portraits, etc. Your contributions will certainly motivate coders to implement this part, so feed the repository anyway !

Sounds

OpenRTS manage sounds via configurable SoundActors. Music are also supported but not managed at the time.