Good Cylinder, Bad Cylidner

Posted 29 September, 2012 Anthony Tan (staring at yet another render. But still loving it for some reason..)

« previous | next »

tags: maya, modelling

Slight stray into borderline number theory, but I've been modelling some gears and cogs and suchlike lately and I thought setting your cylinder defaults to 36 was worth a quick note as just something that's IMHO, a better default than the Maya default.

The problem

Generally you start out with only a rough idea of what you're building, but you know it's going to be basically cylindrical and odds-on radially symmetric, so you use a cylinder, but when creating a polycylinder you rapidly demolish your ability to add/remove/modify the number of segments you've picked and so you're stuck.

If you're a NURBS man, you're chuckling to yourself right now.

What's wrong with 20?

While there's no one guaranteed approach, there are better and worse starting positions. Let's begin with the bad - it's the maya default of 20 segments.

This isn't ideal - in my experience, it's not really enough segments to avoid faceting when rendering (you can always do a smooth, but that's like chucking more polys at the problem) and it's also giving you pretty limited options when dividing your circle up when you're trying to work out either equal divisions or when you're trying to count out degree angles. This is down to divisors - 20 can be divided evenly by 2, 4, 5, and 10, with each segment being 18 degrees.

First order divisors: The first-order split represent the easiest things you have to work with, it's easy to make a 2, 4, 5, or 10 (or 20) armed thing. First order splits are the first cut from the circle and == good. You're getting the best approximation of a circle you can for a polygon (and therefore smoothing operations go well).

Second order divisors: You can split those segments up with an edge loop bisecting (or trisecting if you must) them to get different numbers of segments to work with but you have two issues. One - if you don't split all the segments the same way, you'll get a wonky circle. Two - as soon as you do split segments, you're going to get flat spots since the bisection doesn't magically add in data. The only 'magic' cure is to spawn a NURBS circle do a bunch of vertex pulling onto the curve.. which is a pain.

Try 36 segments

It's almost double the amount, so not your low poly choice but you get divisors of 2, 3, 4, 6, 8, 9, and 12, with each segment worth 10 degrees. In particular, I like having the divisor of 9 available so I can make fine-ish odd-spindled shapes easily. Generally, these options are enough for me to avoid having to worry about dividing a segment (most often I'm playing in the 8-9 range).

While you're at it, set the default end caps to 2. If you have just 1 end cap divisions you'll end up with a cap of tris which is harder to work with. 2 gives you a quad patch, plus the inevitable tripatch. You can then always choose to scale that inner edgeloop down to virtually nothing so you get what is effectively a big sheet of quads to play with. If you don't do this at the start, you can't do this again post-extrudes etc etc, which can be a pain but less so on the endcaps.

Ray Depth Limit and You in Mental Ray
Clean Poly Combine & mergeAndCull - better ways to merge polys than PolyUnite
tags: maya, modelling
  • 12, 24, and 36 are obscenely useful numbers when doing lots of stuff since you can keep divide the pile up and keep everything in nice little integers for longer, and integer maths = win.