Static Init (sky transfer)

From Eternity Wiki
Revision as of 08:21, 16 October 2021 by Printz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


This is a parameterized linedef special.

Transfer wall textures to skies.


Static_Init(tag, 255, flip_sky)


  • tag: tag of sectors to affect.
  • The second argument is reserved and must be 255, otherwise it won't work and may break forward compatibility.
  • flip_sky: 0 to draw the sky as-is, 1 to flip it horizontally in the same way that standard skies get flipped.


No examples given.


The equivalent Doom format linedef types are:

  • 271: Static_Init(tag, 255, 0)
  • 272: Static_Init(tag, 255, 1)

F_SKY1 or F_SKY2 must still be used as the floor or ceiling texture in the sectors for which sky is desired.

Every tagged sector with F_SKY1 or F_SKY2 will use a sky texture based on the upper texture of the first sidedef of the Static_Init linedef.

Vertical offsets or scrolling is transferred, allowing for precise adjustments of sky position. Unpegging in the sky transfer linedef does not affect the sky texture. IMPORTANT: you will need to set the vertical offset correctly for the sky to look as intended, such as for looking up or down. Unlike EMAPINFO declared skies, Eternity won't try to autodetect the correct drawing position; it's fully controlled from the sidedef offset. Regardless of vertical offset, the sky will tile upwards until it leaves the 0-pitch player view. Above that, it will fade to an average colour. This is to make sure that landscape skies still look correct when the player looks up. However, if the trigger linedef is tagged for any vertical scrolling, the sky will tile vertically all the way — this will allow vertically flowing background images to still look as intended.

For the purpose of the offsets, the fullscreen height is 200 units. A 200 tall sky texture will cover the entire screen when the player looks in the exact pitch towards it. "0 view pitch" means the vanilla Doom look pitch, without any look-up or look-down component. Here are some common values and their effects, for the vertical offset:

  • 0: 128 units below screen top at 0 view pitch. Since Doom skies are 128 units tall, they'll get fully drawn from the top of the 0 view pitch screen. Taller skies will extend upwards until they fade into a colour.
  • 128: All skies, regardless of height, will draw from the top of the 0 view pitch screen. When looking up, you will see them fade to a single colour. 200-tall skies from this position will cover the entire view when looking in 0 pitch
  • 228: Skies will get drawn to fully cover the Heretic view pitch upwards. That's 100 units above the top of the 0 view pitch screen. For Doom with mlook this won't be sufficient.
  • 288: Draw skies to fully cover the maximum allowed view pitch (45 degrees up), as enabled in Doom when mlook is enabled.

Horizontal offsets or scrolling of the transferred upper wall texture is converted into revolution of the sky texture, but it occurs at a very slow speed relative to the moving texture, allowing for long-period rotations.

Animated and swirling textures may be transferred to skies as well.

Since classic level-wide skies (as in the vanilla games as well as EMAPINFO defined skies) get flipped horizontally, this practice can also be done with this special, by having flip_sky set to 1.

NOTE: you cannot use this special to transfer Hexen-style double skies — those can currently only be set in EMAPINFO for the entire map. For more advanced skies, you can use sky boxes, via Portal_Define.

The linedef special identification is 190 (UDMF) or 481 (ExtraData).

See also