Jump to content
  • Advertisement
Sign in to follow this  
NcatDesigner

efficient 3d programming...

This topic is 4341 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The other day a read somewhere about efficient programming in 3D. I've read that triangles are more efficiently computed than polygonal faces because the triangles poitns are coplanar, and I'd like to know if this is true. It's a good idea to try to develop all the meshes in a game using triangles? it's better the triangle strip? and if there are a lot of triangles against a little of polygonal faces? I'm developing a game and I'd like to know the best way to develop it as more efficient as possible, if you can give some hint (not refering to glHint), or point me to the wright direction please... Please help me I'm confused!!!! xD Thank you all and sorry for my bad writting

Share this post


Link to post
Share on other sites
Advertisement
Triangles have the nice property of being coplanar; this is advantages for a number of reasons. Modern graphics hardware deals with triangles; the ability for you to specify quads or polygons to a graphics API is simply an abstraction -- they'll get converted to triangles. Consequently all your modelling should generally be done with triangles.

Triangle strips may be useful for some applications, but the performance gain isn't necessarily worthwhile compared to the extra effort you'll put in modelling the objects or in the extra batches you may have to submit to the card. In general, indexed triangle lists should be your default choice.

Don't worry too much about efficiency when you're just starting out. Focus on getting things working first. If you have performance issues once you have achieved desired behavior, then you can worry about them then.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes, the points in a triangle are always coplanar.

Even if you build a mesh full of complex polygons and thus have fewer polys compared to a large number of triangles; your graphics card operates using Triangles internally. And by doing this polygon approach you actually create more work because they will need to be triangulated for rendering-either by yourself or by the card at runtime(performance loss).

Also, since a complex polygon can be non-coplanar; there can be ambiguouity in how they get triangulated. meaning you dont have total control of the exact shape of your mesh or texture mapping.


Use Triangles!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes

the number of polygons is not what you care about
what matters is the number of triangles they break into when the graphics card renders them

each square side of the cube will be broken into two triangles
for 12 total
might as well save a step and have your mesh just be 12 triangles to begin with

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!