Welcome back everyone to another instalment of my studio 2 development blog.
Today I would like to talk about my research into creating shaders in UE4 and what I have managed to achieve so far using that research. This one may be a little “mathy” but I will try to keep the technical talk to a very sensible format.
I’ll start with a few screenshots and then we will talk about them.
The first image is a screenshot of the shader in UE4 and the second is it applied to some shapes. It was a little hard to get that screen capture as it is a pulsating texture driven by a waveform function.
So I created the base image for the opacity mask from an image of fire that I turned into grey-scale and edited until I was happy with the result. I then took that texture and made several separate rotation functions for it and multiplied the results together to get a dynamic moving pattern. (A note here – I would like to look further into how I might be able to move the UV coordinates in a linear fashion rather than a rotary manner). I then blended in a wave function (sine/cosine function) that gives the texture a pulsating appearance (the extent and frequency of the fade in/out can be altered using the variables within the nodes and constant/variable multipliers). I then attached in a vertex displacement function that allows the intensity of the material to displace the mesh vertices a proportionate amount. Combining this with an emissive map we can achieve some quite dynamic results.
Furthermore I then went on to parametrise some of the materials variables allowing me to instance the material and edit the colour, intensity and other variables on the fly without editing the original material.
My planed application for this material is to simulate a semi-solid or ethereal vapour like substance without the use of a particle effect which can be resource intensive. The benefits of this shader is that the effect can be altered by either changing the instanced parameters or by altering the mesh’s UV coordinates.
Other possible uses for similar sharers would be mesh based particle effects for effects that are semi-solid such as fire or volumetric clouds.
I was interested in taking this approach for creating the effect that I am after as particle effects (particularly complicated ones) can be resource intensive and so using a mesh based approach may be able to increase performance. Additionally meshes are able to be animated and the bounds of a mesh are more easily modified in a more controllable manner than those of a particle effect. But this is something that I would have to look into further.
Thank you, I understand that one may have been a little heavy,
Till next time,
James Day – 1002467