Casting Shadows

Articles on Panda3D state that shadows are possible through the Engine, but yet I’ve read articles that say casting real-time shadows is not supported by Panda3D.

Can someone clear this up? Does Panda3D have API support for real-time shadows or is it only obtainable with shaders written in the CG language?

I’m guessing the latter, but if the Engine did support it directly, how do you get the shadows to show up? Setting shadowcaster to True and setting render.setShaderAuto() doesn’t do it.

Same answer, there’s an example about shadows.

Yeah, and I believe the examples use shader files. SHA

What I want to know is, can Panda3D render real-time shadows without the manual shader files.

The “advanced” example uses shader files, the “basic” one doesn’t.

Yes, it can.

Note that there is this weird rendering effect noone could explain: panda3d.org/forums/viewtopic … b0b152cad0

I’ve found out that both, Spot and Directional Lights have to be on with Casting Shadows true. That’s a mistake anyone can make…you would assume one light or the other would cast shadows. I know the manual said Point Lights can not.

And yes…there is a poor visual effect with larger graphics…at least that is what I read in other forums across the internet. Other Panda “Junkies” are using shader alternatives to smooth out the bad effect.

I would suggest scaling down your graphics and create your characters/worlds on a smaller scale. Although I have not tested that suggestion.

----Scale Test Done 1206pm: Conclusion - no good.

Panda3D supports built-in shadow casting out of the box as of 1.7.0, articles that say it don’t may be out of date.

Hmm… one light should really work too, either a spot or directional light. I don’t know why you need to enable both - it must be a configuration issue on your end.

Actually, it was a(n) angle issue; solved it, but I noticed…when I enable shadow just for Dir light I saw the shadows, even with spot light casting off. When I took out the Spot light period, the shadows were gone. Hum…?

Now I just have to figure out why the sample file has really clean shadows. I don’t see a SHA file loaded.

Update--------
Spot lights give cleaner ground shadows.

Wish I could turn off self object shadow casting. In other words, an object that cast shadow to the environment, but not onto itself.

I actually did this by disabling the shader for one object, but doing so disables everything…like materials and so on.

Actually, I’m going to use another technique that does not involve shaders or Panda’s poor real-time light, and still get similar results for the environment. I’ll just use a “tweeked” spot shadow for the Characters and that should do. My artistic ability will do the rest.

My character right now is looking like the super hero Elecktra, mixed with Rayne from “Blood Rayne” (and realistic) She just came out cool like that. 8) Not my best work, but you can’t tell. :wink: