Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAPHICS: Initial work on animation #11

Closed
wants to merge 14 commits into from
Closed

Conversation

jbowtie
Copy link
Contributor

@jbowtie jbowtie commented Apr 11, 2012

The core infrastructure for animations is now in place. While there is additional work to be done, now is a good time for some code review and refactoring.

Currently only position and orientation are animated. If you want to see the rough cut, look at the hook horror and umber hulk in the NWN Prologue as these models run through their default animations (default animations are not being correctly inherited from supermodels yet, which affects most models).

There's also an initial model cache implementation. This is currently only used for supermodels but reins in most of the memory overhead associated with them.

@jbowtie
Copy link
Contributor Author

jbowtie commented Apr 11, 2012

All models now run the idle animation (pause1 or cpause1 in most cases). In a few cases this is highlighting issues with missing danglymeshes and skin nodes; also looks like dwarves/gnomes have issues (probably missing a scaling factor somewhere).

@DrMcCoy
Copy link
Member

DrMcCoy commented Apr 12, 2012

Nice work. That the animations are jumpy is because some kind of interpolation between the key frames is missing, I guess?

Some minor quibbles:

  • In several places, you indent with 4 spaces instead of a tab
  • Like wise, in several places, you chose the wrong style for {-braces
  • I really don't like how Animation::nodeList, ::nodeMap and ::rootNodes are public
  • I'd also move the code of setLength() et al. from animation.h into animation.cpp

Would be great if you could fix those before I merge your commit

@jbowtie
Copy link
Contributor Author

jbowtie commented Apr 13, 2012

I've added some commits to address your feedback. For the record I use 'astyle -ant' to format tabs and braces; will attempt to do so on all future commits.

Yes, the jumpiness is due to interpolation not actually being implemented currently, will implement some kind of lerp next, then take a look at animation events, followed by danglymeshes and skinnodes probably.

@DrMcCoy
Copy link
Member

DrMcCoy commented Apr 21, 2012

Sorry for the late reply, have been quite busy with RL.

That the cleanup commit didn't fix everything and actually destroyed meaningful formatting I had done.
And you added some more mistakes in that last commit.

I fixed that and pushed the changeset.

Please, next time, manually check your changes for style correctness before each commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants