No announcement yet.

Post Process: Add Glow Effect around Visible PlayerCharacters

  • Filter
  • Time
  • Show
Clear All
new posts

    Post Process: Add Glow Effect around Visible PlayerCharacters

    Hello, i have a problem on putting a glow effect around player characters.
    basicly not the glow effect is the problem, the problem is to put it only around the visible part of the Skeletal Mesh.

    This is what i got so far. but i dont found a solution to remove the glow from the not visible part of the Mesh.
    Click image for larger version  Name:	Glow.png Views:	0 Size:	441.3 KB ID:	1782881

    Would be awsome if someone would have a idea how to solve this.

    Convert UV Right (Custom Node)
    return ViewportUVToSceneTextureUV(UV,14);
    Custom Node
    float3 CurColor=0;
    float2 NewUV = UV;
    int i=0;
    float StepSize = Distance / (int) DistanceSteps;
    float CurDistance=0;
    float2 CurOffset=0;
    float SubOffset = 0;
    float TwoPi = 6.283185;
    float accumdist=0;
    if (DistanceSteps < 1)
    return Texture2DSample(SceneTexturesStruct.CustomDepthTexture, SceneTexturesStruct.CustomDepthTextureSampler,NewUV);
    while (i < (int) DistanceSteps)
    CurDistance += StepSize;
    for (int j = 0; j < (int) RadialSteps; j++)
    SubOffset +=1;
    CurOffset.x = cos(TwoPi*(SubOffset / RadialSteps));
    CurOffset.y = sin(TwoPi*(SubOffset / RadialSteps));
    NewUV.x = UV.x + CurOffset.x * CurDistance;
    NewUV.y = UV.y + CurOffset.y * CurDistance;
    float distpow = pow(CurDistance, KernelPower);
    CurColor += ceil(Texture2DSample(SceneTexturesStruct.CustomDepthTexture, SceneTexturesStruct.CustomDepthTextureSampler,NewUV))*distpow;
    accumdist += distpow;
    SubOffset +=RadialOffset;
    CurColor = CurColor;
    CurColor /=accumdist;
    return CurColor;
    This is the Post Process Material i made so far
    Click image for larger version  Name:	Material.png Views:	0 Size:	226.4 KB ID:	1782880

    Try building something with Niagara that emits from the mesh instead? Particles are part of the scene and depth tested automatically.