[java] clipping

Started by
4 comments, last by SteveTaylor 15 years, 10 months ago
Hi, Just a question, is clipping the best animation technique (2D) ? if no, which should i use? Thank you.
Advertisement
Im not sure you can achieve animation with clipping.
Animation is just a bunch of images you cycle through...
"Clipping" means checking which parts of an object are outside a certain region of interest to avoid drawing or otherwise processing them.
For example, sprites are clipped against screen borders and 3D graphics are usually clipped against the "view frustum" that contains the visible portion of the scene.

So clipping is something that is done, or that takes place automatically, for any kind of animation; what do you mean by "animation technique"? What sort of animations you want to make?

Omae Wa Mou Shindeiru

I've never heard of it. They probably mean some kind of tileset in which you clip another frame every time or something like that. I would just use an array!
You could use an array of images and loop through it. For smooth animations you should blend between two frames, i.e. frameX * (1 - i) + frameY * i, i being the blending fator (think of it as the "distance" of the current animation frame to the next keyframe (the image) ).

Or, if you use a 3D API like OpenGL or D3D (yes, the can be and are used for 2D [smile]) you could store all frames in a single texture and loop through them shifting texture coordinates either manually or with a texture matrix.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
Use classes. I heard they're good for animation.

This topic is closed to new replies.

Advertisement