-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheggattribs.txt
307 lines (260 loc) · 16 KB
/
eggattribs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# The following lines define some handy object types to use within the
# egg syntax. This remaps <ObjectType> { name } into whatever egg
# syntax is given by egg-object-type-name, which makes a handy
# abbreviation for modeling packages (like Maya) to insert
# sophisticated egg syntax into the generated egg file, using a single
# object type string.
# Egg bible:
# https://raw.githubusercontent.com/panda3d/panda3d/master/panda/src/doc/eggSyntax.txt
####################################################################################
# This indicates that this group begins an animated character. A
# Character node, which is the fundamental animatable object of
# Panda's high-level Actor class, will be created for this group.
# This flag should always be present within the <Group> entry at the
# top of any hierarchy of <Joint>'s and/or geometry with morphed
# vertices; joints and morphs appearing outside of a hierarchy
# identified with a <Dart> flag are undefined.
egg-object-type-dart <Dart> { 1 }
egg-object-type-structured <Dart> { structured }
# This attribute indicates that the child nodes of this group
# represent a series of animation frames that should be
# consecutively displayed. In the absence of an "fps" scalar for
# the group (see below), the egg loader creates a SwitchNode, and it
# the responsibility of the show code to perform the switching. If
# an fps scalar is defined and is nonzero, the egg loader creates a
# SequenceNode instead, which automatically cycles through its
# children.
egg-object-type-switch <Switch> { 1 }
egg-object-type-seq2 <Switch> { 1 } <Scalar> fps { 2 }
egg-object-type-seq4 <Switch> { 1 } <Scalar> fps { 4 }
egg-object-type-seq6 <Switch> { 1 } <Scalar> fps { 6 }
egg-object-type-seq8 <Switch> { 1 } <Scalar> fps { 8 }
egg-object-type-seq10 <Switch> { 1 } <Scalar> fps { 10 }
egg-object-type-seq12 <Switch> { 1 } <Scalar> fps { 12 }
egg-object-type-seq24 <Switch> { 1 } <Scalar> fps { 24 }
####################################################################################
# These are just shortcuts to define the Model and DCS flags, which
# indicate nodes that should not be flattened out of the hierarchy
# during the conversion process. DCS goes one step further and
# indicates that the node's transform is important and should be
# preserved (DCS stands for Dynamic Coordinate System). Notouch is
# even stronger, and means not to do any flattening below the node at
# all.
egg-object-type-model <Model> { 1 }
# Stands for a local transform: takes the root node of the hierarchy and transforms from there.
# Good for things like environment models' locators, like door_origin or elevator_origin.
egg-object-type-localdcs <DCS> { local }
# takes parent's transforms into account when translating. Good for actors that need joints exposed for further manipulation in the code.
egg-object-type-netdcs <DCS> { net }
egg-object-type-dcs <DCS> { 1 }
egg-object-type-notouch <DCS> { no-touch }
####################################################################################
# The following define various kinds of collision geometry. These
# mark the geometry at this level and below as invisible collision
# polygons, which can be used by Panda's collision system to detect
# collisions more optimally than regular visible polygons.
egg-object-type-trigger <Scalar> collide-mask { 0x01 } <Collide> { Polyset descend intangible }
egg-object-type-trigger-sphere <Scalar> collide-mask { 0x01 } <Collide> { Sphere descend intangible }
# "barrier" means a vertical wall, with bitmask 0x01
egg-object-type-barrier <Scalar> collide-mask { 0x01 } <Collide> { Polyset descend }
# Makes it easier when importing panda models into Maya
egg-object-type-barrier-no-mask <Collide> { Polyset descend }
egg-object-type-planebarrier <Scalar> collide-mask { 0x01 } <Collide> { Plane descend }
egg-object-type-planefloor <Scalar> collide-mask { 0x02 } <Collide> { Plane descend }
egg-object-type-sphere <Scalar> collide-mask { 0x01 } <Collide> { Sphere descend }
egg-object-type-tube <Scalar> collide-mask { 0x01 } <Collide> { Tube descend }
# "bubble" puts an invisible bubble around an object, but does not
# otherwise remove the geometry.
egg-object-type-bubble <Collide> { Sphere keep descend }
egg-object-type-camtransbarrier <Scalar> collide-mask { 0x09 } <Collide> { Polyset descend }
egg-object-type-camera-barrier-sphere <Scalar> collide-mask { 0x05 } <Collide> { Sphere descend }
# shorthand for maya
egg-object-type-cambarrier-sphere <Scalar> collide-mask { 0x05 } <Collide> { Sphere descend }
egg-object-type-cambarrier <Scalar> collide-mask { 0x05 } <Collide> { Polyset descend }
egg-object-type-camera-barrier <Scalar> collide-mask { 0x05 } <Collide> { Polyset descend }
# "camera-collide" means things that the camera should avoid, with bitmask 0x04
egg-object-type-camera-collide <Scalar> collide-mask { 0x04 } <Collide> { Polyset descend }
egg-object-type-camcollide <Scalar> collide-mask { 0x04 } <Collide> { Polyset descend }
egg-object-type-camera-collide-sphere <Scalar> collide-mask { 0x04 } <Collide> { Sphere descend }
egg-object-type-camtransparent <Scalar> collide-mask { 0x08 } <Collide> { Polyset descend }
egg-object-type-direct-widget <Scalar> collide-mask { 0x80000000 } <Collide> { Polyset descend }
# "floor" and "dupefloor" define the nodes in question as floor polygons.
# dupefloor means to duplicate the geometry first so that
# the same polygons serve both as visible geometry and as collision polygons.
# "floor" means a horizontal floor, with bitmask 0x02
egg-object-type-floor <Scalar> collide-mask { 0x02 } <Collide> { Polyset descend level }
egg-object-type-dupefloor <Scalar> collide-mask { 0x02 } <Collide> { Polyset keep descend level }
egg-object-type-floor-collide <Scalar> collide-mask { 0x06 }
egg-object-type-smooth-floors <Collide> { Polyset descend } <Scalar> from-collide-mask { 0x000fffff } <Scalar> into-collide-mask { 0x00000002 }
### Panda3D specific ###
egg-object-type-invsphere <Collide> { InvSphere descend }
egg-object-type-solidpoly <Collide> { Polyset descend solid }
egg-object-type-turnstile <Collide> { Polyset descend turnstile }
egg-object-type-eye-trigger <Collide> { Polyset descend intangible center }
####################################################################################
### Toontown specific ###
# Collision polygons for moving platforms (normally these are not seen
# by the player; this helps the collision system do the right thing;
# toons that are not on the platform do not react to this bit mask):
egg-object-type-safety-net <Scalar> collide-mask { 0x200 }
# Collision polygons for _near_ moving platforms (normally these are
# not seen by the player; this helps the collision system do the
# right thing; toons that _are_ on the platform do not react to
# this bit mask):
egg-object-type-safety-gate <Scalar> collide-mask { 0x400 }
# Things we can throw a pie at. (Pies also react to CameraBitmask and
# FloorBitmask, but not WallBitmask.):
# Brought in from OTPGlobals
egg-object-type-pie <Scalar> collide-mask { 0x100 }
# Things the magnet can pick up in the Cashbot CFO battle (same as
# CatchGameBitmask):
egg-object-catch-grab <Scalar> collide-mask { 0x10 }
# Pets avoid this
egg-object-type-pet <Scalar> collide-mask { 0x08 }
# Furniture movement
egg-object-type-furniture-side <Scalar> collide-mask { 0x20 }
egg-object-type-furniture-top <Scalar> collide-mask { 0x40 }
egg-object-type-furniture-drag <Scalar> collide-mask { 0x80 }
# Used when toon hits lava
egg-object-type-ouch1 <Tag> ouch { 1 }
egg-object-type-ouch2 <Tag> ouch { 2 }
egg-object-type-ouch3 <Tag> ouch { 3 }
egg-object-type-ouch4 <Tag> ouch { 4 }
egg-object-type-ouch5 <Tag> ouch { 5 }
####################################################################################
# Alpha channels
# If alpha-type is OFF, it means not to enable transparency, even if
# the image contains an alpha channel or the format is RGBA. If
# alpha-type is ON, it means to enable the default transparency,
# even if the image filename does not contain an alpha channel. If
# alpha-type is any of the other options, it specifies the type of
# transparency to be enabled.
egg-object-type-multisample <Scalar> alpha { ms }
egg-object-type-multisample-mask <Scalar> alpha { ms-mask }
egg-object-type-binary <Scalar> alpha { binary }
egg-object-type-dual <Scalar> alpha { dual }
egg-object-type-blend <Scalar> alpha { blend }
egg-object-type-glass <Scalar> alpha { blend-no-occlude }
####################################################################################
# It is sometimes important to control the order in which objects
# are rendered, particularly when transparency is in use. In Panda,
# this is achieved via the use of named bins and, within certain
# kinds of bins, sometimes an explicit draw-order is also used (see
# below).
# In the normal (state-sorting) mode, Panda renders its geometry by
# first grouping into one or more named bins, and then rendering the
# bins in a specified order. The programmer is free to define any
# number of bins, named whatever he/she desires.
# This scalar specifies which bin this particular polygon is to be
# rendered within. If no bin scalar is given, or if the name given
# does not match any of the known bins, the polygon will be assigned
# to the default bin, which renders all opaque geometry sorted by
# state, followed by all transparent geometry sorted back-to-front.
# Define a "ground" type, for rendering ground surfaces immediately
# behind the drop shadows.
egg-object-type-ground <Scalar> bin { ground }
egg-object-type-shground <Tag> cam { shground }
egg-object-type-shadow-ground <Tag> cam { shground }
# Define a "shadow" object type, so we can render all shadows in their
# own bin and have them not fight with each other (or with other
# transparent geometry).
egg-object-type-shadow <Scalar> bin { shadow } <Scalar> alpha { blend-no-occlude }
# This is actually the default bin.
egg-object-type-bin-fixed <Scalar> bin { fixed }
# Don't know if these have any value, though these bins exist within Toontown's codebase.
egg-object-type-bin-gui-popup <Scalar> bin { gui-popup }
egg-object-type-bin-unsorted <Scalar> bin { unsorted }
# Background might be good for dust clouds
egg-object-type-bin-background <Scalar> bin { background }
egg-object-type-bin-transparent <Scalar> bin { transparent }
# aux support
egg-object-type-transparent <Scalar> bin { transparent }
# Used in DistributedGolfHole
egg-object-type-bin-opaque <Scalar> bin { opaque }
# aux support
egg-object-type-opaque <Scalar> bin { opaque }
# This works in conjunction with bin to further refine the
# order in which this polygon is drawn, relative to other geometry
# in the same bin. If (and only if) the bin type named in the bin
# scalar is a CullBinFixed, this draw-order is used to define the
# fixed order that all geometry in the same will be rendered, from
# smaller numbers to larger numbers.
# If the draw-order scalar is specified but no bin scalar is
# specified, the default is a bin named "fixed", which is a
# CullBinFixed object that always exists by default.
#egg-object-type-draw0 <Scalar> draw-order { 0 }
#egg-object-type-draw1 <Scalar> draw-order { 1 }
####################################################################################
# If this is present and boolean-value is non-zero, it indicates
# that the geometry *below* this level is coplanar with the geometry
# *at* this level, and the geometry below is to be drawn as a decal
# onto the geometry at this level. This means the geometry below
# this level will be rendered "on top of" this geometry, but without
# the Z-fighting artifacts one might expect without the use of the
# decal flag.
# AKA Used for Z-fighting issues
egg-object-type-decal <Scalar> decal { 1 }
egg-object-type-invisible <Scalar> visibility { hidden }
####################################################################################
# Specifies that a special blend mode should be applied geometry at
# this level and below.
# "glow" is useful for halo effects and things of that ilk. It
# renders the object in add mode instead of the normal opaque mode.
egg-object-type-glow <Scalar> blend { add }
egg-object-type-blend-add <Scalar> blend { add }
egg-object-type-blend-sub <Scalar> blend { subtract }
egg-object-type-blend-inv-sub <Scalar> blend { inv-subtract }
egg-object-type-blend-min <Scalar> blend { min }
egg-object-type-blend-max <Scalar> blend { max }
####################################################################################
# This makes the first (or only) polygon within this group node into
# an occluder. The polygon must have exactly four vertices. An
# occluder polygon is invisible. When the occluder is activated
# with model.set_occluder(occluder), objects that are behind the
# occluder will not be drawn. This can be a useful rendering
# optimization for complex scenes, but should not be overused or
# performance can suffer.
egg-object-type-occlude <Scalar> occluder { 1 }
####################################################################################
egg-object-type-billboard <Billboard> { axis }
#egg-object-type-billboard-axis <Billboard> { axis }
egg-object-type billboard-point <Billboard> { point }
####################################################################################
# These don't play nicely with Maya right now, so commenting them out.
# These are to be used by MATERIALS ONLY!
# This specifies the type of texture environment to create; i.e. it
# controls the way in which textures apply to models.
# The default environment type is MODULATE, which means the texture
# color is multiplied with the base polygon (or vertex) color. This
# is the most common texture environment by far.
#egg-object-type-env-modulate <Scalar> envtype { modulate }
#egg-object-type-env-decal <Scalar> envtype { decal }
#egg-object-type-env-blend <Scalar> envtype { blend }
#egg-object-type-env-replace <Scalar> envtype { replace }
#egg-object-type-env-add <Scalar> envtype { add }
#egg-object-type-env-blend-color-scale <Scalar> envtype { blend_color_scale }
#egg-object-type-env-modulate-glow <Scalar> envtype { modulate_glow }
#egg-object-type-env-modulate-gloss <Scalar> envtype { modulate_gloss }
####################################################################################
# surface attributes
egg-object-type-surface-dirt <Tag> surface { dirt }
egg-object-type-surface-gravel <Tag> surface { gravel }
egg-object-type-surface-grass <Tag> surface { grass }
egg-object-type-surface-asphalt <Tag> surface { asphalt }
egg-object-type-surface-wood <Tag> surface { wood }
egg-object-type-surface-water <Tag> surface { water }
egg-object-type-surface-snow <Tag> surface { snow }
egg-object-type-surface-ice <Tag> surface { ice }
egg-object-type-surface-sticky <Tag> surface { sticky }
egg-object-type-surface-metal <Tag> surface { metal }
####################################################################################
# I don't know what these are used for, it's not listed anywhere in the egg syntax
# though it is listed by default
#egg-object-type-portal <Scalar> portal { 1 }
#egg-object-type-polylight <Scalar> polylight { 1 }
#egg-object-type-indexed <Scalar> indexed { 1 }
# This isn't used in the egg loader, it controls a setting only within
# maya2egg itself. So if it appears in an egg file, it means nothing.
# Edit: Seems useless for now, so removing.
# egg-object-type-keep-all-uvsets
####################################################################################