When to Use Global or Mesh Attributes in X-Plane 10

X-Plane 10 object attributes are properties of an .obj model file that control how drawing looks.  Examples of attributes include:

  • One or two sided drawing.
  • Alpha blending vs. alpha testing.
  • Specular levels (“shininess”).

In X-Plane 10, there are now two ways to set these attributes:

  • “Globally” via a command in the top of the .obj file that affects the drawing of the whole object or
  • “Per mesh” via a command that affects the next set of triangles.  (This is the only way to set these attributes in X-Plane 9.)

Which command should an exporter use?  What is best for performance?  Here are a few guidelines.

  • For scenery: The cost of a global attribute is higher than the cost of a mesh attribute, but you “pay” for a global attribute per .obj file, while you pay for a mesh attribute per placement.  Thus if you ues a single object 10 times (a jetway for example), you pay for a mesh attribute 10 times but a global attribute only once – a big win!
  • If an object will be used multiple times in a scenery system, try to use the global attributes when possible.
  • Try to make all objects that share a texture use the same global attributes. For example, if you have a normal object, every object that uses that normal map should use the same global specular attribute.
  • If an object has multiple attributes (e.g. part of the mesh is blended, part is not blended) try to set the global attributes to match the other objects that use the same texture.
  • For airplanes: global and per mesh attributes have the same cost, so there is no particular performance win or loss.
  • Facebook
  • Reddit
  • StumbleUpon
  • Twitter
  • Google Buzz
  • LinkedIn