User Tools

Site Tools


assets:model

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
assets:model [2019-09-13 14:07]
skyjake [Pass definition]
assets:model [2020-02-23 10:33] (current)
skyjake [Common metadata for models]
Line 1: Line 1:
 ====== 3D model assets ====== ====== 3D model assets ======
  
-This page is about 3D model assets that can be rendered in the game world using the [[modding:​GL2 model renderer]]. The article applies to the latest unstable build of Doomsday. ​[[http://​dengine.net/​dew/​index.php?​title=Assets/​Model&​oldid=16390|Documentation for version 1.15]] can be found in the history.+This page is about 3D model assets that can be rendered in the game world using the [[modding:​GL2 model renderer]]. The article applies to version ​[[version:2.2]]. 
  
 Doomsday 1.x supports only [[ded:​model|MD2/​DMD models]]. Doomsday 1.x supports only [[ded:​model|MD2/​DMD models]].
 +
 ===== Models representing things (model.thing.*) ===== ===== Models representing things (model.thing.*) =====
  
Line 12: Line 13:
   }   }
  
-This asset definition should be understood as "3D model asset to be used for representing [[thing]]s of type POSSESSED in the game world"​. The thing type must be one of the thing types defined in the loaded game.+This asset definition should be understood as "3D model asset to be used for representing [[ded:thing]]s of type POSSESSED in the game world"​. The thing type must be one of the thing types defined in the loaded game.
  
  
Line 24: Line 25:
  
  
-This asset is for a player weapon model that will be drawn instead of a 2D psprite. The weapon identifiers (e.g., "​wand"​) are defined by the game plugins in their [[values]] definitions ("​Weapon Info" section).+This asset is for a player weapon model that will be drawn instead of a 2D psprite. The weapon identifiers (e.g., "​wand"​) are defined by the game plugins in their [[ded:Values]] definitions ("​Weapon Info" section).
  
 You should scale weapon models so that they have an appropriate size in world units (compared to player height, for example). You should scale weapon models so that they have an appropriate size in world units (compared to player height, for example).
Line 33: Line 34:
  
 ^ Variable ^ Description | ^ Variable ^ Description |
-| ''​path''​| Model file to be used. The path is relative to the file where the metadata is defined (e.g., **Info** of the package). See [[supported_3_d_model_formats]] for details about file formats. |+| ''​path''​| Model file to be used. The path is relative to the file where the metadata is defined (e.g., **Info** of the package). See [[modding:​supported 3D model formats]] for details about file formats. |
 | ''​front''​| Front vector in the model'​s coordinate system. Determines which way the model will appear in the game world. For instance, a monster'​s front vector defines the "​forward"​ direction of the model. For player weapon models, the front vector defines the direction the weapon is being pointed at (away from the eye). <​code>​front <1, 0, 0></​code>​ | | ''​front''​| Front vector in the model'​s coordinate system. Determines which way the model will appear in the game world. For instance, a monster'​s front vector defines the "​forward"​ direction of the model. For player weapon models, the front vector defines the direction the weapon is being pointed at (away from the eye). <​code>​front <1, 0, 0></​code>​ |
 | ''​up''​| Up vector in the model'​s coordinate system. Determines which way the model will appear in the game world. <​code>​up <0, 0, 1></​code>​ | | ''​up''​| Up vector in the model'​s coordinate system. Determines which way the model will appear in the game world. <​code>​up <0, 0, 1></​code>​ |
Line 39: Line 40:
 | ''​mirror''​| ''​True''​ causes the model'​s coordinate system to be flipped on the axis that is perpendicular to both the defined front and up vectors. The default is ''​False'',​ with no mirroring applied. | | ''​mirror''​| ''​True''​ causes the model'​s coordinate system to be flipped on the axis that is perpendicular to both the defined front and up vectors. The default is ''​False'',​ with no mirroring applied. |
 | ''​autoscale''​| ''​True''​ causes the model to be autoscaled to the corresponding thing'​s height. If ''​False''​ (the default), no additional scaling is applied. This is useful if the model has been designed in world units. Always design weapon models in world units, they do not support autoscaling. | | ''​autoscale''​| ''​True''​ causes the model to be autoscaled to the corresponding thing'​s height. If ''​False''​ (the default), no additional scaling is applied. This is useful if the model has been designed in world units. Always design weapon models in world units, they do not support autoscaling. |
