Dynamic shadows?

I’m a Mac developer. I downloaded Hypnos’ p3dapp and the Panda3D samples to get a feel for the engine. It all looks good, but I would really, really like easy-to-use dynamic shadows.

While many of the sample programs run fine, the Tut-Shadow-Mapping sample does not run on my MacBookPro (it immediately quits). I don’t pretend to understand the code fully, but while it seems a little complicated, it’s still within reach. Does anyone know how to get that sample working on a Mac?

I have read that dynamic shadows are high on the developers’ to-do list. Is that statement still true? And does it refer to an overhauled and/or easier dynamic shadow system?

Also, it seems like the Mac is a bit of a second-class citizen for Panda3D, given that there isn’t a binary download, and the (apparent) difficulty people have had in compiling the source for OS X 10.5 – I have not yet tried it myself though. Is my impression wrong? Is the situation likely to change? Believe me, I understand how dependent open source projects are on knowledgeable people stepping forward to help, so don’t take this as criticism.

(By the way, I am currently using Ogre 3D with a homespun, half-baked Objective-C wrapper around the parts of the C++ library I need. While parts of Ogre are complicated, dynamic shadows are dead easy. While I could stick with that system, it’s cumbersome, and I am always looking for better/easier alternatives.)

Thanks for any information.

The bad news is: dynamic shadows were my thing. However, some things have come up and it is unlikely that I will have any substantial amount of time to dedicate to Panda3D in the foreseeable future. So I think you can forget that feature unless somebody decides to take over my role.

The frustrating thing is that it would probably only take three or four days of coding to implement them. But I just don’t have any time.

It is bad… Very bad… I planned to release my little game in the next couple of months. Now, without shadows… I would also like to have them, but I know neither Cg nor C++.

Josh, are you the only one working on Panda? I thought it was a coop effort with Disney.

At Disney we are constantly doing development in Panda, but we are naturally compelled to work towards our own needs. This means we put in many of the pieces that fundamentally make things possible, but it’s up to Josh to bring it to you. The arrangement with CMU is such that they are responsible for bringing Panda to the community. This generally means doing the things that make it easier for a newcomer to achieve common tasks, such as writing a system to “turn on” dynamic shadows.

As it happens, Disney doesn’t have a particular need for a shader-based dynamic shadow system, since we are satisfied with the cheesy projected shadows we use in our Pirates of the Caribbean game–we are targeting hardware that doesn’t necessarily include high-end shader capabilities. (The code that demonstrates this simple technique can be found in direct/src/showbase/ShadowDemo.py.)

Often, Disney’s goals do overlap with those of the community–that’s a big part of how Panda got to be where it is today–but at the moment, we have our own things to work on that don’t involve completing Josh’s dynamic shadow system. That doesn’t mean I wouldn’t like to see it finished–I think it would be a great thing for Panda to have–but it’s not on my list of tasks right now.


Ahhh, I see. Thanks for the explanation.

When browsing the API Reference, I also noticed the classes ShadowCaster and ShadowPlacer. Is that what Pirates of the Caribbean uses? Are they usable or is there stuff missing?


I have had the same problem, after playing around a while i got something working, it has some errors but does work good enougth for me.

I use it on a macbook pro with a RadeonX1600. Take care when playing with shaders and collisions, i had some serious crashes (visuals completely block, have to power-off) when using both in my latest project.


Just FYI…

I installed Panda on my Mac using the instructions in this thread:
discourse.panda3d.org/viewtopic … ght=p3dapp
It involves manually copying part of Hypnos’ p3dapp to a couple of folders and adding some code to .bash_login.

I can now run the Tut-Shadow-Mapping.py sample program, whereas it wouldn’t run “inside” p3dapp. Strange.