Need help with a shader

Hello VFX people! I was wondering if anybody can help me with something. I want to recreate something similar to what is seen in this image. Basically I would like to have something similar to a fresnel, but instead of using the camera vector to fade out I would like to use a point in world space. I know this could be done with a sphere mask but in this case I need it to be using the actual normals of the mesh object.
Any help here would be greatly appreciated.

2022-04-01 09-22-57 copy

(worldposition - Point in worldspace) then normalize to get the direction vector to that point. then dot that and the pixel or vertex normal. the result of the dot product will be -1 to 1 so you may need to use the constantbiasscale node to change it to 0 to 1.

prior to normalizing you could use the vector length node to get the distance.

1 Like

Would if you did not have access to vertex normal, but instead had to use Scene Texture:WorldNormal instead. This sounds convoluted but for what I am trying to do this is the way it must be. I am attempting to create an omni directional decal volume, which can only displays on the normals facing the location of a mesh particle. It’s an attempt at making a more convincing fake point light decal solution.

same concept Cel mentioned applies, are you trying to run this on a surface material or a post process one? If it’s on a translucent mesh or sprite, you can use the WorldPositionBehindTranslucency node in UE to get the worldposition

Oh I figured it out, you were right I had to use WorldPositionBehindTranslucency, subtract that from Particle position, Transform it from World Space to Mesh particle space and then Dot that Through World nomal. This got me the values I need, it was opposite normals tho so I just threw a one minus after and it works!!! Thanks Cel and Bruno for the help. I just am not very good at figuring out Vector math stuff like this.

you guys, have helped me to create something just wonderful. I can’t wait to share this, I need to make a video!