Home Technical Talk

Why only triangles!

polycounter lvl 10
Offline / Send Message
dextor polycounter lvl 10
Ya as Said,
I have never known why does any game asset or any 3d object in game
has a form in tri's!
Can anybody tell me how is the logic behind the triangles and the how it works if possible?"

Replies

  • LateWhiteRabbit
    Pretty much what luke said.

    A computer really creates 3D forms by placing points in space using X,Y,Z coordinates - i.e. vertices.

    Connecting only 2 vertices makes a line, so to get a surface, a line must be drawn to a third vertex, resulting in a triangle. Hence, as luke said, the fastest, most easily calculated shape for a computer with be a triangle, hence why game engines simplify everything down to triangles even if it is imported as quads.

    So the reason for triangles boils down to math and efficiency. Nasty nasty math.
  • dextor
    Options
    Offline / Send Message
    dextor polycounter lvl 10
    Hey
    Thanks Luke,
    Thanks LateWhiteRabbit,

    So, all the triangles are so,
    just to optimize its calculation to the lowest possible.
    Was trying to find out if there was anything more related to the objects why they are taken in triangles.
  • Valandar
    Options
    Offline / Send Message
    Valandar polycounter lvl 18
    Another reason is that a triangle can ONLY represent a plane. No matter how you arrange the points, a triangle will always be perfectly flat. A quad, as an example, can be bent along a diagonal, creating a surface that is no longer perfectly flat, and requiring some form of shading across that bend line.
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    well no, it's out of necessity really. Any mesh is made of points. It's just a list of vertices in space. So logically, if you stretch lines in between all the points what you get is a bunch of triangles. There's really nothing more to it.

    We simplify the collection of points into triangles, which we then simplify into rectangles, but really they're just a bunch of dots.
  • satrio
    Options
    Offline / Send Message
    Not really true,Bigjohn..

    if you connect lines to all the dots you get a mess of 2poly lines and not neccessarily the surface you are after.

    Each triangle has three vertices assigned to them, so a poly/triangle has more data associated to it than just "all the dots"

    Nitpicking, I know.. but you said logically, and what you said is just not true ;)
  • dextor
    Options
    Offline / Send Message
    dextor polycounter lvl 10
    Valandar wrote: »
    Another reason is that a triangle can ONLY represent a plane. No matter how you arrange the points, a triangle will always be perfectly flat. A quad, as an example, can be bent along a diagonal, creating a surface that is no longer perfectly flat, and requiring some form of shading across that bend line.

    Thanks Valandar,
    Thats more convincing,:thumbup:
Sign In or Register to comment.