Hi, I’ve tried the new ShadowFeature form Panda 1.7. I want to have shadows in a relatively large scene casted from a DirectionalLight (its my Sun). As I heard before this only works if a additional Spotlight is applied to the scene. But I didn’t get a usable result.
If tested it with a DirectionalLight and a Spotlight.
With a DirectionalLight I weren’t able to change the direction of the shadows.
With the Spotlight there are line-artefacts.
Is there a way to remove these strange lines?
Or can Anybody provide a working piece of code?
Wich is working on a large area.
You are running into a computer classic graphics problem. The way that Panda implements shadow mapping is very much optimized for a spot light and how one would use a spot light in the real world. It is no intended for large outdoor scenes.
To use shadow mapping to do larger outdoor scenes, you need to get a little smarter and it is generally not possible to use the auto shader generator.
This is a very hard problem that many modern game engines have to deal with in a smart manner. Many game engines optimize things by drawing the shadow at a high resolution for things close to you and at a much lower resolution for things further away. Certain game engines don’t render shadows at all for things far away.
I have to warn you though. This isn’t for the faint of heart. To properly solve these types of problems requires a pretty good understanding of computer graphics and rendering.
I will say that we’ve been working on a system to improve this over all and make this stuff easier to build and access but that’s still a far time coming.
I’m try to do this very same thing: enable shadowCaster for an outdoor scene. It seems to “lock up” or send it off somewhere bad; my CPU(s) rail if I enable this (usually only 25% load otherwise)
I can see after reading this it might be proportional to the number objects in scene, but I eliminated all objects (trees, avatar model, etc) and left just untextured terrain; no difference.
If this is still a known limitation, I am more than happy to turn off this little cosmetic boost for now. Just wondering…thanks.
edit: might help to add the error…
panda/src/glstuff/glGraphicsStateGuardian_src.cxx : invalid operation
:display(error): Deactivating glxGraphicsStateGuardian.
I should also note that pstat shows no real activity at a steady state of 5ms or so. The main window however is just stuck and shows 0.0FPS