DapperDave

Hello. I am considering the feasibility of using Esoteric Software's Spine and wanted to get some feedback from experienced users regarding what I am thinking about.

So I am developing a game using XNA that is in 3D. However, it does not use any 3D models. Instead I am drawing things like characters to flat plane objects I call Quads. The Quads just use device.DrawUserIndexedPrimitives<VertexPositionColorTexture> to draw textures onto flat planes in a 3D space. Here is a screenshot with some strange temporary art. You should be able to see how they are 2D objects in a 3D space in the attached image. These 2D Quads will rotate with the camera, like a billboarding effect I think. I hope that makes sense.

So since I'm working with 2D characters, I am considering using Spine to animate them. I have the default XNA spine project working. But I haven't tried to integrate it into my existing code.

My question is, do you think such a thing is possible? Actually, that's not a good question. I'm sure it's possible. I should ask, do you think this is easily done? Do you have any inkling as to how it might be done? From my 15 minutes of looking at Spine it looks like the drawing is done in the SkeletonRenderer class, so if I can draw this to my Quads somehow then it will work.

Also, just general feedback on what I'm aiming for. Does this sound like a bad idea? Will Spine animations in a 3D environment look bad? Is there something I should consider? Should I give up entirely? Looking forward to your comments as I further ponder this.
You do not have the required permissions to view the files attached to this post.
DapperDave
  • Posts: 40

Harald

DapperDave wrote:Instead I am drawing things like characters to flat plane objects I call Quads.
You are quite lucky with the wording, others use this terminology as well ;).
DapperDave wrote:From my 15 minutes of looking at Spine it looks like the drawing is done in the SkeletonRenderer class, so if I can draw this to my Quads somehow then it will work.
The Spine runtimes generate triangle meshes for rendering, like normal 3D objects, it does not render a single image. It is not a good idea to render a triangle mesh to a quad (which would require use of a render texture) just to draw the quad to the scene then. Instead you should just setup the World transformation matrix of the SkeletonRenderer object accordingly so that it rotates and translates it as it would rotate the quad. Perhaps you already have a transformation matrix setup at your quad, which you can just assign at the SkeletonRenderer.

Just search the forum for XNA postings, you should find multiple postings dealing with matrix setup like this one:
[XNA] Help billboard example
User avatar
Harald

Harri
  • Posts: 3995

DapperDave

(Currently trying to work this out)
DapperDave
  • Posts: 40

eprime

@DapperDave can I give you a suggestion? migrate the project from xna to fna :)
-
Cristian Zerbinati - Eprime
User avatar
eprime
  • Posts: 104


Return to Editor