Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Pras_Srini

Object DEFORMATION and Bezier Patches

This topic is 6040 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 there!!!! I am trying to develop some simple deformable objects for use in a school project. My objective is to create a cylinder and a sphere that deform when a message is sent to them. I looked around for any pre-existing code, but I turned up with nothing. So i decided to code my own cylinder and sphere, but looks like i got more than i bargained for!!! For starters, i am using two Bezier patches to be able to represent the cylinder. These are bi-cubic patches, so 16 control points on each patch. I was able to generate a perfect cylinder after tedious computations for the control points and render it in an OpenGL environment. But that was like the easier part!!! I thought that i could easily perform the required deformation by changing the required control points. Well, yes that works. But the problem is how to identify the necessary control points, and more importantly, how to change the original control points to make the required deformation! Furthermore, since the cylinder is coded using two of these confounded Bezier patches (each patch represents a half cylinder, like half of the letter "O") which are then stiched together , if there is some deformation along the seams of cylinder, then both the patches need to be modified! Also, does anybody know how to create a sphere with Bezier patches? I read somewhere that 8 patches are required! If that is correct then it would seem very hard to put together a deformable sphere! If anybody has worked on something similar or if anybody can offer me any help, please do help me!

Share this post


Link to post
Share on other sites
Advertisement
Well, first of all, you can neither create a cylinder nor a sphere with bezier patches. You might be able to create something that comes close to a cylinder or sphere, but no more. To create correct results, you´d need for example NURBS...
When speaking about 8 patches, you for sure mean the following article:
http://www.gamedev.net/reference/articles/article407.asp
This way it is quite simple, but note that Ostby deforms the bezier patch to a triangle, as he places the top four control points to either of the poles. This is probably not what you want. I haven´t seen how good this approximates, but I suppose it is a rather bad approximation, and makes your deformation algorithm even more complicated. There are probably better ways to approximate a sphere, but they will turn out to be very difficult...
As our CAGD prof. always sais: "Never use polynomial splines, and especially never Bernstein(=Bezier)."

Share this post


Link to post
Share on other sites
Well i suppose NURBS might work better with the sphere, but i am very sure that two Bezier patches can sufficiently form a fairly accurate right circular cylinder... anyways, i have written the code for that and it "looks" cylindrical enough...

I am attempting deformation as some sort of a general aid to the user of a haptic system that i am designing... something like virtual reality... the user plays with a robotic unit that models a glove... so he/she can sense virtual objects.

Thanks for the link though. Ummm, actually a prof. I had consulted did mention that i might create a sphere by patching together 8 Bezier surfaces... am still looking into the control points.

Thanks anyways.

Anybody ever come across any deformable object library or something of the sort?

Edited by - Pras_Srini on February 4, 2002 8:22:33 AM

Share this post


Link to post
Share on other sites

  • 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!