I’d like to use Xith to “draw” 2d “sprites” so that it’s HW accelerated and I can use 8bpp alpha blending, blendet zooming, rotating etc.
For example all objects (being a TransformGroup for example) contain a planar rectangle (or 2 triangles) in a Shape3D with a texture. Let’s call this sprite. The sprite’s Z value is zero (usually).
With the View’s standard projection (perspective) this works basically, but I don’t know how to set the view’s position so that the sprites’ textures aren’t being zoomed/scaled (in normal case: for effects I’d like to zoom them and/or the camera by changing their/its z position).
Is a 1:1-zoom possible somehow?
Or do I have to use View.setProjectionPolicy(View.PARALLEL_PROJECTION) ?
I tried that, like many of the Xith demos do when you hit Space, but… then I can’t change the distance of the view, neither could I change the zoom of the sprites by changing their z value. So I guess with parallel projection you can’t “zoom” by changing an object’s z value? (I’ve to admit I’ve never used parallel projection.)
Is there a beginner’s guide how to use 2d (with or without Parallel_Projection) with Xith/Java3d maybe?
Thanks!
Part b) of the question: Many textures. I intend to use many textures because most of the sprites will be animated. I load them with TextureLoader.loadTexture(…). Since textures will get obsolete after a certain time: do I have to take care of the not needed textures (so they don’t fill the 3d card’s memory) ? Or does Xith do this magicially?
Also: what is the fastest and most memory efficient method to swap textures in Xith3d (for an animated 2d sprite) ?
Thanks again for any answers/hints/tips.