Shadow of a transparent object

Hello. I was looking into the JME3 shadow renderer and filter.
I was wondering, are those classes able to cast shadows of a transparent or an object that is not rendered?

What I want to do is to cast a shadow from a directional light (the sun) from a mountain range. The shadow is dynamical because the directional light will change depending on the sun’s position over time. I was thinking that the easiest way is to create a mountain using the JME3 terrain and a heightmap. The shadow renderer/filter can cast a shadow from this terrain. But the terrain will be transparent so that it’s not shown (because I don’t want the mountain to be visible, just the shadow). The shadow is cast on a flat pane.

Something like this: https://blender.stackexchange.com/questions/150042/how-do-i-make-an-object-cast-shadows-but-be-invisible-in-the-render

I guess I need to set a custom shader for that?

I’m pretty sure if you just added a transparent object it would still cast a shadow because the shadow filter is a post process. I don’t think it distingishes any difference in material, thought I’m not entirely sure about the bucket it’s in.

Shadows will adhere to transparency by default which is why tree leaves and things will cast proper shadows. At least that’s my recollection.

Probably needs a custom shader.