PDA

View Full Version : Why does Extrude do this?



Scott Gammans
12-01-2004, 12:08 PM
I'm trying to use the Extrude tool to extrude a Bezier spline curve, and for some reason the tool is multiplying the number of points on the curve when it performs the extrusion.

Take a look at the attached images. In the "before" shot, you'll see that I have a simple Bezier curve with 17 points. In the "after" shot, the Extrude tool has extruded the curve, but only after increasing the point count to 81! I should have gotten a curved object composed of 16 polygons... instead I got one with 80!

Is there a setting to prevent Extrude from adding unwanted points like this?

mattclary
12-01-2004, 12:32 PM
I don't have access to LW right this second, but isn't there a setting that affects the resolution of splines? I'm guessing it's a setting you can tweak for making the spline and not the extrusion. It is taking the curve information for the spline and converting it to polys, which makes sense to me.

Personally, I would just accept what it is doing. Without sup-patching, how is it you expect to get planar polygons from what you are doing?

Mylenium
12-01-2004, 12:49 PM
Yepp, use the options to set the spline resolution. If you want to have total control, freeze the Spline into a normal n-sided polygon before extruding and delete unwanted surfaces afterwards. As an alternative you might want to use patching instead of extrusions. It's a bit more convoluted, but offers more control over geometry resolution. BTW, LW's Splines are some kind of modified Hermite, not Beziers.

Mylenium

Scott Gammans
12-01-2004, 01:31 PM
I don't have access to LW right this second, but isn't there a setting that affects the resolution of splines?
You're right, it's in the General Options dialog box. But even setting that option to "Coarse" still results in my 17 points getting multiplied to 65. :(



It is taking the curve information for the spline and converting it to polys, which makes sense to me.
Hmm, well it doesn't make sense to me but OK. If you start with a curve that has 17 points, it seems like extruding that curve should give you 16 polygons, not 64 or 80. Extruding a 20-sided disc, for example, gives you a tube with 20 sides, not 64. Why are curves treated differently?



Personally, I would just accept what it is doing. Without sup-patching, how is it you expect to get planar polygons from what you are doing?
This is a small object in a larger model, and it is being subpatched. I don't need this many polygons for this object.



As an alternative you might want to use patching instead of extrusions. It's a bit more convoluted, but offers more control over geometry resolution.Hmm, I tried that already with unsatisfactory results, but you're right about the geometry resolution being more controllable. I'll give spline patching another shot.



BTW, LW's Splines are some kind of modified Hermite, not Beziers.Really? I guess that "Bezier" tool name is what threw me. ;) But seriously, they sure act like the Bezier curves I'm used to in POV-Ray (except that LightWave's are a lot more flexible).

Thanks guys!

mattclary
12-01-2004, 01:38 PM
A 20 sided disc is a polygon, a spline is something different, somwhere between a polygon and a sub-patch. (Don't sue me, I don't keep up on all the technical aspects of entity algorithms...) If you freeze a spline (hey, there is a clue to it's sub-patch-like nature), you will get a more accurate expectation of what you are going to get when extruding.

Maybe SplineGod will weigh in here...

Polygons are defined by points, so (normally) you can't have a poly with a true curve in it. A spline lets you have curves without all the points, but when you extrude it, it's no longer a spline, now is it? So you have to represent those curved surfaces with the only thing LW has available, polygons.

Trawler
12-01-2004, 01:39 PM
I'm pretty much a total newb, but would Extender Plus work for what you're trying to do?

mattclary
12-01-2004, 01:41 PM
I'm pretty much a total newb, but would Extender Plus work for what you're trying to do?

Pretty sure the answer is "no", see my explanation above.

Scott Gammans
12-01-2004, 03:07 PM
Polygons are defined by points, so (normally) you can't have a poly with a true curve in it. A spline lets you have curves without all the points, but when you extrude it, it's no longer a spline, now is it? So you have to represent those curved surfaces with the only thing LW has available, polygons.
Of course, how stupid of me! That curve in the first image isn't a series of seventeen points connected by sixteen 2-sided polygons; it's just a curve with a potentially infinite number of points (those 17 points are really control points along the curve). When I try to Extrude, LightWave is converting that curve into 65, 80 or 96 polygons (depending on whether Curve Divisions is set to Coarse, Medium or Fine in the General Options dialog box).

To get the result I want, I need to create the Bezier curve, kill the curve leaving only the points, connect the points manually, and then Extrude. Voila!

Thanks for pointing me in the right direction.

Mylenium
12-01-2004, 11:44 PM
.

Really? I guess that "Bezier" tool name is what threw me. ;) But seriously, they sure act like the Bezier curves I'm used to in POV-Ray (except that LightWave's are a lot more flexible).

Thanks guys!

Yepp, they are Hermites and they don't act like Beziers at all. Hermite Splines calculate interpolation differently and it's e.g. impossible to create a circle from just 4 control points (which you could do with Beziers). Instead you would end up with a roundish square thingy. Unfortunately the developers do not seem to care about such things and are not very careful with their choice of tool names. They rather choose to fool people into feeling save by creating unnecessary geometry (the "Bezier" tool creates far too many CPs to produce acceptable curves).

Mylenium

mattclary
12-02-2004, 01:34 PM
Excellent! Glad to help.