Sign in to follow this  

Bendable Objects

This topic is 2949 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

I am looking into a possible feature that a client wants on our application, and the concept revolves around a "spore" like area where rectangles are swimming around the screen by themselves. So the rectangles bend around as they turn directions, almost like they have a spine. Ive got XNA available to me, and am familiar with 3D concepts, having done some 3d work before. But what exactly makes up this type of effect? Do you just apply normal 3d transformations to a mesh to "bend it", I have to make sure that it behaves like a little worm/fish thing. Any thoughts/articles are welcome! Thanks Mark

Share this post


Link to post
Share on other sites
Hi,

Would it work to just have an animated mesh with the bending already calculated and then run the animation at different rotations when it needs to turn?

Share this post


Link to post
Share on other sites
Honestly, im not sure, I guess so, it would need to be tried and tested to really see if that implementation works.

Do you have any ideas?

Share this post


Link to post
Share on other sites
Start with something simple. Take a cyclinder and bend it over 5 seconds in a 3d program. Save it to .x format then load and run it with an animation controller. Play around with it until you thinks it's right, or not.

Share this post


Link to post
Share on other sites
You could use a simple bone system. The idea of a bone system is that vertices are affected by more than one transformation matrix. Each vertex has weights which define how much they are affected by each matrix. It's then multiplied by each matrix and the result is multiplied by the weights. The sum of that is the transformation of that vertex. You can google for more info.

In the case of rectangles, first make sure that they have enough vertices (are a detailed enough grid, and not just two triangles). You can use two-triangle rectangles for all the rectangles which aren't bending at the particular moment.

You have two transformation matrices, which are the directions before and after the rectangle rotates.

Now you have to apply them to the vertices, which is where it gets hazy, because I haven't tried this. Assuming that your triangles have vertex coords in the range 0 to 1, I think you'd be able to use them for weights. However, if the direction of the crease is arbitrary, you won't be able to use them directly, and will have to do some combination of them which depends on the rectange's rotation. That'd require some trial and error, but I think it can be done.

Share this post


Link to post
Share on other sites

This topic is 2949 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this