Skel Vert/Surf Location - UE4 colour shift help needed

Hey all, I am making an animated human body that’s made up of particles in UE4. The body has no solid shape and instead is made up of Verts and I have around 39k GPU particles spawning on those verts to create the overall shape of the body. Currently, the entire body is purple in colour, however, I want to be able to have a dark blue in the center of the body and a bright purple around the edges of the character outline.

So far I’ve found that changing the colour in Cascade just affects all the particles without giving me any control for precision of -where- I want the darker/brighter particles to be.

Currently, there is only one camera so I thought maybe something with World Position could work, but I don’t have the material knowledge to figure this out on my own.

If you want it only for one body and one mesh, a simple solution would be to create a DynamicParameterCollection and adjust the particle color (if it’s fading from dark blue to light blue) through this parameter. This tutorial should give you an idea how to set it up and set the location of your parameter to the center of your character body:
https://deepspacebanana.github.io/blog/shader/art/unreal%20engine/Wormhole-Shader-Effect

Afaik there’s no way for the Vert/Surf Location to read the textures/colors underneath, so the only other solution i can think of would be to give the character two materials in your 3d application and spawn different colored particles (by using two different emitters) on these two materials. (Although you will get a ‘hard edge’, if you only have two materials.)

If you wan’t a real outline/fresnel effect for the colors of the particle, it’s a little more complex, because you will need to set the color of the particles by reading some of the information only known to the material of the character (vertex normal etc). I’m not a programmer/technical artist though, so there might be an easier way.

1 Like