Hi, I have some problems here.
I’m using Panda3D v1.2.1 and I want to use the dynamic cube map by executing makeCubeMap() function.
So I executed the dynamic cube mapping example provided in the manual.
I simply use my own geometry for the scene and keep the teapot for the shiny object.
But it generated error during the cameras assertion process.
Here is the errror message:
Assertion failed: (mask & PandaNode::get_overall_bit()).is_zero() at line 112 of
c:\temp\mkpr\panda3d-1.2.1\built\include\camera.I
This message occured for all cameras, that is 6 times.
Here is my import section:
from pandac.PandaModules import *
…(changing some config vars).
import direct.directbase.DirectStart
from direct.interval.IntervalGlobal import *
from direct.gui.DirectGui import *
from direct.showbase.DirectObject import *
from math import *
import sys
Where is actually the erronous part?
Is it in the module “camera.i” or within my scene?
I may miss some modules to import.
I didn’t supply the bitmask for the cameras, so every object should be visible to the cameras.
This is my 2nd problem:
- Can we move the local pivot of a NodePath (lets name it ‘MYNODE’) ?
I used to solve this problem by attaching a new NodePath (lets name it ‘NEWNODE’) on the MYNODE’s topmost parent , so it’s located at the topmost parent’s origin. And then I move NEWNODE to the center of MYNODE by calling :
NEWNODE.setPos(MYNODE.getBounds().getCenter())
and then reparent MYNODE with respect to NEWNODE, so if I rotate NEWNODE, I get MYNODE rotated at it’s centerpoint.
It works well if I want to rotate MYNODE at it’s centerpoint, but how if I want to rotate it NOT at it’s centerpoint?
Lets say that now I want the centerpoint located at the center of MYNODE’s parent (lets name it ‘MYNODE-PARENT’, it’s not the topmost parent), and I set a simple 1 faced geometry as this node. Then I should proceed as the above solving, but now the boundingsphere is calculated for MYNODE-PARENT and its children too.
So, I call getInternalBound() to get the boundingsphere for MYNODE-PARENT only (without the chidren).
Function getInternalBound() is a property of PandaNode, so I call it this way:
NEWNODE.setPos(MYNODE-PARENT.node().getInternalBound().getCenter())
and the result was ‘isEmpty’ error, like there wasn’t any geometry on MYNODE-PARENT.
What is wrong?
The pivot point of every nodepath is kept in the nodepath, isn’t it?
How can I flush this pivot matrix to the nodepath’s translation matrix as addition and then the pivot matrix becomes zero matrix, so the pivot is located at the center and the previous pivot is considered as translation addition from the parent’s nodepath ?
This is my 3rd problem:
I tried to apply antialiasing to my scene, but I still don’t understand how I should type the antialias mode.
I read the reference about AntialiasAttrib and I found the modes are M_none, M_auto, M_point, M_line, M_polygon, etc.
When calling NodePath.setAntialias(mode,priority), the mode should appear like this :
MNone, MAuto, MPoint, MLine, MPolygon, or etc.
Is this correct ?
Please help me, thanks a lot.