573
edits
(→Important Notice for Volunteers: moving non pertinent parts to main article.) |
(→Improving Models for Best FlightGear Performance: see http://forum.flightgear.org/viewtopic.php?f=5&t=22886) |
||
Line 63: | Line 63: | ||
* [[Howto: Decrease the number of faces|Decrease the number of faces]] | * [[Howto: Decrease the number of faces|Decrease the number of faces]] | ||
== Improving | == Improving models for best FlightGear performance == | ||
[[File:Motor.jpg|thumb|270px|Using Multiple Models with varied detailing]] | [[File:Motor.jpg|thumb|270px|Using Multiple Models with varied detailing]] | ||
[[File:Singlesided_blender.jpg|thumb|270px|To set faces to Singlesided (Blender), deselect the Doublesided button]] | [[File:Singlesided_blender.jpg|thumb|270px|To set faces to Singlesided (Blender), deselect the Doublesided button]] | ||
===Mesh=== | === Mesh === | ||
* | * In a single model, use a single mesh so far as possible. Note that this doesn't mean that every node must be linked to its object with an edge (e.g. a line of trees can be easily a single object.) Only have the separate objects if you need them for an animation or parts that use a transparent texture (any object using more then one texture is anyway spitted by the rendering engine.) | ||
* Delete unseen faces | * Delete unseen faces such as faces inside the model, but remember that the [[Project Rembrandt|Rembrandt renderer]] needs closed meshes to cast shadows correctly, so you'll often want to keep the ones below. | ||
* Remove "line faces" which are faces whose points are in the same line | * Remove "line faces", which are faces whose points are in the same line. | ||
* Don't forget to remove double vertices | * Don't forget to remove double vertices (i.e. vertices sharing the same coordinates) | ||
* See [[Howto:Decrease the number of faces]]. | |||
=== | === Single sided / double sided === | ||
* Set all the faces of the model to SingleSided. DoubleSided faces are very expensive to render properly. If a face needs to be displayed from every view angle use two faces with opposite normals rather than a Doublesided one ( the overhead from the extra geometry is far lower than the overhead of doublesided faces) | * Set all the faces of the model to SingleSided. DoubleSided faces are very expensive to render properly. If a face needs to be displayed from every view angle use two faces with opposite normals rather than a Doublesided one (the overhead from the extra geometry is far lower than the overhead of doublesided faces) | ||
===Textures | === Textures and Materials === | ||
* Use Materials on Objects instead of textures where possible. | * Use Materials on Objects instead of textures where possible, but... | ||
* | * ...avoid mixing textured and untextured geometry in the same model. Build the coloring into the texture map instead. This is to prevent that the object gets split, and anyway, the [[File Formats#*.ac files|AC format]] supports only one texture per object. | ||
* Textures must be a power of two | * Textures must be a power of two, or they will be resized at loading, and cause issues to some users. | ||
* Avoid using big textures: 512x512 | * Avoid using big textures: 512x512 is mostly enough for most models. | ||
* Use a single texture. However, if your model absolutely needs alpha texture and another part of the model is opaque, you should use two textures: one with alpha and the other without. | * Use a single texture. However, if your model absolutely needs alpha texture and another part of the model is opaque, you should use two textures: one with alpha and the other without. | ||
* Don't use alpha in texture when it is not needed | * Don't use alpha in texture when it is not needed: transparency is not easy to deal with, and often causes artifacts. | ||
=== | === Effects === | ||
* | * Shader effects (like lightmaps, normalmaps...) and Rembrandt lights are not affordable by everyone's machine, so try to provide alternatives. However, remember also that FlightGear provides options to adjust such effects. | ||
===Other=== | === Level of Detail (LOD) === | ||
* Textures, transparency, .xml included sub-models : The things that kill frame rate in FlightGear. Try to avoid them. | * If a model has to be detailed to a ''very high'' degree, use multiple objects with different levels of detailing, and switch between them based on LOD with a [[Howto:Animate models#Range|range animation]], or split the detailed parts to make them a couple more objects that add details incrementally. Note that range animations are very expensive (any time you move, every range animation must be evaluated), and give a real advantage only if they remove a very large amount of details (like 1000-2000 triangles), so it's not useful in many cases of scenery objects. | ||
* Also avoid smooth shading when possible | * An alternative, less expensive way to support LOD is applying a [[Howto:Animate models#Select|select animation]], that can hide an object based on some property. E.g., hide cars side mirrors if "detailed" level is at less than 1500m (which is the default), indicating that the user has a less powerful machine. It is less flexible, but allows everyone to enjoy your models. | ||
=== Other === | |||
* With modern graphics cards, the amount of objects can have a higher impact on performance than the amount of triangles/vertices. | |||
* Textures, transparency, .xml included sub-models: The things that kill frame rate in FlightGear. Try to avoid them. | |||
* Also avoid smooth shading when possible, but don't be afraid to use it for curved surfaces where it really has an impact on model quality. | |||
== Resources == | == Resources == |
edits