Useful VFX Material Functions and Graphs

Material Functions

Custom

Atlas-DistFieldClip - this Function is used to make particles invisible inside a ship so that splashes, etc don’t show up under the decks of a ship as it sails through them. To use this function, just place it in your Material in the Material Editor andfeed your Opacity or OpacityMask output into this function and then take that output out to the Material Opacity or OpacityMask output. A Material Instance (MIC) for the Material should be created so the useful parameters are exposed for tweaking as needed.

Atlas-ProjectOntoWater - this Function is used to project the Vertices of a Particle Sprite or Particle Mesh onto the surface of a WaveWorks Ocean Surface. To use this properly, a Material Instance (MIC) for the Material should be created so the useful Projection parameters (like distance to offset the verts to avoid interpenetration, etc) are exposed for tweaking as needed.

Atlas-NormalBiasUpward_WS - this Function is used to force the Normals of a particle sprite/etc to point upwards to get a better sense of stable overall scene lighting rather than having the normals point at the camera and get lighting from that direction (which can change a lot as camera rotates and sometimes have color tints that don’t fit well with sky color, etc.). As always this function is best used when a MIC is created so the Bias Amount can be tuned.

Waveworks

WaveWorksHeight - gives the value of the WaveWorks Ocean surface at the current position. See ATLAS-ProjectOntoWater function for example of how to use.

WaveWorksDisplacement - gives the value of the fully displaced WaveWorks Ocean surface including the horizontal motions. See ATLAS-ProjectOntoWater function for example of how to use.

Material Graphs

PostProcess material good practice

SceneTexture needs textcoord node Texture sample needs screenAlignedUVs node

../../_images/image.png

AlphaComposite

AlphaComposite is a blend state like ‘Translucent’ or ‘Additive’ in the latest Unreal Engine, but it is currently not in ours. It allows for much better results for blending bright colored VFX that you want to seem ‘Additive’ over a bright background- where Additive VFX tend to blow out to white or disappear. Here is an example graph:

../../_images/AlphaComposite.png

Note that this is a simple example with just two textures defining the color and opacity, but basically the color and opacity outputs of your shader math should be used how these are.

Here is some more info on it: https://forums.unrealengine.com/development-discussion/rendering/74467-alphacomposite-finally?102548-AlphaComposite-finally!=

Note

There is now an ‘AlphaComposite’ Blend Mode available (where you set Masked/Translucent/Additive/etc) that should have similar functionality as this Material Graph.

Scroll texture from out to in

../../_images/scroll_2_middle.png

Camera Distance Fade

../../_images/cam_distance_fade.png