Shadow problem

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.

Something like that --> [Parallel-Split Shadow Maps (PSSM): Shadows for large scenes) (none of the Downloads in this Thread are working)

        spotLight = Spotlight("spotLight")
        spotLight.setColor(Vec4(0.9, .9, .9, 1))

        self.spotLightNode = spotLightNode = render.attachNewNode(spotLight)
        spotLightNode.setPos(700, 100, 100)

Could be this: … b0b152cad0

Unfortunately the solutions didnt work for me. See if they work for you.

thanks, but I’ve already tried that. Doesn’t work…

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.

There’s been some work done on this in Panda before. Check out the work on Parallel Split Shadow Mapping.
[Parallel-Split Shadow Maps (PSSM): Shadows for large scenes)

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.

Is there anywhere a working “Parallel Split Shadow Mapping” demo. This code --> [Parallel-Split Shadow Maps (PSSM): Shadows for large scenes) dosen’t work with panda 1.7

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