I was wondering how I would go about creating a mirror effect in panda.
I was looking into the ParasiteBuffer (panda3d.org/manual/epydoc/pu … class.html) but I am not sure how to use this.
Does anyone have any suggestions?
I was wondering how I would go about creating a mirror effect in panda.
I was looking into the ParasiteBuffer (panda3d.org/manual/epydoc/pu … class.html) but I am not sure how to use this.
Does anyone have any suggestions?
panda3d.etc.cmu.edu/phpbb2/viewt … highlight=
What you’re looking for is about halfway down the thread… how to render a camera buffer as a texture.
enjoy!
There are also some obscure shortcuts that Panda provides that can make this mirror trick a little easier–for instance, a Plane object provides a getReflectionMat() transform, which is exactly the transform you need to put a camera on the flip side of a mirror.
For a fully-functioning example of a mirror implemented in Panda, see direct/src/showbase/MirrorDemo.py (this file isn’t part of the Panda 1.0 distribution, but you can download it directly from the CVS repository with the above link).
David