FUAMODEL
Availability
ZandroX only. No other engine reads a
FUAMODELlump, so a mod can carry one and still load in Zandronum, GZDoom and UZDoom, which would stop on aMODELDEFkeyword they do not know.Works in netgames. It only changes how each machine draws.
Usage
A translucent model writes no depth, so ForkUnderA sorts it among the sprites by its centre, as it sorts a sprite. For a flat
model, such as a glowing ring on the floor, a blood pool or a shadow disc, that is wrong: the ring is painted over the feet of
every monster standing on it beyond its centre. FlatSurface marks such models, and each is then sorted as a floor or
ceiling across its whole footprint, so a monster standing on it is drawn over it, and a ring around a monster's waist is drawn
under its legs and over its body.
FlatSurface Class [Class ...]
- Each named class's models, as
MODELDEFgives them, are marked. Class names and the keyword ignore case. - Any number of lines and of classes per line.
//starts a comment to the end of the line. - Every
FUAMODELlump is read, after everyMODELDEF. - A model only needs this when it is drawn translucent (any render style but
Normal). An opaque flat model already draws right.
A marked surface may be up to 12 units thick. A sprite that reaches up to 12 units past it counts as being on the side that holds the rest of it. A marked model is lit with one light for the whole actor, not per pixel.
Marking is opt-in because finding every flat model by itself cost a heavy map about 0.85 ms a frame. A mod that marks none pays nothing.
Errors
Nothing in a FUAMODEL lump stops the game from loading. The console names each line it could not use: an unknown
keyword, a FlatSurface with no class, a class that does not exist, and a class that has no model.
Examples
// FUAMODEL
// Floor effects drawn under whoever stands on them.
FlatSurface TeleportFog // the teleport ring
FlatSurface BloodPool ShadowDisc
Implementation notes
features/models(the lump)features/hwrender(the sorting)