Hi there! I had a quick question that was more theoretical discussion than needing help with a specific script. I was wondering if there’s some kind of way to implement shadow Level of Detail, so closer shadows are more defined, and further shadows are less defined? And if not, what’s the best way to approach this in your opinion. For context, I’m thinking of using this for shadowing large terrain landmasses. Thanks in advance!
There are indeed techniques for this! For example, two that I’m aware of are “Cascaded Shadow Maps” and “Parallel Split Shadow Maps”.
Panda doesn’t provide such shadowing out-of-the-box. However, I think that the “RenderPipeline” plugin might include at least one such technique, and there may be some code or references to be found if you search the forum. Otherwise, you may find tutorials or the like online.
@Atlas: you can see a PSSM example in P3D at: Parallel Split Shadow Mapping using PSSMCameraRig - Code Snippets - Panda3D
Panda3D provides the infrastructure to create PSSM but you have to create and manage the camera rig and also implement your own shader to apply the shadow maps on your scene. This is what is showcased in the code snippet above.
Also, the code is meant to show how to use PSSMCameraRig, so there is no advanced shadow techniques like shadow filtering, camera snapping, etc in the shader code and the resulting shadows are not perfect.