Jump to content
  • Advertisement
Sign in to follow this  
ashwathh

Object Deform.

This topic is 3269 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 All, I am displaying a hollow cylinder on the screen after reading the .X file(DirectX file).Now as i drag the x-axis ,the straight cylinder should deform.What should be my approach please tell me.It would be greate if u could share some similar examples. Thanking you in Advance, Ash.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

first part of the problem: You want to move individual vertices of the cylinder.
Solution: Write a vertex shader. Next, you can move some vertices based upon
a) the initial positions of themor
b) some arbitrary value passed with the vertex format (that means: for each vertex)
c) some arbitary value passed as a global shader parameter (that means: the same value for all vertices you render)
d) a combination of above.

Second part of the problem: How do you move the vertices so that it looks realistic?
Again, there are several possibilities. In the most simple case, just take any formula which looks right.
Or you do a realistic simulation of the deformation. Look up "soft body physics" if you're interested in that.

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!