Home Technical Talk

Best low poly circle topology

I have heard a few different thing s about the best way to model the top of a cylinder, and I just wanted to know what I should actually be using:]
Keep in mind this is for mobile platforms, if that has any affect on the decision!

cylinder.png
A - I don't think anyone actually thinks that is best, it is just there for completeness.
B - Heard this was best for games, as the topology of C/D could cause shading errors. Also it encourages having lots of quads, which is quite nice.
C - People have told me this the best, I think I missed the reason because all I can remember is people telling me how easy it is to just merge the centre vert with the edge, and save a vertex. I am sure there is more to it than that!
D - Apparently this is the 'most optimized' solution, yielding an easier to render object.

So what is good practice?

Replies

  • mdeforge
    Options
    Offline / Send Message
    mdeforge polycounter lvl 14
    I've only ever used A and C, but mostly A. There's another one too that is basically the top inset inwardly, but it all depends on what works. If it shows off your model correctly, it's right.
  • Gorman
    Options
    Offline / Send Message
    Well they all look exactly the same without the lines to distinguish them :)

    The only other thing I can think of is that A or B could help you save some texture space.
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    A - Bad, because you have 8 Tris instead of the 6 you get in B-D
    B - I use this method; it's nice if you come back and mirror the geometry later
    C - I avoid "triangle fans" at all costs. They can cause weird normals, mirroring can cause weird triangulation... it's just a bad time, personally.
    D - This one works, but I'd still be in favor of B since you can more easily mirror it. "Runner Up".

    I think so long as your bake (or whatever) looks good, any work, except maybe A.
  • mdeforge
    Options
    Offline / Send Message
    mdeforge polycounter lvl 14
    I hardly consider A to be bad for that reason. It's 2 more tries for gods sake. OP did mention a mobile platform though, so to your credit it does get more important there. But I wouldn't call A bad... just unfavorable in a mobile situation. Even then, depending on how many you need in your scene it's probably no big deal. Be more concerned with texture space IMO.
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    I agree; 2 tris isn't terrible, but I've had it drilled into my head enough times that I'd avoid it. Also something to consider; on an 8-sided Cylinder like this one, B-D are 28 Tris, while A is 32. 2 tris doesn't seem like much, but in this case it's an extra 15% polys. If you have a mechanical mesh/scene with a lot of cylinders on it, the waste can really add up.

    Removing the extra Polys isn't something I'd flip out over, but so long as we're talking about "best", I'd steer clear of them.
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    B, costs less. A if you need 1 smoothgroup and you want the nmap to show right.
  • Ark
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    Ark wrote: »

    Good find. So basically, A > B at low polycounts, B > A at high polycounts, C is less usefull, D can go die.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Surely these days so long as the smoothing is good then its not really an issue. on a current gen asset what's 4 polygons?
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    leechdemon wrote: »
    Good find. So basically, A > B at low polycounts, B > A at high polycounts, C is less usefull, D can go die.

    Doesn't that link say D is the best for all?
  • Ark
    Options
    Offline / Send Message
    Ark polycounter lvl 11
    cryrid wrote: »
    Doesn't that link say D is the best for all?

    Yes, the way i read it was that D was more optimised.
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    cryrid wrote: »
    Doesn't that link say D is the best for all?

    Ooh, my bad... I was thinking Y-Axis was Draw Time, in which case D would've been terrible. Interesting.
    r_fletch_r wrote: »
    Surely these days so long as the smoothing is good then its not really an issue. on a current gen asset what's 4 polygons?

    From what I've heard about Fragments, the actual polycount isn't even the factor; if you have a bunch of dense clusters of polygons, you're drawing every pixel's worth of polygons, in sets of 4. So basically, with a high-poly mesh at fullscreen-size you'll see no difference, but as the object gets farther away from you, pixels encompass multiply triangles, you draw each triangle 4x times per pixel, and the draw time skyrockets. This is basically the reasoning behind LOD's, AFAIK; whether or not you care about them overall, you want to disappear as many polygons as you can before they start all drawing at once. 4 triangles only becomes 16, but again, on a large enough scale it can be tragic.
  • Mark Dygert
    Options
    Offline / Send Message
    They all have their places and practices. It really depends on the object and how it will be used and UV mapped as to how you will need to edit (if at all) the end caps of a cylinder.

    You also have the other issue of your time being spent flipping and defining edges on cylinders and how those edges will effect edge flow and poly selection. Saving 2 tris really doesn't mean what it used to so if your optimization is going to make it difficult to work with why bother?

    A) This can be helpful if you plan to stack all of the pie shaped pieces on top of each other in the UV space. You unwrap this type of end cap to a perfect square making it easier to pack. But it depends on the object, the material and how the engine handles seams.
    CylinderCapPieUnwrap.jpg
    It's worth noting that splitting the end cap into two pieces fits this layout just as well, reduces seams and allows you more flexibility in creating a texture. But just know with that center vert it does give you some options in some cases.

    For example, if you wanted to do an umbrella pattern of solid colors you could scale the end cap tris down to just a few pixels. You would have a nice crisp umbrella pattern that would otherwise have aliased lines if you had drawn it. That crispness is often hard to get on really small texture sheets which mobile games are notorious for having.

    Also that center vert in A, might be helpful for shading, again depending on how the engine lights things. Saving 2 tris is pointless if that vert is used for something. This thread sort of speaks to some of the same issues. The post I put together about shading and hidden verts can apply to your examples above to some degree.

    B) It's quads, easy to unwrap, could be mirrored making it easier to layout.

    C) If it works, why bother wasting your time being a perfectionist. Players don't care about the flow of your hidden edges unless it screws something up.

    D) Really depends on how it will be unwrapped, how the material will be applied and if its even worth going to the trouble of setting up.
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    Saving 2 tris really doesn't mean what it used to so if your optimization is going to make it difficult to work with why bother?

    Would you say this is still true in the case of the Humus link? Granted, his scale goes up to 49k verts, which is a little silly for a cylinder... but unoptimized fragments aren't nothing, correct?

    Not to thread-jack, but the main reason I'm harping on Fragments is because we had a serious problem at work where 4x the polygons had an exponentially larger draw time with no LOD's. When we examined it further, fragments were absolutely killing us. Is this just a known problem with some engines, or is there a way around this we don't know about?

    On something basic like a cylinder it may not be a big deal (32 tris instead of 28), and if you NEED them then there's no argument, but by default isn't avoiding these issues when possible going to help in the longrun?
  • Mark Dygert
    Options
    Offline / Send Message
    I'm pretty sure the Humus link, is dealing with heavily subdivided meshes, if you're game is using some kind of tessellation then the performance might take a hit, but since we're dealing with mobile game and most games in general, You're just using the first part of that graph (48).

    The edge flow on a non-tessellated cylinder really doesn't effect performance in any measurable way until you get up a few sub-divisions, even then it might not be too much of an issue for some engines.

    In the future when DX11 tessellation starts to factor into how we make games we might need to keep that in mind but it's more of a point of interest than a "omg we're all doing it wrong!" earth shattering event, heh.

    Just to be clear:
    A) Might have some uses, you'll probably know what they are and have a few good reasons why.

    B-D) Who cares, as long as I can select the top cap as a poly the hidden edges can flow whatever way they want.

    Some configurations might be better than others if you plan to extrude certain shapes from the top but really... it doesn't matter, you're probably wasting your time worrying about it.
  • mdeforge
    Options
    Offline / Send Message
    mdeforge polycounter lvl 14
    Mark, no homo, I always love reading your posts. You always explain things so clearly and in such a practical way. Thanks for being a polycount champ, man. :)
  • EarthQuake
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    Earthquake joins the conversation,this must be informative...wait...what?
  • Racer445
    Options
    Offline / Send Message
    Racer445 polycounter lvl 12
    Wow thanks Earth Quake for Helpful Tip !! ))
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    I hope it's a 4k alpha here, for more roundness !
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    It's turning into /r/circlejerk here.
  • Mark Dygert
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    earth quake, I agree, but what if there's only 1 smoothgroup for the entire thing and you want to have a nice normal map? Wouldn't other cylinders do bended nmaps results?

    I would of course use 2 smoothgroups, but still there are some clients/engines that require one only. What would you do in such case?
  • Gorman
    Options
    Offline / Send Message
    Thank you all for your excellent (and humorous) information! :)

    In the end it all comes down to decision based on the effects it will have on the UVs and how easy it will be to work with.

    I will keep in mind that isolating single parts of a model and trying to make decisions is not really helpful, and I need to keep an open mind as to how my decisions will affect the model as a whole.
  • Mark Dygert
    Options
    Offline / Send Message
    DB, I did that once and I heard satanic voices telling me to do things...

    (come on the guy has a wolf, a tornado and an eagle on his site back-masking and reverse speech MUST be REEAAL MAN!!)
Sign In or Register to comment.