Pages

Thursday, July 25, 2019

Project Evaluation

My project goal was to produce a procedural walk for a biped model, using inverse kinematics to maintain natural human motion.
While I did not effectively complete this milestone, I believe my development progress demonstrates that I have acquired an understanding of the necessary functionality in order to meet my goal.
Having completed multiple IK implementations, step trajectories and logic systems to enact locomotion logic I am impressed with the amount I have learnt through research and prototyping into an area I was previously unfamiliar with and consider the project a success.



What went well 

My development milestones were well planned. I think the best decision made during the early stages of development was to begin with an analytical IK solution in 2D. This allowed me to tackle prominent pitfalls of IK algorithms, and understand them, before progressing to a more complex solution in 3D. If this had not been done I am certain I would have been overwhelmed by starting with implementing a CCD solution.

I conducted a large amount of well-documented research into every element required by the project, which has left me with a far greater understanding of the IK problem than simply working towards my milestones.

I was able to adapt to the changing needs of my development schedule – reforming and prioritising my milestone tasks as required by development.


What went badly 

Regrettably I was not able to meet my milestones towards the end of the project. Despite dedicating a significant amount of the projects development time to researching the issue, my failure to correctly implement CCD angular constraints severely limited the functionality of other behaviour systems that were scheduled to be introduced following the inclusion of constrained CCD.

It is possible that if I had conceded I was not able to complete the constraint task earlier, I would have been able to use the extra time to create alterative logic systems to still give the desired behaviour, but at the time it was more appropriate to pursue the milestone plan.

With the perspective I have now, it is also possible that I spent too much time investigating and implementing trajectory curves when ultimately only one could be used in the project. While I am certain investigating both was completely beneficial to the project, that time could have been put towards solving more significant issues that would arise later in development.

While I did have a general understanding of the functionality required before officially beginning the project, I did find that I was often adding functionality, or entirely new milestones that I was not aware of. This in turn meant that the systems I was creating were often based on previously added scripts, which at the time of writing were not designed with this is mind. This lack of encapsulation spiralled as the project advanced, which ultimately had an impact on developing some functionality – especially with regard to the 3D procedural locomotion behaviours.
Many of the behaviours I had written in 2D with the expectation they would function in 3D immediately had to be re-written to accommodate the changed logic of other systems.

Unfortunately even with efforts to mitigate the impact, circumstances outside of university meant my project schedule was sporadic, with gaps in development sometimes being a matter of weeks. I know this did have an impact on my availability to seek assistance from tutors and work towards understanding and project complications without disruption.
However, while this may have caused a longer amount development time being spent on researching and implementing the functionality, I am confident my understanding of the topic was not affected.

My initial research has made it appear that IK resources were fairly common – though as I encountered specific problems I soon realised that there was very little relevant reference material available. This made overcoming the projects obstacles extremely difficult and greatly extended the amount of time needed to seek out viable research sources.

While from the start I did thoroughly research, before approaching some of the problems I had underestimated their difficulty/dependency on other functionality being implemented to work.
This was all necessary anyway, but finding out part-way though development meant milestones had to be reprioritised and redefined which took time away from development to amend, also meaning that I wasn’t fully prepared for the next stage of deliverables as they changed.


What would I do differently 

With the experience gained from my project, I would largely do as I did.

The exceptions to this would be to compare Bezier and Catmull-Rom curves based on thorough research – although this did end up increasing my understanding and benefiting the project, only implementing one curve functionality would have saved over a week of development time.

If I had the opportunity I would either: abandon my pursuit of constrained CCD many weeks earlier, which would add at least a month of month of development time which could be used to create alternate logic systems to avoid the need for constraints or look to implement FABRIK rather than CCD as constraining joint angles is likely more straightforward given that the problems are reduced to linear algebra.

If I was aware of all the systems the project would require at the start, I would have planned my class structure to be far less dependent on one another. Knowing everything that is required before beginning would allow me to decouple these systems and encapsulate classes, making any later changes comparatively simple.

I regret not reserving time to fully implement the 3D procedural walk (again, too much time given to joint constraints). Saving the time as discussed above would have allowed me to implement a locomotion system to effectively steer the biped through the environment.

There are also alternate methods of implementing functionality I would consider.
There is an alternate approach to CCD (first mentioned in my ‘Joint Bias and Rotation Damping’ blog – Bouckley, 2018) which uses the same principles as my CCD implementation, but instead of calculating the corrective rotation using cross and dot products, rotates joints to position the next joint at the target. While I’m not certain if this method actively avoids the generation of singularities, it should be simpler and faster to implement – though would still need to have joint constraints created just like my current implementation.

I would also be more inclined to consider other forms of procedural animation.
Such as those seen in ‘Grow Home’ or ‘Overgrowth’. Grow Home treats the hip joint as a levitating mass, which is then spring/dampened during vertical inertia with the feet simply seeking an appropriate new target based on hip velocity. Overgrowth uses a very small number of keyframe animations to blend between postures depending on user actions and game context.
While these still require procedural animation, they rely on physics systems to control the movement of the player character, with systems overlaid to give the procedural animation.
My method of having the physical and visual systems as one and the same has proven to be cumbersome and less effective at producing natural motion than it may have been to overlay the visuals.


What will I do next 

I am keen to continue the project, with the aim of including functional angular constraints which should then allow the procedural locomotion behaviour to be added relatively easily.

I am certain that if I am able to constrain the joint angles I will be able to complete my milestones and progress the project on towards my stretch goals.

It would be interesting to use a constrained CCD solution for semi-procedural animations – overriding hand made animations where appropriate to give more accurate, contextual environmental interactions. This would potentially be an ideal extension of the project as the enhanced interaction undoubtedly adds to the natural appearance of the animation.


Conclusion 

I am proud of the research and work completed.

Without having prior knowledge of the events that would unfold or project content that would need more attention I can confidently say I made the best choice in terms of allocating my development time.

I feel I have effectively met my project criteria:
  • The ability to perform academic research and document the development process with clarity
  • Successfully implement functionality as a result of conducted research
  • Mathematical understanding of systems involved