Jump to content
  • Advertisement
Sign in to follow this  
detryo

[java] clipping

This topic is 3689 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Just a question, is clipping the best animation technique (2D) ? if no, which should i use? Thank you.

Share this post


Link to post
Share on other sites
Advertisement
"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?

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!