• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 225 226 227 228 229 ... 368 Next »

Cache looped animations
View New Posts | View Today's Posts

Pages (2): « Previous 1 2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Cache looped animations
08-14-2011, 02:16 AM
#11
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
Would it be possible to mod a game so that the engine does not recalculate the animation? Not saying it's a good idea, just wondering.
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
Reply
08-14-2011, 02:25 AM (This post was last modified: 08-14-2011, 02:28 AM by cfehunter.)
#12
cfehunter Offline
Junior Member
**
Posts: 11
Threads: 0
Joined: Dec 2010
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.
CPU: AMD Phenom II 960 x4 3.4GHz
RAM: Corsair 1333MHz DDR3 x 4GB
GPU: ASUS Radeon 5870 1GB
OS: Windows 7 x64 Premium
Find
Reply
08-14-2011, 02:38 AM
#13
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
OK, I change my question. Could you write a game that could cache looped animation of moving objects?
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
Reply
08-14-2011, 03:00 AM (This post was last modified: 08-14-2011, 03:11 AM by cfehunter.)
#14
cfehunter Offline
Junior Member
**
Posts: 11
Threads: 0
Joined: Dec 2010
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.
CPU: AMD Phenom II 960 x4 3.4GHz
RAM: Corsair 1333MHz DDR3 x 4GB
GPU: ASUS Radeon 5870 1GB
OS: Windows 7 x64 Premium
Find
Reply
08-14-2011, 04:26 AM
#15
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
OK. Not practical but possible. In addition, I understood most of that post.
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
Reply
08-14-2011, 08:33 AM
#16
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
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.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
08-14-2011, 10:15 AM
#17
Runo Offline
Greeny
*******
Posts: 1,194
Threads: 43
Joined: Mar 2009
Quote:Never ever say that! Dumbed down posts are the biggest problem on these forums. Nobody wants to learn/teach.
True....
OS: Windows 10 Pro 64bit Creators Update
CPU: AMD Phenom II X4 960 @ 3.6 GHz
Graphics Card: Nvidia GeForce GTX 960 2GB GDDR5
Motherboard: Gigabyte GA-870A-USB3 AM3+ Revision
RAM: HyperX 8GB Dual Channel @ 1600Mhz
Find
Reply
« Next Oldest | Next Newest »
Pages (2): « Previous 1 2


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread:



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode