Is the distance the camera can capture shadows limited?

I want to make a solar system in my game, but I meat limit of shadow distance, The shadow of the moon cannot be cast onto the earth.

How to create super far shadow ? Is the distance the camera can capture shadows limited?

Yes. Shadow distance is limited based on the type of technology used. Unreal supports traditional Cascading Shadow Maps, Virtual Shadow Maps (in Beta) and Raytracing.

CSM uses “cascades” of decreasing detail to cover larger and larger areas, in order to allow nearby objects to have detailed high resolution shadows at the expense of far away objects having low resolution shadows. At some point, the area resolution required to represent a believable shadow becomes too high. In other words, the greater the area covered, the lower resolution the shadow becomes.

VSM is more sophisticated and designed to offer higher detail across long distances. The engine documentation says the following:

“By default, clipmap levels 6 through 22 are allocated virtual shadow map page tables. This means that the default settings have the most detailed clipmap covering 64 cm (2^6 cm) from the camera position, and the broadest clipmap covering about 40 kilometers (2^22 cm). The cost of virtual clipmap levels is insignificant if nothing is present in them, so these defaults work well to cover very large scenes with fairly high resolution near the camera.”

This is of course the default, but I’m not sure what the theoretical maximum size is.

In Raytracing, the longer distance a ray can cover, the more expensive it is. I believe by default UE begins to cull objects at 100 meters.

Here’s a thread about shadowing distance objects.

I haven’t needed to do Planetary/Solar system lighting so I don’t know if there are any easy tricks but it seems to me like a situation that would call for some specialized solutions.