Environment Mapping

I tried the base.saveSphereMap() and base.win.makeCubeMap() functions. But both seem to crash teribly (running under windows XP). I dont get any error msgs, only the windows send error log dialog. Any idea of whats going on?

heres my code for reference:

from pandac.PandaModules import *
from direct.directbase import DirectStart
from direct.gui.DirectGui import *

def MakeReflectionMap():
    scene = loader.loadModel('bvw-f2004--streetscene/street-scene.egg')
    base.saveSphereMap('streetscene_env.jpg', 0,None, None, 256, BitMask32.allOn(),10)

r = MakeReflectionMap()

Can you save screenshots normally via base.screenshot()? There might be a bigger problem going on here. What kind of graphics card do you have, and do you have the most current driver?

Are you running in OpenGL or DirectX? Try running in the other mode.


Screenshots are no problem (base.screenshort()). I just updated my driver for good practice, no luck. I’m using a radeon 9700, 128 mb.

Neither DirectX or OpenGL work. It all gives me the same crash. Perhaps I can trace the error if I compile from source in debug mode, if usefull, I’ll try that when I get home.

Hmm, I just got an invalid GL operation attempting it. Looks like this might have gotten broken in the codebase recently. Are you using the latest CVS version? Try using the official Panda3D 1.1.0, and let me know if it works in that version.


I’m already using the 1.1.0 binary release. CVS version are usually bound to be unstable…

For the record, the cvs version tends to be more stable than you might think. David set up an automatic build process that checks out panda, compiles it, mails out the error messages, and repeats. If there’s a compile-time-bug in CVS, we all get spammed. So these things get fixed pretty fast.

Ouch, so spam CAN be usefull… :laughing:

Sounds like a good system, but I’m not so afraid of compilation errors. More worried about the usual little slips like a double free, memory leaks or any other slips which wouldnt show up during compilation.

Which reminds me… I dont supose there are VC project files for panda?

Sorry, no VC projects for Panda. A VC project would be strictly one-platform, but we need Panda’s build system to be multiplatform.

I did find a minor error in the code and fixed it, but I’m not sure if this error is what was troubling you. Is it easy for you to get the latest and build from source? If it is, would you mind trying it again, with the latest CVS version? Thanks!


Sure thing, glad you found something :slight_smile:

Compiling takes a while on my system, hope I can asnwser you tomorrow.

Allright, took a bit, but the new CVS version did the trick!

Thanks alot drwr :slight_smile: