Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 29 Nov 2002
Offline Last Active Dec 15 2014 09:28 AM

Topics I've Started

How to automate testing for 3D-algorithms

04 April 2013 - 08:08 AM



to ensure that some graphic-algorithm just works even if I do some refactoring in an existing "historical grown" code base I want to do some automatic integration-tests for these ( like for instance using an animation-path ). Screen-resolution and used HW are constant. 

The approach I am currently thinking about is even straight forward:

  1. Start rendering the object to animate using the path at time 0 -> make the first screenshot
  2. At a given time during the animation -> make another screenshot
  3. At the end of the animation make the last screenshot
  4. Now do a bitmap compare between the reference pictures and the new one 
  5. Differences -> buggy algoriuthm


  • Easy to implement
  • You can validate some kind of visual representation


  • A lot of data will be generate
  • What happens when the difference is really small?
  • Animation is not checks, only some states of the animation itself.
  • You have to save the bitmaps
  • What to do with antialiasing

A different approach could be: 

  1. Start the anmation, save the transformation.
  2. Do this at a given point of time
  3. Do this at the end of the animation
  4. Look out for differences


  • Only numerical data
  • Easiy to check


  • How to deal with numerical rounding issues.
  • ...

So I am just curious: how do you deal with issues like this. Just be aware: I am not talking about pure unit-testings, I want to test the integration and the visual representation of a couple of classes and subsystems.


Thanks in advance,