Sign in to follow this  
n4gix

Comments on: Polygons don't matter.

Recommended Posts

Let me preface this post by saying two things: 1) I make no claims to expert knowledge. 2) My purpose is to just spur discussion leading to knowledge.Have read this http://blogs.technet.com/torgo3000/archive...n-t-matter.aspxby an ACES memeber, I decided to do some experimentation and research into this topic. This post is the result of my research.Torgo3000 wants to illustrate how texture mapping results in verts used by the engine to ultimately result in triangles that must be rendered.He does this by taking a basic box (six sides, resulting in 8 verts) and applying a default (ie planer) UVW map and showing this results in 8 verts, which is what one would expect as this is what is in the mesh.He then shows that if you apply a "face" UVW map this results in 36 verts, which seems to be counter-intuitive as there are only 8 in the mesh.Clearly this is due to each of the six faces of the cube being in reality two planer triangles. With this UVW mapping, each face has to be "drawn".Now, while I realize that perhaps his purpose was merely illustrative, I think the article is somewhat mis-leading practically speaking.If one actually takes the planer example and looks at the UVW mapping, one finds that you could only texture a single "square" meaning that you would be limited to a box with all sides looking the same.So, while it is true that such a mapping would result in greater performane, it is comparing apples to oranges in that if you must have a box with unique sides (say six colors), then you are going to have to use the other mapping.So, provided you have properly UVW mapped (meaning you don't have a mult-material with say 2 sub-materials that are really the same), it would not seem to matter at all if you use two separate materials on two parts, or one multi-material on a single part with 2 material ID's.To illustrate this, let's try an experiment.Create a sphere with 32 sides in the front viewport, and make it a 0.5 hemi-sphere, and convert to mesh. Now extrude out the flat face. Use "getNumTverts $" in the script window to see that this results in 428 verts.Let's suppose that your end goal is to texture the sphere with one color, and the cylinder part with another. Let's compare mult-material UVW mapping to separate part UVW mapping.Leaving the end of the cylinder capped, and un-smoothed, and smoothing the sphere and cylinder (like we would likely do in a practical situation), and we duplicate this geometry and then detach the two parts and add a cylinder and spherical UVW map respectively, we can find this: Parts with mapping: 508 verts Single with multi mapping: 394 verts.This seems to suggest to me that using a multi-material with two sub-materials (one for the sphere and one for the cylinder) actually results in a savings of triangles to be rendered by the engine (ignoring an unknown amount of optimization during model compilation).Comments?Patrick

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Adrian wasn't terribly clear, but he was referring to UVW Mapping FACES with a planar map, not using "Face" mapping under the UVW Map types... :(Since a cube contains six sides, that is 12 "faces" (triangles), each of which have 6 vertices.Assuming that the "new math" hasn't changed anything, 6 x 6 = 36...

Share this post


Link to post
Share on other sites

>Adrian wasn't terribly clear, but he was referring to UVW>Mapping FACES with a planar map, not using "Face" mapping>under the UVW Map types... :(>>Since a cube contains six sides, that is 12 "faces">(triangles), each of which have 6 vertices.>>Assuming that the "new math" hasn't changed anything, 6 x 6 =>36...Yes, I apparently wasn't clear as well. :DHe shows that you get 8 with planer mapping (although unstated), and 36 from the triangles created with the faces.Still, if you follow through with my practicle example, you'll see that in this case at least a multi-material results in few verts, and perhaps draw calls.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this