Building a Dome - MakeCubeMap Problem

Hello everyone,

I am trying to build a “dome” that has a texture projected on its wall so that the person in the inside of the dome thinks he is in a real 3D world. In truth, though, the texture of the wall just looks like the projection of the outer world onto the point in the middle of the dome.

I already figured out how to do this with a static environment, simply by using:

self.saveCubeMap('cube_#.jpg', size = 128)   
tex = self.loader.loadCubeMap('cube_#.jpg')        
dome.setTexGen(TextureStage.getDefault(), TexGenAttrib.MWorldPosition)
dome.setTexture(tex)

This generates exactly what I want:

But now it is necessary for my later application for the environment to move. Now I am moving the panda in this example. To do this I do a static cube map:

rig = NodePath('rig')   
rig.setPos(0,0,0)
rig.reparentTo(self.render)
buffer = self.win.makeCubeMap('cube', 128, rig)
dome.setTexGen(TextureStage.getDefault(), TexGenAttrib.MWorldPosition)
dome.setTexture(buffer.getTexture())

This works in principle as well and the panda projection on the wall is moving nicely. But the problem is that now the projection texture on the dome lacks for example the bamboo or other details in the environment.


So somehow “makeCubeMap” is not doing the same as “saveCubeMap”, but I really don’t know how to fix this, and this is important for later.

I tried many, many different things today. Including projective textures, introducing other cameras, trying to adapt the code from “saveCubeMap.py” and so forth…but nothing worked, or it justed works for static environment. I have no clue what to try more.

Especially I don’t understand why everythnig works well if I take the “MWorldCubeMap” or “MWorlNormal” options. There are all details, nicely and fast. But these options are good for simulating reflections like on a mirror. I just want the pure projection of the environment on the surface of my dome.

I am quite new to panda3D, so please someone who can help me with this??