User Tools

Site Tools


modding:gl2_model_renderer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
modding:gl2_model_renderer [2017-03-19 09:22]
skyjake
modding:gl2_model_renderer [2017-03-19 22:33] (current)
skyjake [Model renderer (Doomsday 2)]
Line 1: Line 1:
 +====== Model renderer (Doomsday 2) ======
 +
 +The GL2 model renderer is the primary user of [[assets:​model|3D model assets]]. Whenever a [[assets:​model|model asset]] is present in a loaded [[fs:​package]],​ the model renderer loads the 3D model data into memory and, when the model is needed for drawing, prepares the needed OpenGL resources for drawing the model.
 +
 +The renderer can use 3D models in several ways:
 +
 +  *  Things (mobjs) can be represented using 3D models with a ''​model.thing.*''​ asset.
 +  *  Player weapons (psprites) use the ''​model.weapon.*''​ assets.
 +  *  //TODO//: other kinds of model assets, e.g., surface decorations.
 +
 +See also: [[modding:​Supported 3D model formats]]
 +
 +
 +===== Features =====
 +
 +==== Version 1.15 ====
 +
 +  *  Model files are loaded using the [[http://​assimp.sourceforge.net|Open Asset Import Library]]. This means a variety of different file formats can be used.
 +  *  Skeletal animation (using bones) is the primary way of animating objects. The current limitation is 64 bones per object.
 +  *  Models can be composed of multiple meshes, each having its own textures.
 +  *  Texture images are automatically collected onto atlases for rendering.
 +  *  There is currently one general purpose OpenGL shader that does per-pixel lighting.
 +  *  There can be 4 types of texture maps per model mesh:
 +    *  Diffuse map: surface color and overall opacity ​
 +    *  Normal map / height map: surface normals ​
 +    *  Specular map: specular reflection color and sharpness
 +    *  Emission map: additional light not affected by external light sources
 +  *  Providing the diffuse color map is required, other maps are optional (a default map will be used if one is not specified).
 +  *  Up to four light sources per object, plus an ambient light.
 +  *  Model animation sequences can be triggered when a thing enters a particular state.
 +
 +
 +==== Version 2.0 ====
 +
 +  *  ''​model.weapon.*''​ for player weapons (psprites).
 +  *  Animation sequence looping.
 +  *  Animation sequence priority control.
 +  *  Rendering passes can be specified manually, per-mesh with GL state parameters.
 +  *  Doomsday Script timelines.
 +  *  Animated shader variables.
 +  *  Fog.
 +  *  Improved scalability,​ for instance dynamic atlases for larger sets of models.
 +  *  Specifying a custom shader to be used for a model.
 +
 +
 +==== Upcoming features ====
 +
 +These are planned for future releases:
 +
 +  *  Material opacity (in addition to opacity from the diffuse map).
 +  *  Multiple model files representing a single object (if needed).
 +  *  Up to four sets of texture coordinates (currently only one set of texture coordinates per mesh is supported).
 +  *  More control over animation: explicit timelines per thing state; movement-based sequences (walking, running, standing).
 +
 +
 +
 +
  
modding/gl2_model_renderer.txt · Last modified: 2017-03-19 22:33 by skyjake