Difference between revisions of "Leaf"

From DoomWiki.org

[checked revision][checked revision]
m (rephrase due to redirect loss (black hole link removal))
(Beef up intro)
 
Line 1: Line 1:
{{Doom level format}}'''LEAFS''' is the name of a [[WAD]] [[lump]] which is a component of a [[level]] in the [[Sony PlayStation]] ports of ''Doom'', and in [[Doom 64]] for the [[Nintendo 64]]. It is also used by [[Doom64 EX]], but does not exist in other ports nor in [[vanilla Doom]]. It is normally generated automatically by a dedicated [[node builder]].
+
{{Doom level format}}
 +
'''LEAFS''' is the name of a [[WAD]] [[lump]] which is a component of [[level]]s in the [[Sony PlayStation]] ports of [[Doom]] and [[Final Doom (PlayStation)|Final Doom]], and in [[Doom 64]] for the [[Nintendo 64]]. It is also used by [[Doom64 EX]], but does not exist in other ports nor in [[vanilla Doom]]. It was generated automatically by a dedicated [[node builder]] created by [[Williams Entertainment]] programmer [[Aaron Seeler]], with technical advice from [[John Carmack]], and implements a concept similar to [[GL nodes]], providing fully closed polygons for use as the floor and ceiling of each [[subsector]].
  
A leaf is collection of [[seg]]s and [[vertex]]es for a [[subsector]]. There are one such collection for each subsector, in the same order as the SSECTORS lump.
+
A leaf is collection of [[seg]]s and [[vertex]]es for a subsector. There are one such collection for each subsector, in the same order as the SSECTORS lump.
  
 
== Leaf structure ==
 
== Leaf structure ==

Latest revision as of 17:19, 24 August 2016

Doom level format

LEAFS is the name of a WAD lump which is a component of levels in the Sony PlayStation ports of Doom and Final Doom, and in Doom 64 for the Nintendo 64. It is also used by Doom64 EX, but does not exist in other ports nor in vanilla Doom. It was generated automatically by a dedicated node builder created by Williams Entertainment programmer Aaron Seeler, with technical advice from John Carmack, and implements a concept similar to GL nodes, providing fully closed polygons for use as the floor and ceiling of each subsector.

A leaf is collection of segs and vertexes for a subsector. There are one such collection for each subsector, in the same order as the SSECTORS lump.

Leaf structure[edit]

A leaf is of this form:

Offset Size (bytes) Description
0 2 Number n of vertex/seg references
2 n * 4 References

Each reference is of this form:

Offset Size (bytes) Description
0 2 Vertex number
2 2 Seg number

The order in which the segs and vertices are referenced should correspond to a clockwise order for each subsector, allowing the engine to easily transform subsectors into convex polygons. This also means that the node builder should have created the subsectors with the same constraints as for generating GL nodes, as a concave subsector simply cannot become a convex polygon.

Sources[edit]