-| ''​alignment.yaw''​| Yaw angle alignment mode. The allowed values are: \\ • ''​False''​ for no alignment (the default). ​\\ • ''​view''​ for aligning the yaw angle so the object faces the viewer. ​\\ • ''​movement''​ for aligning the yaw angle to the movement direction of the object. ​\\ • ''​random''​ for a randomly selected, non-changing angle that is unique for each object. The entire object is rotated as a whole around its origin. | +| ''​fov''​ | Custom FOV angle for rendering a player weapon model. Not set by default (value is zero), which means the default weapon FOV angle is used instead. Only affects player weapon models. | 
-| ''​alignment.pitch''​| Pitch angle alignment mode. The allowed values are:   \\ • ''​False''​ for no alignment (the default). ​\\ • ''​view''​ for aligning the pitch angle so the object faces the viewer. ​\\ • ''​movement''​ for aligning the pitch angle to the movement direction of the object. The entire object is rotated as a whole around its origin. |+| ''​alignment.yaw''​| Yaw angle alignment mode. The allowed values are:<​html><​ul><​li> ​''​False''​ for no alignment (the default). ​<​li> ​''​view''​ for aligning the yaw angle so the object faces the viewer. ​<​li> ​''​movement''​ for aligning the yaw angle to the movement direction of the object. ​<​li> ​''​random''​ for a randomly selected, non-changing angle that is unique for each object. The entire object is rotated as a whole around its origin.</​ul></​html> ​
 +| ''​alignment.pitch''​| Pitch angle alignment mode. The allowed values are:  <​html><​ul><​li>​''​False''​ for no alignment (the default). ​<​li> ​''​view''​ for aligning the pitch angle so the object faces the viewer. ​<​li> ​''​movement''​ for aligning the pitch angle to the movement direction of the object. The entire object is rotated as a whole around its origin.</​ul></​html>​ | 
 +| ''​opacityFromWeapon''​ | Model'​s opacity is affected by the player weapon (psprite) opacity. Defaults to ''​True''​. | 
 +| ''​fullbrightFromWeapon''​ | Model'​s ambient light level is affected by the player weapon (psprite) fullbright state. Default to ''​False''​. |
 | ''​material.*''​| Material definitions. Each material specifies texture maps for all the meshes in the model. | | ''​material.*''​| Material definitions. Each material specifies texture maps for all the meshes in the model. |
 | ''​animation.''​(state)| Metadata for the animation triggered when the thing enters state //(state)// (used with ''​model.thing.*''​). | | ''​animation.''​(state)| Metadata for the animation triggered when the thing enters state //(state)// (used with ''​model.thing.*''​). |
Line 53: Line 57:
 After the model has been oriented to world space, the ''​offset''​ vector is applied to the origin of the model. The offset is applied //before// the object is turned to face its target angle. After the model has been oriented to world space, the ''​offset''​ vector is applied to the origin of the model. The offset is applied //before// the object is turned to face its target angle.
  
-In [[version_1.15]], models use a default scaling factor that adjusts their height (in world space) to be equivalent to the thing'​s height as defined in the [[thing]] definition.+In [[version:1.15]], models use a default scaling factor that adjusts their height (in world space) to be equivalent to the thing'​s height as defined in the [[ded:Thing]] definition.
  
  
Line 220: Line 224:
 Unlike in the past, 3D model animation is done in terms of animation sequences rather than individual keyframes or states. This means that the animation sequences defined in the model file are played as specified in the file; the model asset'​s job is to map the game object'​s animation sequences to corresponding sequences in the 3D model. Unlike in the past, 3D model animation is done in terms of animation sequences rather than individual keyframes or states. This means that the animation sequences defined in the model file are played as specified in the file; the model asset'​s job is to map the game object'​s animation sequences to corresponding sequences in the 3D model.
  
-In [[version:​1.15]],​ the only way to animate models is to trigger an animation sequence when a state is entered.+In [[version:​1.15]],​ the only way to animate models is to trigger an animation sequence when a state is entered. In [[version:​2.1]],​ animation sequences can also be started from [[scripting_with_stateanimator|scripts]].
  
 ^  Animation metadata ​ ^^ ^  Animation metadata ​ ^^
Line 338: Line 342:
  
  
-The ''​script''​ keyword causes the block'​s contents to be parsed as [[doomsday_script]]. The ''​at''​ attribute is required for each script: it tells the parser to store the script for running at a later time. (A plain ''​script''​ block without any attributes is executed during parsing of the [[info]] document.)+The ''​script''​ keyword causes the block'​s contents to be parsed as [[:​script|Doomsday Script]]. The ''​at''​ attribute is required for each script: it tells the parser to store the script for running at a later time. (A plain ''​script''​ block without any attributes is executed during parsing of the [[modding:info]] document.)
  
  
assets/model.1568372838.txt.gz · Last modified: 2019-09-13 14:07 by skyjake