Skeleton animated items and SceneMemoryMgrTypes

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Skeleton animated items and SceneMemoryMgrTypes

Post by TaaTT4 »

Probably a noob question (shame on me :roll:), but I'd like to be sure. Is it better to create skeleton animated items as SCENE_DYNAMIC objects, right? And what if the animation isn't enabled?

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1280
Contact:

Re: Skeleton animated items and SceneMemoryMgrTypes

Post by dark_sylinc »

SceneMemoryMgrTypes affects the following:
  • Derived SceneNode transforms. i.e. if you change position/rotation/scale of the SceneNode, and how it affects its children. A static node that was changed without informing Ogre means visually it won't make any impact (and may cause minor glitches if getPosition() is used because it gets out of sync with _getDerivedPosition()
  • AABB calculations. AABB needs to be moved, rotated and scaled. This directly affects frustum culling. If the AABB is not up to date, Ogre thinks the object is somewhere else while doing frustum culling
And that's it.
IIRC because Skeletons in Ogre 2.1 are not affecting the AABBs (a regression from 1.x; if the object moves too far off from the bounding box, visually it will be outside the aabb entirely), skeletons can be of SCENE_STATIC.
At least how it works now.

So yes, you can have playing animated skeletons in SCENE_STATIC.
Post Reply