[ZScript] RenderRequired/RenderHidden

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

[ZScript] RenderRequired/RenderHidden

Postby Rachael » Sat Jul 29, 2017 5:12 pm

As of the latest devbuild, actors can now specify "RenderRequired/RenderHidden" properties that disable rendering based on certain criteria.

Both of these options are bitmask fields and support the following:

  • RFF_FLATSPRITES - flat sprite support
  • RFF_MODELS - 3d models support
  • RFF_SLOPE3DFLOORS - sloped 3d floor support
  • RFF_TILTPITCH - full free-look is currently supported
  • RFF_ROLLSPRITES - roll sprites are supported
  • RFF_UNCLIPPEDTEX - midtex and sprite can render "into" flats and walls
  • RFF_MATSHADER - material shaders
  • RFF_POSTSHADER - post-process shaders (renderbuffers)
  • RFF_BRIGHTMAP - brightmaps
  • RFF_COLORMAP - custom colormaps (incl. ability to fullbright certain ranges, ala Strife)
  • RFF_POLYGONAL - uses polygons instead of wallscans/visplanes (i.e. softpoly and hardware opengl)
  • RFF_TRUECOLOR - renderer is currently truecolor
  • RFF_VOXELS - renderer is capable of voxels

It's important to remember that these *only* hide your actor. The actor will still interact with the world if not disabled some other way. (So this isn't an ideal solution to use on monsters or interactive objects - yet - mostly just special effects, for now)

RenderHidden hides the actor if any of your specified criteria are true, RenderRequired hides the actor if any of those criteria are false.

These go into your actor properties just like any other:
ZScript:
Code: Select allExpand view
class explosivebarreltesting : explosivebarrel replaces explosivebarrel
{
   Default
   {
      RenderRequired RFF_POLYGONAL | RFF_TRUECOLOR;
      RenderHidden RFF_COLORMAP;
   }
}


Attached is an example that should allow you to play around with this feature. Simply load it into E1M1.

Note that "r_showcaps" will show a list of these flags and whether the current renderer supports them.
Attachments
zscript-rff-test.zip
(873 Bytes) Downloaded 59 times
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Return to Editing (Archive)

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests