Transforming Sprites in 2.5D (3D)

Hi, I’m trying to build a simple game that uses spritesheet animations rendered in 2.5D (rotation on all axis), is there an addon that can help me achieve this?


depending on what you want to achieve and how much you’re familiar with graphic programming, there are multiple ways to do it:

  • the super-easy/beginner way: you just use multiple ofImage or ofTexture, you draw them the normal way and you rotate them around using ofPushMatrix()/ofPopMatrix() + ofRotate()

  • the “normal” way: you create quads (using ofMesh/ofVboMesh), you load your spritesheet in a ofTexture, you set the correct texture coordinates for every vertex, you bind the texture an draw your quads around

  • the GPU way: if you need to draw a ton of your sprites and need to control the CPU load, you can create a point cloud where every vertex represents a sprite and create GLSL shader set (geometry + vertex + fragment) that transforms the single vertices in quads, orient them in space and finally texture them. When I use this technique, I like to fill the unused data in my point cloud mesh (i.e.: tex coords, color) with data useful for the shaders (i.e.: orientation, speed, etc…)