Home Technical Talk

Sharp corner edges on a square detail over cylinder without distortion

Hii everyone,

As you can see, I would like to keep those corners sharp without any distortion over the mesh of the cylinder.

With the current edge flow that I did, a weird artifact is visible which is pulling the surface a little outward.

Any other method that I can use to completely eliminate such distortions?

Replies

  • sacboi
    Offline / Send Message
    sacboi high dynamic range

    "Any other method that I can use to completely eliminate such distortions?"

    one technique, is use the existing geometry as a support to control artifacting once the mesh is subdivided:

    https://polycount.com/discussion/comment/2762984/#Comment_2762984



    Edit: A topic among many discussed in the subd modeling thread - https://polycount.com/discussion/56014/how-the-f-do-i-model-this-reply-for-help-with-specific-shapes-post-attempt-before-asking/p1

  • Noors
    Offline / Send Message
    Noors greentooth

    While it's fine to learn about doing stuff properly, keep in mind this kind of artefact might be invisible in the final asset with all the texturing work/texture resolution/viewer distance... So don't waste too much energy trying to be perfect while it could be used for more useful details.

    By it's own nature, subd can't be perfect, you just reduce the scale of artefacts to the point where no one can notice.

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter

    Is the thing you're trying to replicate a single watertight surface or made of multiple pieces?


    If it's the latter, you should probably make the model out of multiple pieces

  • perprerp
    Offline / Send Message
    perprerp triangle

    The majority of 3D artists make this mistake. A lot can be said for what kind of geometry to use in this situation, but the fundamental problem is straightforward:

    You fell for the temptation to simply extrude the quads straight off of the cylinder. As a consequence, your transition geometry (the part going from cylinder to box) is the size of one of the segments of the cylinder. If you simply offset the extrusion you can hide the transition shading errors in smaller geometry.

    In sub-division modeling you are bound to get shading errors. That's sub-d. The trick is knowing where to place them.

    Left: Transition geometry is large polygons

    Right: Transition geometry is small polygons

    They both have shading errors, but the ones on the right are less visible simply because they are smaller,

    When people do not understand this principle, they end up adding an unmanageable amount of sements to their cylinder (or whatever shape), which technically works because it has the effect of limiting the affected area. Here the area is limited without adding segments, It is exactly the same add adding a ton of segments, without adding a ton of segments.



  • Neox
    Offline / Send Message
    Neox veteran polycounter

    quite an interesting tone to your post, considering you didnt solve the issue and still have quite some artifact on that corner

    but the thing is absolutely solvable with the geo you have in the left image, just turn some edges and leave some ngons :)


    while it is still not 100% gone, this way you can offset the issue sideways









    works better when softer but can also handle quite sharp angles before becoming too much of an issue










  • pior
    Online / Send Message
    pior grand marshal polycounter

    Also FWIW, remember that one-click parametric bevels/creasing are also pretty good for ones sanity -


  • perprerp
    Offline / Send Message
    perprerp triangle

    Neox: "quite an interesting tone to your post, considering you didn't solve the issue and still have quite some artifacts on that corner"

    Neox, with respect, it is disheartening and discouraging to face criticism for my attempt to help someone. We all have different cultural backgrounds and neurological profiles and we all express ourselves differently. That is not for you to police.

    Perhaps you took issue with me saying that most artists get the principle wrong, Well, you got it wrong too:


  • FrankPolygon
    Offline / Send Message
    FrankPolygon grand marshal polycounter

    Lots of examples and some good advice in this thread.

    There's a few different topology layouts that can work well for this kind of shape and a lot of different ways to approach the modeling part of the process. If the project requires subdivision modeling and the goal is to have sharp corners, while also using the minimum amount of geometry required to hold the shapes, then what's already been said about using the existing geometry as support and offsetting the intersecting shapes is good advice. It's also important to preserve as much of the shape accuracy as possible, since any unintentional deformations in the base mesh will tend to carry over into the subdivided model.

    Below is an example of what this could look like. This simple topology layout can support some very sharp edges without generating any major smoothing artifacts. It's also worth noting that, after a certain point, there's diminishing returns on edge sharpness in the high poly. With baked normals the sharpness of the details is generally constrained by the size of the textures. Once the edges of the high poly drop below a couple pixels in size there's very little information for the bake to capture.

    Here's a close up of the topology routing in the corners. Any abrupt changes in the edge loops that define the shapes is limited to the transitional area around the shape intersection. In the first row: the highlighted edges are used to control the relative sharpness of the rectangular shape. In the second row: sharpness of the shape intersection is controlled by the highlighted edge on the rectangle's side of the shape intersection. This helps preserve the shape accuracy of the larger cylinder and helps constrain any potential smoothing issues to the flat areas on the intersecting shape.

    Here's what the shapes look like when viewed from glancing angles. The shaded subdivision preview can be used to evaluate the surface quality.

    Here's another set of shaded subdivision previews. When working with lower density base meshes, it may be necessary to adjust the position of certain support loop segments to counteract undesired corner edge smoothing stresses. It's generally preferable to do this in a way that maintains the shape accuracy of the base mesh geometry but it's sometimes necessary to move a small portion of an edge loop out of alignment to control for smoothing behavior when the subdivision is applied. As long as the base geometry is relatively consistent and subdivides without creating visible artifacts then this type of subtle adjustment is generally a non-issue.

    As far as modeling processes go, provided the individual operations don't cause any undesired deformation of the shapes, there's very little practical difference [in the final product] when comparing a boolean union style processes with an inset and extrude process. One is just a bit quicker and cleaner.

    Extruding directly off the existing geometry of certain shapes can lead to unintended surface deformation and loop routing issues. Which is why this modeling strategy can be problematic for certain types of subdivision modeling tasks. That said, there still are certain situations where it can work well on subdivision models. It just comes down to whether or not the tradeoff between shape accuracy and modeling time makes sense for the project.

    A more in-depth write up on topology and shape accuracy can be found here: https://polycount.com/discussion/comment/2746328/#Comment_2746328

  • Neox
    Offline / Send Message
    Neox veteran polycounter

    Yep it was that "many do it wrong, here is how to do it right" i am not against you trying to help by any means. But your solution just as well had a massive shading issue.


    Its interesting how you have such a massive shading bug on my solution, i really can not reproduce it. As said its not perfect, but i only have a very minor artifact sideways of the corner, not as massively on it. What software are you using? I can imagine 2 things to happen. The bevel algorithm does something differently or the smoothing works differently.

  • perprerp
    Offline / Send Message
    perprerp triangle

    Neox: "Yep it was that 'many do it wrong, here is how to do it right'


    There are people here with autism, social anxiety, poor command of the english language, young age, or any number of diverse reasons for expressing themselves in a manner which you may not "approve" of, but perhaps we are here to discuss technical matters and it should remain strictly technical. Negativity breeds negativity. Nothing else. I wrote that most artists get the principle wrong not in an infantile attempt to stroke my own ego but to assure OP they were not doing someting unusually bad, and to highlight the importance of the principle. After more than 20 years of doing this I have some legit observations to make.


    Neox: "i am not against you trying to help by any means. But your solution just as well had a massive shading issue." / "Its interesting how you have such a massive shading bug on my solution, i really can not reproduce it."


    Look, both you and OP go against the principle I described and your meshes suffer as a result. I am not saying that to beef with you; it is just objectively, demonstrably the case. Your mesh would benefit from offsetting the extrusion the way @FrankPolygon and I did it. In this case it is not just an edges' angle which determines its shading, but its length too. It's not something anyone will argue with if they fully understand it.


    There are a *lot* of ways to handle the flow of geometry and how vertices connect. I have not touched on that at all. @FrankPolygon did.


    ilustration: showing different shading errors as the flow of a cylinder is interrupted by an additional edge. Providing that you intend to extrude the polygon to the right of the edge, I hope it is clear that you will want solution C over solution B.

    edit: forgot to say. I do not see any "massive" shading errors. They're well within what you get from top-end AAA assets.


  • Neox
    Offline / Send Message
    Neox veteran polycounter

    i guess we can agree on the negativity argument. i think your point is valid, just the tone was off. schooling without essentially bringing the fix you wanted to show. i guess i shouldnt have chimed in on that tone... anyways what i'm trying to say

    this is not a crazy lot better than what OP had. a bit better yes. i guess is many cases the solution is valid. maybe one subdiv more would fade it into nothing. maybe on the final asset this will be hidden in roughness anyways.

    I offered another take on the issue, that usually works for me, i guess with pretty much the same amount of years in the indusrty we can agree that there are multiple ways of tackling an issue. offsetting it or solving it.

    With Frank probably offering the most clean solution here

  • parikshittiwari

    Hii, Sorry for the late reply.

    What you shared about using existing geometry as support edges, isn't that the exact thing that I did with my edges in the screenshot I sent? It definitely works but only to a certain extent.

    In fact, out of many options I tried this was the best in minimising the distortion and the distortion isn't even visible from the front. The problem arises only if change the view and look at the surface from a sharp angle. Also, if in case I needed an edge to be very sharp and tight then I would have to increase the geometry density of my cylinder very high. Wouldn't that make it extremely difficult to work on it for other details later on?

    I can also try and move the edges surrounding the extrusion but that destroys the curvature of the cylinder.

  • parikshittiwari

    I definitely always have the option to make it as a separate piece and place it there but I just wanted to know my options in a situation like this. I don't know why but I have always disliked placing different pieces together and not extruding or intruding them. I always try to make the details belonging to a mesh through the mesh itself.

  • parikshittiwari

    I understand your point. The screenshot I have posted was the best I could do and that reduced the distortion to a point where it wasn't visible if looked directly by the camera. It was only visible at a sharp angle.

    I just wanted to start a discussion over this and see what kind of ideas others could come up with. Was just curious....

  • parikshittiwari


    I might have to disagree on using tris at the corners. What you did on the left image is the thing I did in my screenshot and there are no distortions visible from the front unlike the one in your screenshot.

    As you can, my distortions are close to none compared to what is visible for you and it is more worse if I use tris instead of doing this. My main problem wasn't even distortions from the front. My problem was visible only when I look at it from sharp angles like the one in the screenshot I sent.

    I agree on what you said about keeping the transition geometry small, I understand the importance of it. I know smaller and denser geometry gives less distortion compared to bigger and less dense but in this case, what I did might also work and as I said, I need to eliminate distortions at sharp angles which will be visible in both the things you and I did.

  • parikshittiwari

    I think this was a mistake from my side where I couldn't describe exactly where the distortion is.

    The distortions are not visible at all from the front and when looked at directly through the camera. The edge flow that I have shown in the screenshot works extremely well in that regards. It is only visible when I look at the corner from sharp angles and that is the distortion I am trying to eliminate.

  • parikshittiwari

    They definitely are a godsend and creasing was always an option. I just avoid them right now because I am a student and I wanted to learn how I can work with the geometry in such cases. I like the support edges workflow more. I just think creasing might not help in cases where I want to export the model to a different program?

  • parikshittiwari

    Thanks for the incredibly in depth explanation you did. What you said is definitely the most cleanest way to go about modelling this detail. This also mostly eliminates the distortions visible from sharp angles.

    I will definitely take a look at the thread you mentioned.

  • sacboi
    Offline / Send Message
    sacboi high dynamic range

    "What you shared about using existing geometry as support edges, isn't that the exact thing that I did with my edges in the screenshot I sent?"

    No, not explicitly in terms of the example I'd linked.


    "It definitely works but only to a certain extent."

    Actually it doesn't and for my particular hard surface specialty I wouldn't even attempt too begin with when working via a subd workflow, anyhow subdivision algorithms are mathematically recursive, hence the reasoning why.

  • Neox
    Offline / Send Message
    Neox veteran polycounter

    Your material is quite bright and matte, of course you will see less issues here

Sign In or Register to comment.