addTestSceneNode

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post 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
under construction
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The first cube is in front of the light, so you see the unlit backside.
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post 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:
under construction
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post 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);
under construction
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post 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
under construction
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply