08-14-2011, 02:16 AM
Pages: 1 2
08-14-2011, 02:25 AM
Not without completely breaking the scenegraph (it's a tree structure that's used to describe the scene/world), and that's for a native game.
For dolphin it's even closer to impossible.
There are some engines with scenegraphs that do cache animations for objects that don't move in the world, but if the game already does it then there's no point in doing it again.
Infact the merits of doing it are really debateable, with CPU's being what they are these days and the games industry creeping ever closer to the 3GB memory limit of 32-bit operating systems, I would never implement it myself.
For dolphin it's even closer to impossible.
There are some engines with scenegraphs that do cache animations for objects that don't move in the world, but if the game already does it then there's no point in doing it again.
Infact the merits of doing it are really debateable, with CPU's being what they are these days and the games industry creeping ever closer to the 3GB memory limit of 32-bit operating systems, I would never implement it myself.
08-14-2011, 02:38 AM
OK, I change my question. Could you write a game that could cache looped animation of moving objects?
08-14-2011, 03:00 AM
Yes, you can calculate the final transformation matrices for each frame and keep them cached in a list so that the branch of the scene graph for that object doesn't have to be traversed.
This can be controlled with node states or something as simple as a boolean flag at the root of the branch.
So instead of:
VertexPosition = VertexBindPosition * ((BoneA * BoneB * BoneC * Final Offset) * Projection Matrix * View Matrix)
It would just be :
VertexPosition = VertexBindPosition * (FinalTransformationMatrix * ProjectionMatrix * ViewMatrix)
This is possibly viable for objects that get repeated alot in the scene (grass and such) maybie, with a little tweaking to account for per-unit offsets, for an RTS where unit animations are synced (the older Total Wars had an option for this) but I would never use it in a modern game engine.
There are far better techniques available for speeding up animation calculations, besides which if you can get matrix calculations onto the GPU they're not even worth thinking about in terms of performance cost.
This can be controlled with node states or something as simple as a boolean flag at the root of the branch.
So instead of:
VertexPosition = VertexBindPosition * ((BoneA * BoneB * BoneC * Final Offset) * Projection Matrix * View Matrix)
It would just be :
VertexPosition = VertexBindPosition * (FinalTransformationMatrix * ProjectionMatrix * ViewMatrix)
This is possibly viable for objects that get repeated alot in the scene (grass and such) maybie, with a little tweaking to account for per-unit offsets, for an RTS where unit animations are synced (the older Total Wars had an option for this) but I would never use it in a modern game engine.
There are far better techniques available for speeding up animation calculations, besides which if you can get matrix calculations onto the GPU they're not even worth thinking about in terms of performance cost.
08-14-2011, 04:26 AM
OK. Not practical but possible. In addition, I understood most of that post.
08-14-2011, 08:33 AM
Quote:Sorry too much mathematical/gamedev jargon I guess?
Never ever say that! Dumbed down posts are the biggest problem on these forums. Nobody wants to learn/teach.
Quote:Yes, you can calculate the final transformation matrices for each frame and keep them cached in a list so that the branch of the scene graph for that object doesn't have to be traversed.
This can be controlled with node states or something as simple as a boolean flag at the root of the branch.
So instead of:
VertexPosition = VertexBindPosition * ((BoneA * BoneB * BoneC * Final Offset) * Projection Matrix * View Matrix)
It would just be :
VertexPosition = VertexBindPosition * (FinalTransformationMatrix * ProjectionMatrix * ViewMatrix)
This is possibly viable for objects that get repeated alot in the scene (grass and such) maybie, with a little tweaking to account for per-unit offsets, for an RTS where unit animations are synced (the older Total Wars had an option for this) but I would never use it in a modern game engine.
There are far better techniques available for speeding up animation calculations, besides which if you can get matrix calculations onto the GPU they're not even worth thinking about in terms of performance cost.
Aaahhhhh. Sweet sweet information, how I missed thee.
08-14-2011, 10:15 AM
Quote:Never ever say that! Dumbed down posts are the biggest problem on these forums. Nobody wants to learn/teach.True....
Pages: 1 2