Animation

Everything about development and the OpenMW source code.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

Got some basic text indices working with my latest commit. Tested WalkForward and SneakRight. Will work on this more later.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

That looks better. No more crash and only one warning left (repeated a dozen times though). I noticed that the collision shapes for NPCs are now in the right position along the horizontal plane, but way too low.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

I think that gus made the actor physics for the old scenenode npcs. If I switch to object physics it should work better.

I just made a commit, text indices should be easier to use and text file output looks better.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

From your latest commit:

apps/openmw/mwrender/animation.hpp:

Code: Select all

using namespace boost::algorithm;
No "using namespace" in headers please (ideally no "using namespace" at all). We have a section about that in the "Developer Reference" part of the wiki.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

Ok, removed it. Also changed physics to object, tell me if you think we should use this or actor physics.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

No way! The collision mesh looks totally wrong now. Also I presume we would get a performance hit.

And would you please fix up the initialiser list order in line 121 of ogre_nif_loader.hpp? I am drowning in warning messages here.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

What order should they go in? Alphabetical?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

No. The order of initialising the members of an initialiser list is determined by the order of declaration, not by the order they are listed. Example:

Code: Select all

class x
{
    int a;
    int b;

    public:

        x() : b (1), a (1) {}
};

Here a(1) is executed before b (1). No problem in this case, but sometimes (for non-primitive types) a will depend on b being initialised first and in this case the above construct would give surprising results. Therefore most better compiler produce warnings at higher warning levels.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Animation

Post by Zini »

From your other post I gather that we are in the wrapping up stage. So let's go over a the checklist:

1. Running the more complex animation groups works now? This is not a requirement for 0.12.0. I would just like to know, if I need to add an additional issue for it for a later version.

2. Has the collision shape position problem been addressed by now?

3. The animation code is a bit too spammy (writing too much stuff to cout). I think it should be completely silent.

4. I got a lot of additional .txt files in my execution directory. I assume they are from the animation code. Is it still doing that?

If these four points (and the warnings) are addressed, I will close the animation related tasks, add some new tasks for later (hardware skinning and such) and merge your branch into master.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Animation

Post by jhooks1 »

Zini wrote:From your other post I gather that we are in the wrapping up stage. So let's go over a the checklist:

1. Running the more complex animation groups works now? This is not a requirement for 0.12.0. I would just like to know, if I need to add an additional issue for it for a later version.

2. Has the collision shape position problem been addressed by now?

3. The animation code is a bit too spammy (writing too much stuff to cout). I think it should be completely silent.

4. I got a lot of additional .txt files in my execution directory. I assume they are from the animation code. Is it still doing that?

If these four points (and the warnings) are addressed, I will close the animation related tasks, add some new tasks for later (hardware skinning and such) and merge your branch into master.
1) No, they don't play at all when I try them in Morrowind, I think they must depend on variables somewhere. For now only the basic groupNames work (stop, start, loop stop, loop start) and all works too.

2) I switched it back to actor physics, I really don't know enough about openmw physics to improve it at the moment. At some point we are going to need very advanced physics for actors, including actors colliding with the ground and other objects.

3) All that is being written out now is play animation, when you play an animation. Do you want this removed? Also I think, but am not sure, that "changing to interior" was added by me, if so I should get rid of that.

4) Handled with the commit I just made. By default they are not outputted anymore, use --anim-verbose to output them.


I got an idea today on how to improve performance of handleShapes(), going to try it soon, hope it works.

EDIT: Committed a fix for a crash on ancestor ghosts
Post Reply