PDA

View Full Version : Good tutorial on NURBs/Tessellation?


Backov
04-20-2007, 02:49 PM
I'm probably biting off way more than I can chew here, but I was trying to dynamically generate a curving half-cylinder for a track for a piece I am working on. Various issues with it have made me reconsider my path.

So, I want to generate that tube with NURBs or what have you and then tessellate it instead - anyone got a good reference/tutorial for that? Either paper or web will be fine.

zoombapup
04-21-2007, 03:11 AM
Personally, I'd steer clear of nurbs for doing this.

What you want, is to simply move some points (the cylinder vertices) along a spline path (I take it you want a smooth tube) relative to the path, so basically you:

Calculate point on path
Calculate the vertices relative to that point
Add them to a list of lists, where each list is a set of vertices for that particular step along the path
Connect the vertex lists together into triangle strips

That should give you a smooth tube.

Why make it any more complex?

Backov
04-21-2007, 07:03 AM
I take it you haven't done it? Unfortunately it is more complex than that. The low tech polygon only approach is what I have been doing - it's fraught with peril. :)

That said, it's probably an algorithmic problem on my end, but damn if I can find a nice solution.

EDIT: Although on further reflection, the algo you've mentioned is different from mine, and might work. It's just so hard to visualize these things and tools like Blender really don't help. :)

Backov
04-22-2007, 12:51 PM
Thanks Zoomba, that did the trick. :)