PDA

View Full Version : How to open and straighten a curve?


wannabeArtist
07-24-2009, 11:48 AM
Hello,

I don't know much about using curves, so this might be a really silly question :)

Anyhow, how would I go about taking a circle and transforming that into a straight line, so that the line would have exactly the same length as the circle's the circumference?

I know this is easy mathematically (2*pi*r), but if I want to work on existing geometry (tire in this case) it gets a bit tricky, since I don't know the exact radius of the piece.

I can make a circle and even open it using the open/close curve, but that's pretty much how far I got with this so far :)

Thanks!

ThE_JacO
07-24-2009, 02:34 PM
The length of a high order function like a nurbs curve isn't really something easy to calculate.
The easiest way is letting XSI's API doing the work for you.
In Python:
Application.LogMessage(Application.Selection(0).ActivePrimitive.Geometry.Length)

Will give you the length of the first curve in a selection.

Lone Deranger
07-24-2009, 03:37 PM
wannabeArtist:

It would probably easier to do this in reverse. As in create a straight line spline with a sufficient amount of bezier knots and use the bend modifier with the correct offsets and bend axis to deform it into a circle.

wannabeArtist
07-24-2009, 03:58 PM
Jaco,

That works like a charm! (Well, after I noticed the extra space in the line ;) That was my first ever scripting lesson for XSI, thanks a lot :)

Lone Deranger,

Thanks to you too, that will come in handy after I've done tweaking the details on the tire.

My idea is to make a row of polygons exactly as long (and wide) as the circumference of the current (car) tire and then take that to ZBrush, put on detailed geometry for a normal map and export that back. Since the polygon strip will be the correct length, I should be able bend it to a circle again, matching the tire size nicely :)

Perhaps not the easiest way to do this, but I'm kind of obsessed to try to do the detail work in Zbrush :)

Lone Deranger
07-24-2009, 06:05 PM
Why not just model a good base mesh for the tire. Make sure the quads of the mesh are nice and square, give it some good UV's. Take the mesh into ZBrush and use it's Radial Symmetry features in conjunction with a good tile-able alpha of the tire's treads.

Actually, you don't even need ZBrush for this. I've done tires in the past where I painted the displacement maps in PhotoShop. It's easy to get good looking results real fast this way.

Don't make it any harder than it needs to be. :)

wannabeArtist
07-24-2009, 06:33 PM
Thanks,

I will explore what you just told :)

The thing is, I'm kind of new to textures, UVs etc. I know the basics, but not much else and what comes to ZBrush, I'm a complete beginner - very eager to learn that, though :)

I got the idea to use it for this project, after I saw a great tutorial about making custom alphas here (http://www.youtube.com/watch_popup?v=usaGRlqZfy4). That looked so cool, I though it would be nice to apply a same sort of technique on the tires and learn a little ZBrush on the way.

But you're right, no point in making this too difficult. I just found a great reference image and I probably just paint the map using that.

CGTalk Moderation
07-24-2009, 06:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.