How to create a custom shadow for a mesh?

Id like to know how to setup a custom shadow for a mesh, lets say I have a sphere mesh but want a projected box shadow (even vice-versa would do). My main goal is to project a shadow for a mesh whose material is Surface domain, blend mode could be Translucent or alpha-composite, shading model is Lit (or it will not have shadow at all), the mesh format itself doesnt matter but I want it to project a shadow to all scene objects it should as a mesh with opaque material and this shadow has nothing to do with the mesh geometry. Im struggling for quite some time with this and only thing I got researching which should help is: this article , but Im without luck on getting response from the author about it or a simple project sample to look at. Even trying to reproduce the article I was not luck on making it work as intended.

I have posted this one on AnswerHub but received just one reply, topic is here:

Just check my added comments and if anyone would please, give me some hint, where to look at or a piece of project I could look at.

My sincereously thanks!

The article you are referring to is about manual per-object shadows and does not sound like the thing you need. What is stopping you from using two meshes, one with shadowcasting disabled, and the other one, hidden ingame but with cast hidden shadows enabled ?

Because the shadow is not a representation from the mesh geometry… it is something I want to draw with material… the mesh in this case anything (ie: cube) that will show any shadow I want to draw with material. The idea you suggest would perfectly work, but it is not what I need. thx for the suggestion thou.

you can disable shadow for mesh and use decal with desired shadow mask.

@redbox, I didnt think of decals, mostly because I never used one myself and Im not aware yet about performance if it is big or if it is in motion around a scene. I have tried to use a light function but the result was good only with strong light and not faint ones. I will check this and will post my findings here. Thx!

Well, just for others to know, the best result so far after lots of adjustments is a Light Function which can be used in most of the stuff I was thinking previously. As soon I finish the job I will share the results for everyone to see.

Suddenly I have an idea.

@Deathrey advise to disable shadow for main mesh and enable hidden shadow for additional mesh.
But you want to use material, not mesh.
In this case, you can use simple plane mesh, with masked material on it.
You can even make it to face to desired light source.

Actually…it would be super valuable to really support custom shadow meshes not only for artistic purposes!
Its a common practice in games to have lower rez shadow meshes to reduce the cost of dynamic shadows. So you have a high quality render mesh that you see when playing the game, but the shadows it casts on itself and the world are coming from an optimized version of the same mesh.
Usually engines access this in a similar way as you can use custom LODs, but I am not aware of any support for that in Unreal. Would be highly beneficial though!

Cheers! something like this we need

Couldn’t that be achieved disabling shadows on the visible mesh, and adding an invisible mesh that casts shadows? Not sure how easy would that be to integrate with LODs and whatnot, though.

It could be yeah, but it would be better to have it integrated.