View Full Version : Joining quad cylinders
09-10-2003, 06:14 AM
If you have two cylinders meeting at angles from 0-179 degrees, is there a neat way of drawing the bend? I notice the Windows 3D Pipes screensaver has nice 90deg bends, but I presume they are a precalculated standard shape.
09-10-2003, 07:35 AM
Yes, the pipes are precalculated.
Assuming 180 means the resulting pipe should not degenerate to a single one (but look like a shotgun in the end), you'll need to extrude the cut section (a circle) of the pipe along an arc which length is calculated from the angle and the radius depends on the radius of the pipe or the effect you want to achieve.
One not so nice looking way is to do skinning (formerly called vertex weighting in an extension).
In your case it needs two matrices representing two orientations, each vertex is transformed by both matrices and a weight per vertex running from 0.0 to 1.0 blends the two results to the final vertex postion. This method can result in some ugly folding.
Search for vertex weighting and skinning tutorials there are many.
09-12-2003, 12:51 AM
Interesting ideas. Actually, 180degrees means they would become a single pipe, the centrelines meet at a point. I have tried using a quadsphere at the node, but it semed wasteful of vertices as most of the time you only see a small area of the surface. I just wondered if there was some standard way of producing the bend.
I now have a new LoD algorithm so I may try the spheres again.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.