Animation

Everything about development and the OpenMW source code.
K1ll
Posts: 184
Joined: 06 Aug 2011, 21:54

Re: Animation

Post by K1ll »

jhooks1 wrote:
K1ll wrote:
Zini wrote: With lag you mean a longer cell load? That is possible. We skipped some possible optimisations during the refactoring. I haven't noticed any difference though. There was always a small delay on cell load. Would be interesting to have someone with a slower box to compare the performance pre- and post-refactoring.
My old laptop probably is the slowest box here. I'll do the comparison this weekend.
Did you ever do a comparison?

Committed more stuff.
Yes and it's quite interesting.

I couldn't really notice any difference in cell loading, but I've got more fps with the new renderer in small interior cells while only half the fps in exterior cells compared to the master branch.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

I couldn't really notice any difference in cell loading
That is the part I was somewhat worried about. Good. Seems we can avoid going into another optimising session.
but I've got more fps with the new renderer in small interior cells
That is the expected behaviour. The old code did not do any batching in interiors.
while only half the fps in exterior cells compared to the master branch.
That on the other hand is really strange and somewhat worrying.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

Committed code with npc bounded parts (arms, forearms, legs, head, neck, ankles, wrist...). Now I need to get the free parts added.

Also we still need a startup command to enable/disable outputting text index files.

EDIT: Will move proper code to NPCAnimation
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

Also we still need a startup command to enable/disable outputting text index files.
Not sure if I understand you here.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

The nif loader now outputs text files with time indices for models that contain animation
excerpt from Ancestor Ghost:

Time: 23|Attack1: Start
Time: 23.4667|SoundGen: Roar
Time: 23.7333|Attack1: Hit



I mentioned it previously in this topic, I even posted the full output from base_anim

Maybe it should be disabled by default and we can have a command switch to enable it?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

We don't need this output for anything, once the development of the animation system is finished, right? So you could just keep it for now and remove it, when you are done. As I wrote before I am reluctant to introduce new script instructions prior to 1.0, because that might cause incompatibilities with the script system (albeit the chance for complications is pretty low).
The other option would be to add a new command line switch (--anim-verbose, set to false by default).
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

Zini wrote: The other option would be to add a new command line switch (--anim-verbose, set to false by default).
Thats what I meant
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

Okay then. The procedure for adding new command line switches is easy:

1. Add a new switch in main.cpp (there are plenty of examples for boolean switches)
2. Read out the state of the switch (also in main.cpp) and pass the result to the Engine (engine.hpp/engine.cpp).
3. In Engine do whatever you need to do with the flag so it reaches its destination.

Note that you should not have any low level system query Engine for the flag. Ideally only main.cpp should include engine.hpp (which is currently not enforced unfortunately).
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

Filled out NpcAnimation and CreatureAnimation with my latest commit, moved rendering code to their constructors.

Also still no physics for npcs and creatures because of the bug previously mentioned when changing cells (not sure how to fix this yet).

EDIT: Should I make a map of <MWWorld::Ptr, Animation>, that way when you do deleteObject you could delete the associated MWRender::Animation?
When we do removeCell() should it clear the data structure containing all the MWRender::Animation objects?

EDIT2: Made another commit
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

Also still no physics for npcs and creatures because of the bug previously mentioned when changing cells (not sure how to fix this yet).
Me neither. And I don't have the time to look into it right now. Maybe next year ;)
Should I make a map of <MWWorld::Ptr, Animation>, that way when you do deleteObject you could delete the associated MWRender::Animation?
Well you need some kind of container in Actors. A map is fine. I would consider using std::map<MWWorld::Ptr, Animation *> instead though. The above wouldn't have worked anyway because of slicing and using a pointer also allows you to move an Animation to a different Ptr without copying it.
When we do removeCell() should it clear the data structure containing all the MWRender::Animation objects?
All the animation objects in that cell, obviously.
Post Reply