Is there a way to add a material glow to meshes without changing every single material that is on a mesh?
I’m wanting to do some glows on characters and possibly some other meshes, and I’m trying to do it just with materials. I know I could change every single material that could possibly be changed, but that also would entail a lot of work for a simple effect.
So, is there a way to do something like this without changing every single material individually?
There is a method you can set up via Blueprint, where it basically duplicates a skeletal mesh and mirrors all of the animations on it, which you can use as a sort of “shell mesh” and apply a simple emissive material with some world position offset to the verts (to push them out a little to avoid overlap and z fighting).
Production-wise, it’s cheaper from a performance standpoint to add the glow in your master character/prop material and adjust it via blueprint or anim curve, but if you want to avoid that it is possible to use the above method.
I know duplicating meshes is something that’s been avoided purposefully, so I’ll look into doing that instead. I came here to check to see if anybody knew another way besides those two, but if that’s my options, then I will deal with them.
It really just depends on the project. If you have something like Diablo or Darktide where you have dozens or even hundreds of characters live all using that feature, the cost will stack up quick. But if you have a game where only a small number of instances can ever use it, like just the main player, you should be safe
Calculate dot product from camera to world normal and you get the fresnel gow, set it with a power node for finer tuning then blend it with the final frame.
I used overlay blend, you can use add or other blending methods, also you can project noises from camera space for more variations.
Thank you for that as well and the example. I don’t know too much about post processing stuff with UE, but it’s something I know I have to learn. Is post process material performance heavy?
I’m guessing you just specify what receives the post process based on its stencil value, so that it doesn’t get applied to everything that’s using that material as a parent? Or would this need an exclusive material parent per object you want to affect?
I don’t have much experience with post process either, so I’m trying to wrap my head around how you go about restricting or specifying individual things that the post process effect is applied to
Hey are heavier than standard material, but you can easily stack up to 5 lighter materials like this and get no performance issues. Of course it depends on the platforme.
Apply the stencil value per object. The limit is 255 unique stencils.
In theory, you cod have 255 unique post-process material effects in-game for various actors.
You can also append a material function that handles the glow functionality, you can set up a map/DT preset of parameters that you can dynamically instance through the blueprint.
Afaik assigning, swapping materials is more expensive then overriding instanced material parameters. Especially if you’re swapping a Character Material, that can be quite complex.
I can’t find the video for it, but there’s a section of this GDC talk that covers how character material effects are (were?) done in Fortnite using material layers.