Page 2 of 2

Posted: Sat Aug 12, 2006 6:27 pm
by hybrid
Billboards or particles (which are roughly the same). This reduces the amount of vertices transferred to the card and rendered. You have a lack o depth there, though. But unless you have those objects very large and near you want see any difference. Making meshes draw as billboards at some distance is a common LOD technique.
Otherwise just draw it and hope your FPS don't drop too far.

Posted: Mon Aug 14, 2006 11:37 am
by magisterrivus
Hi there.

I couldn't resist, and tried again to find out what's wrong :wink:

This time i added some TextSceneNodes to the cubes displaying there IDs. The first thing thats really strange is, the first Cube isn't textured at all. Just black, and the second problem i encountered is that the whole Scene is somehow darkened. I somewhere read about that on the forum, but did't found it.

So, my next question....Why is my first cube not textured, and why is the image so dark?

I made a screenshot of it:

http://img225.imageshack.us/my.php?imag ... 953se3.jpg

Posted: Mon Aug 14, 2006 12:00 pm
by hybrid
The first cube is in front of the light, so you see the unlit backside.

Posted: Mon Aug 14, 2006 12:07 pm
by magisterrivus
Erm *hust*,

that's embarrassing :oops: . You're right.
Then there's only the 'darkening of the scene'-problem.

Btw, thx hybrid for all your answers :wink:

Posted: Mon Aug 14, 2006 1:15 pm
by magisterrivus
I guess i know where the problem is. When creating a second animator, and add it to one Scenenode like this

Code: Select all

sceneMgr->getSceneNodeFromId(2)->addAnimator(animator2);
then the first Cube is rotating (animator1) and the second one (animator2).
Could it be that an animator can only be attached to one Node at a time and not to multiple?

Because this code is only animating the first Cube, not the second

Code: Select all

sceneMgr->getSceneNodeFromId(1)->addAnimator(animator2);
sceneMgr->getSceneNodeFromId(2)->addAnimator(animator2);

Posted: Mon Aug 14, 2006 1:56 pm
by hybrid
I thought so when I first read your initial post, but the animators usually are just called by the nodes to update the scene node's internal state. So you should be able to use animators for many nodes. Maybe this one's a different one, so maybe try another animator type first.

Posted: Mon Aug 14, 2006 2:14 pm
by magisterrivus
Hi hybrid,

the RotationAnimator really seems to act different from eg. FlyCircleAnimator, because i just created a FlyCircleAnimator, and all Cubes are flying in circles :).


Cool, so many days trying to solve the problem, and now this :shock: .
OK, it's like that, and i have to accept it. I'll take a look at the sourcecode for this one to find out why it is like it is.

Again thanks for your answers. CU

Posted: Mon Aug 14, 2006 2:48 pm
by hybrid
Yes, indeed. The animateNode function is non-const so it may change the internal state of the animator. In this case it's changing the start time to add only the fraction of the rotation necessary since the last invocation. Thus the second node gets the updated time, which is equal to invocation time, thus rotation becomes 0.