howto.MultiGenModelFlags 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. MULTIGEN MODEL FLAGS
  2. This document describes the different kinds of model flags one can place in
  3. the comment field of MultiGen group beads. The general format for a model
  4. flag is:
  5. <egg> { <FLAGNAME> {value} }
  6. The most up-to-date version of this document can be found in:
  7. $PANDA/src/doc/howto.MultiGenModelFlags
  8. ***************************************************************************
  9. QUICKREF
  10. ***************************************************************************
  11. FLAG DESCRIPTION
  12. ------------------------------- ----------------------------------------
  13. <egg> { <Model> {1} } Handle to show/hide, color, etc. a chunk
  14. <egg> { <DCS> {1} } Handle to move, rotate, scale a chunk
  15. <egg> { <ObjectType> {barrier} } Invisible collision surface
  16. <egg> { <ObjectType> {trigger} } Invisible trigger polygon
  17. <egg> { <ObjectType> {floor} } Collides with vertical ray
  18. (used to specify avatar height and zone)
  19. <egg> { <ObjectType> {sphere} } Invisible sphere collision surface
  20. <egg> { <ObjectType> {trigger-sphere} } Invisible sphere collision surface
  21. <egg> { <ObjectType> {camera-collide} } Invisible collision surface for camera
  22. <egg> { <ObjectType> {camera-collide-sphere} } Invisible collision surface for camera
  23. <egg> { <ObjectType> {camera-barrier} } Invisible collision surface for camera and colliders
  24. <egg> { <ObjectType> {camera-barrier-sphere} } Invisible sphere collision surface for camera and colliders
  25. <egg> { <ObjectType> {backstage} } Modeling reference object
  26. <egg> { <Decal> {1} } Decal the node below to me
  27. (like a window on a wall)
  28. <egg> { <Scalar> fps { # } } Set rate of animation for a pfSequence
  29. ***************************************************************************
  30. DETAILS
  31. ***************************************************************************
  32. The player uses several different types of model flags: HANDLES, BEHAVIORS,
  33. and PROPERTIES. The following sections give examples of some of the most
  34. common flag/value pairs and describes what they are used for.
  35. ********** HANDLES **********
  36. These flags give the programmers handles which they can use to
  37. show/hide, move around, control the texture, etc. of selected segments
  38. (chunks) of the model. The handle is the name of the object bead in
  39. which one places the flag (so names like red-hut are more useful than
  40. names like o34).
  41. <egg> { <Model> {1} }
  42. Used to show/hide, change the color, or change the collision properties
  43. of a chunk.
  44. <egg> { <DCS> {1} }
  45. Used to move, rotate, or scale a chunk of the model. Also can be used
  46. (like the <Model> flag) to show/hide, change the color, and change the
  47. collision properties of a chunk.
  48. ********** BEHAVIORS **********
  49. These flags are used to control collision properties, visibility and
  50. behavior of selected chunks. An "X" in the associated column means:
  51. VISIBLE the object can be seen (see NOTE below for invisible objects)
  52. SOLID avatars can not pass through the object
  53. EVENT an event is thrown whenever an avatar collides with the object
  54. VISIBLE SOLID EVENT
  55. ------- ------- -------
  56. <egg> { <ObjectType> {barrier} } X X
  57. <egg> { <ObjectType> {trigger} } X
  58. <egg> { <ObjectType> {backstage} }
  59. Descriptions:
  60. - BARRIERS are invisible objects that block the avatars. Use these
  61. to funnel avatars through doorways, keep them from falling off
  62. bridges, and so on.
  63. - TRIGGERS can be used to signal when avatars have entered a certain
  64. area of the model. One could place a trigger polygon in front of
  65. a door, for example, so the player can tell when the avatar has
  66. moved through the door.
  67. - BACKSTAGE objects are not translated over to the player. Modelers
  68. should use this flag on reference objects that they include to help
  69. in the modeling task (such as scale references)
  70. IMPORTANT NOTE:
  71. It is not necessary, and in fact some cases it will actually cause
  72. problems if you set the transparency value for the invisible objects
  73. above (barrier, trigger, eye-trigger) to 0.0. These objects will
  74. automatically be invisible in the player if they have been flagged as
  75. one of these three invisible types. If you wish to make it clear in
  76. MultiGen that these objects are invisible objects, set the transparency
  77. value to some intermediate level (0.5). Again, do not set the
  78. transparency value to 0.0.
  79. ********** PROPERTIES **********
  80. These are used to control properties of selected chunks.
  81. <egg> { <Scalar> fps { frame-rate } }
  82. This specifies the rate of animation for a pfSequence node
  83. ***************************************************************************
  84. NOTES
  85. ***************************************************************************
  86. 1) Combinations
  87. Multiple Flag/value pairs can be combined within an single <egg> field.
  88. For example:
  89. <egg> { <Model> {1}
  90. <ObjectType> {barrier} }
  91. Generally, the <Model> flag can be combined with most other flags
  92. (except DCS). Each bead, however, can only have *one* <ObjectType> flag.
  93. 2) Newlines, spaces, and case (usually) do not matter. This above entry
  94. could also be written as:
  95. <egg>{<model>{1}<objecttype>{barrier}}
  96. 3) Where to place the flags
  97. All model flags except <Normal> flags are generally placed in the
  98. topmost group bead of the geometry to which the flag applies.
  99. GROUP <- place flags here, except <Normal>
  100. |
  101. ---------------------------
  102. | | |
  103. OBJECT1 OBJECT2 OBJECT3 .....
  104. | | |
  105. polygons polygons polygons <- place <Normal> flag here
  106. Flags can also be placed in object beads, though for consistency sake
  107. its better to place them in the group beads.
  108. 4) Flags at different levels in the model
  109. Flags in lower level beads generally override flags in upper level
  110. beads.
  111. 5) For more detailed information see $PANDA/src/doc/eggSyntax.txt.