Home Technical Talk

Need some clarity on long thin triangles

polycounter lvl 10
Offline / Send Message
Deadly Nightshade polycounter lvl 10
I´m currently making an FPS weapon and I have some geometry which I´m unsure whenever it will cause troublems or not.
Imagine a long cuboid with it´s long sides beveled. The faces on the bevel becomes quite long and thin and Im curious about if this is a problem or not? I mean, in some cases you just can´t model something in a different way.

Example:
fapp2e.jpg
(cuboid is along the Z axis (maya))

Replies

  • kurt_hectic
    Offline / Send Message
    kurt_hectic polycounter lvl 13
    Picture doesn't work but "long cuboid" with a bevel should be fine.
  • Farfarer
    Yeah, that sort of thing shouldn't be a problem.
  • Deadly Nightshade
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    Alright. I guess I was just paranoid.
  • marks
    Offline / Send Message
    marks greentooth
    Just to clarify here - long thin triangles are always more expensive to draw than ones with equal length sides (as far as I'm aware) due to pixel shader overdraw when shading the edges of the triangle (aka Quad overshading).

    e/ there's a good article on the subject here: http://blog.selfshadow.com/2012/11/12/counting-quads/

    "As you likely know, modern GPUs shade triangles in blocks of 2x2 pixels, or quads. Consequently, redundant processing can happen along the edges where there’s partial coverage, since only some of the pixels will end up contributing to the final image. Normally this isn’t a problem, but – depending on the complexity of the pixel shader – it can significantly increase, or even dominate, the cost of rendering meshes with lots of very small or thin triangles."


    In reality though, sometimes you just have to model like that. But try to avoid it.
  • huffer
    Offline / Send Message
    huffer interpolator
    You could also add an edge loop in the middle in extreme cases.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    I would just place some extra edge loops, even if you triple or quadruple the number of tris in a mesh like that, it won't have much of an impact.

    I did a little test scene in UE4, got the same frame rates with both meshes from multiple camera angles. I'll have to see if I can find the performance monitoring features and see if there's actually any difference at all in performance. There's a 130 of those columns in the scene.

    xdy5hCg.png
  • AlecMoody
    Offline / Send Message
    AlecMoody ngon master
    ZacD wrote: »
    I would just place some extra edge loops, even if you triple or quadruple the number of tris in a mesh like that, it won't have much of an impact.

    I did a little test scene in UE4, got the same frame rates with both meshes from multiple camera angles. I'll have to see if I can find the performance monitoring features and see if there's actually any difference at all in performance. There's a 130 of those columns in the scene.

    xdy5hCg.png
    I agree that subdividing meshes like this generally won't have a huge performance impact. That said, it is really hard to draw broad conclusions from that kind of testing. Were you transform cost bound in your scene? Were other aspects of the rendering creating parallel latency such that changes might not show up? If you are purely testing performance impact in that particular set of parameters then it is valid but games will have hugely variable art specs and how that stuff plays out is situational.
Sign In or Register to comment.