[ZScript] RenderRequired/RenderHidden

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.

[ZScript] RenderRequired/RenderHidden

Postby Rachael » Sat Jul 29, 2017 4: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.
You do not have the required permissions to view the files attached to this post.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Return to Editing (Archive)

Who is online

Users browsing this forum: Caleb377 and 2 guests