Hi,
I have some animations (.X type) playing in the scene. It plays when the object is visible in front of the cam, but as soon as it moves away from the camera's visible zone, the animation stops. (I know the animation is stopped because the position X,Y,Z no longer change). But if I move the camera's position to bring the object back into the visible zone, the animation again resumes. But once the animation goes out of the visible range, it again stops. (I am using the normal camera - NOT FPS/MAYA).
How can I make the animation to play continuously, even if it is not visible in the camera range?
Thanks
Problem: Animation stops if its not visible in the camera
what animation? an animation in the actual .x file right? and what XYZ are you referring to? the node's position? that doesn't change when an animation is played... so you mean the position of a bone?
i thought that animations would be carried out regardless of the frustrum culling (would be a nice feature to allow the animation to be culled or not maybe) but maybe it depends on where the actual animation is done.. i think i read recently that the SkinnedMesh animation is actually done in the render function or something, so yeah that would stop the animation playing if it were culled... that's just a drawback of the current animation system i guess.
so i would think the only way you can keep it animating whilst off screen (is it necessary to do so? presumably it is otherwise you wouldn't ask ) is to stop it being frustrum culled so do node->setAutomaticCulling(EAC_OFF); This could give you a performance hit though as any node you prevent from being culled will be rendered every single frame so if you've got lots it could be bad.
i thought that animations would be carried out regardless of the frustrum culling (would be a nice feature to allow the animation to be culled or not maybe) but maybe it depends on where the actual animation is done.. i think i read recently that the SkinnedMesh animation is actually done in the render function or something, so yeah that would stop the animation playing if it were culled... that's just a drawback of the current animation system i guess.
so i would think the only way you can keep it animating whilst off screen (is it necessary to do so? presumably it is otherwise you wouldn't ask ) is to stop it being frustrum culled so do node->setAutomaticCulling(EAC_OFF); This could give you a performance hit though as any node you prevent from being culled will be rendered every single frame so if you've got lots it could be bad.
I met a similar problem. I set a light and a animated node in front of the camera. At first it works well, but after the animated node walks out of the viewport of the camera, the light goes off. Maybe irrlicht thinks it doesn't need a light because no one is here, so irrlicht turns off the light to save energy.