3D Art Contribution Guide

From Trinity Reign Wiki

Jump to: navigation, search

Contents

Trinity Reign 3D Art Contribution Guide

V.1.0. Written by Yill


Table of Contents:

  1. General 3D rules
  2. Outfitting your model for export
  3. Texturing models
  4. Adding Physics objects
  5. Specific types of models and their needs
    • Buildings
    • Vegetation
    • Characters


  • 1.1 Poly Count Guide:
  • Playable Character Model - 4000/6000
  • NPC - 2000/6000
  • House exterior- 2000
  • Important building exterior -3-6000
  • Interiors - 2000
  • Static Ambient Objects (Barrels etc.) - 100 for smaller objects, 1000 for larger objects.
  • Chair - 150
  • Weapon - 250-700
  • Apple - 50

Note that this is a general guide. The ranges are pretty wide. The polycount is important, but not decisive. When in doubt, check with Yill.


  • 1.2 General 3D rules
  • Use a reasonable amount of polys for your models.
  • Clean your models properly. Every unneeded poly is wasted space and will screw up proper UV-maps.
  • Make sure you named your mesh, material and object.
  • Make sure your textures are applied properly on all faces.
  • Don't worry about Scale, that can be changes in the editor.


  • 1.3 Architecture

Seeing how there will be 4 playable races spread across 4 Kingdoms, architecture styles will differ as much as they would in real life. On top of that, we're creating a fantasy world. This means that all architecture styles have to be very original and serve as eye candy. Preferably, all 16+ cities will have different, working, good looking architecture styles. The first building of a city allows for complete creative freedom. All buildings after that have to be variations of that one building, making cities look as a whole. This applies to all cities. Consistency however should be maintained at all times.


  • 2.1 Outfitting your model for export, Author: Cigiley

Outfitting your models for the Trinity Reign client is something that needs to be done properly, any missteps in here will lead to lesser performance and delayed progress.


  • 2.1.1 Installing Blender to Ogre

First of all we install the exporter which is a nifty script that needs to be placed in your scripts folder of Blender. It can be obtained here: http://www.ogre3d.org/forums/viewtopic.php?t=45922
After you get the files, copy the scripts and all subdirectories into your blender/ scripts folder. Check if it all went well by opening blender > scripts > export > Ogremesh.


Note 1: Make sure you got the right version of python, get it here http://www.python.org/
Note 2: If you have trouble converting to actual .mesh files use this http://downloads.sourceforge.net/ogre/OgreCommandLineTools_1.6.0.msi?use_mirror=


  • 2.1.2 Preparing your models for export

To prevent you from having to export one model 15 times to get it right, here's a little check-list for you.

  • Make sure you named your mesh
  • Make sure you named your Object
  • Make sure you named your Material
  • Make sure all three have the same name
  • Make sure the scale is right (use MDhouse1 to check)
  • Make sure Da pink dot is at the centre of the bottom of your model (IE, properly centred)
  • Make sure all textures are applied correctly and not too many textures are used.
  • Make sure your data is packed and saved BEFORE you export.
  • Make sure all faces you need set-smooth-ed are, and all that you do not need set-smooth-ed are not.
  • Clean your models properly. Every single poly that isn't needed is a waste of space.
  • Double check your check list.


  • 2.1.3 Using the Ogre to Blender script

Set your blender interface up in a way of your choice, but leave some room for your scripts.
Select the object you want exported (check your checklist again) and open scripts>export>Ogre meshes. This will open the Ogre Meshes Exporter interface. Make sure you selected (dark green) the following functions:

  • Export materials (exports the materials with the object)
  • Game Engine materials (exports material as game-ready .material file.)
  • Export meshes (exports the mesh to a folder of choice)
  • Fix up Axis to Y (Ogre uses Y as the up and down axis, whereas blender uses Z. This fixes it so that the model is exported the same way as shown in Blender)
  • Skeleton Name Follow Mesh (exports all armatures, collision boxes and everything else with the mesh.)
  • Ogre XML Converter (makes a .mesh file out of the xml file. If it doesn't work use the link listed earlier.)
  • Game Engine Materials (exports the materials as game engine suitable materials.)
  • Then hit "Export" and done you are.

Remember that ogre complains if you use the same material in two different files so it may be better to copy the contents of the .material file into some big file like "morgendil.material" and put everything thats used in morgendil there.


  • 2.1.4 Adding it all to the editor

The Textures like wood1.jpg or whatever aren't exported so you have to find where they are on your computer and put them in "/resources/models/textures". But first you must make the "textures" folder then you can put all your textures in there. The reason were using "/resources/models/textures" is that the "models" directory is searched recursively by my code (Ogre doesn't search recursively). So this means you can put the textures within sub-folders and my code will find them automatically. So for example "/resources/models/textures/Wood/wood1.jpg" will be ok.


  • 3.1 Texturing models

Texturing models is only done when textures are approved by Easton, Kanan or Yill. Mail them when in doubt. Make sure textures are applied to models using a proper UV-layout so any modifications can be made easily.


  • 4.1 Adding Physics objects, Author: Denreaper

Part 1: Spank My Monkey

So you've created a beautiful monkey head statue for the game and now you want to bring it to life in Trinity Reign.
http://s2.photobucket.com/albums/y46/denreaper/action=view&current=monkey_render.png
First and foremost you need to create a physics object for your monkey head. The physics objects must be comprised only of cube primitives. You may scale and rotate these in whatever way you need to, just don't edit the vertices. The physics object doesn't need to match the model perfectly; here is a good example of a physics object for the monkey statue:
http://s2.photobucket.com/albums/y46/denreaper/action=view&current=monkey_physicsobject1.png
Note that the box around the monkey is the physics object. Note that you can have multiple boxes if you need them.


Part 2: Kicking Ass and Taking Names ... Or Just Taking Names ...

Now we move on to the way the physics objects are loaded into the game. Let's say that our monkey model is named "mr_monkey." The physics objects need to follow with something such as mr_monkey_physics_1. You'll want to name them like this for organizational purposes. From there, you need to make a file named "mr_monkey.phy." You don't have an option here. This has to be the name of it. Now on the top line write monkey_physics_1.mesh.xml" without the quotations. In this file you place the physics object file names (we use mesh.xml for our physics objects) which will be used for a particular model.


Here's an example of a setup of files where there is a model with 3 attached physics objects:

  • house.mesh
  • house.phy
  • house_physics_1.mesh.xml
  • house_physics_2.mesh.xml
  • house_physics_3.mesh.xml

The contents of house.phy simply are as follows:

  • house_physics_1.mesh.xml
  • house_physics_2.mesh.xml
  • house_physics_3.mesh.xml


Part 3: The Ass-end of the Article (I just wanted to add a curse word)

Another thing to note is that models which are generally there to add detail don't usually need a physics object. As a good guideline, don't add a physics object for the model if it's intended to be pretty small (a fourth of the size of the player or smaller) or is originally intended to be a prop for decorating a room or similar (unless it's a very large prop that you don't want people going through). If you aren't sure, ask! And if no one is around to ask, it's probably best to make it. Remember, it's easier to remove clothes than to put them on (Oh yes, I'm very familiar with that).

As you can see, preparing your model to enter the world of Ura is quite simple and straightforward. If you have any questions, send them to denreaper@trinityreign.com or contact denreaper on IRC. Good luck!

Personal tools
3D art
communication