Jump to content

Adding a Material Increases My Tri-Count


Driftwood Miles
 Share

You are about to reply to a thread that has been inactive for 4249 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

First let me apologise if this subject has been raised before. I have looked but could not find anything. 

Simply put :  I am using Maya 2012 and if I import a Model of say 3000 Tris with ONE material all is well with the world. But IF I add a second material to the (combined or seperated) Model it imports with a whopping 6000 Tris (great fun). This multiplier continues as I increase the materials. 

Any ideas anyone? I am thinking that I am going to roll my eyes at myslef when I get the answer...but for now it is baking my noodle. I originally thought that it was just part of the SL experience :matte-motes-big-grin: : 

Anyway I hope someone can help. I am exporting using fbx:dae and other than the above issue everything is tickety boo!

Thanks in advance

Drift

Link to comment
Share on other sites

Can you make a simple tetrahedron with no materials, then one, then two, ans see whether you see the same effect on triangle count. Then if you do, show us the collada files somewhere. (Strip out any personal identifying information first). It sounds as if you have applied both textures to all the faces. The SL format stores a complete vertex/triangle set for each material. So that would duplicate the whole thing. But I would have expected it to be recognised as an error in the uploader.

Link to comment
Share on other sites

Hi Drongle, the complete collada was at the link I gave. If I combine three cubes in maya  into 1 with 1 material I would expect it to have 36 triangles. And if I bring them in as a group but not combined they ARE 36 tris. On combining I get 72 tris. This makes no sense as far as I inderstand it. It is one object with 36 tris...why would it suddenly become 72. And yes I am looking at the tris.

12 tris per cube x 3 cubes = 36. Combined it should be and states it to be in Maya 36 tris. But the SL upload dialogue states 72. So I am kinda bamboozled.

Thanks for response

 

Link to comment
Share on other sites

Yes. I see what you mean with the numbers now. What happens if you assign a material to each cube after combining them? I would like to see the collada, as that would tell us what is going on, although not necessarily why. The link gives me an error message. "The page /cube_test/ could not be located on this website." Maybe a private directory? Maybe you didn't finish uploading it?

PS: did the same in Blender ... 3 cubes objects, different materials, join into one mesh ... and it was 36 triangles, as expected.

Link to comment
Share on other sites

The collada file has the expected numbers of vertices (24) and normals (108, many identical). Then it has two <traingles> sections, each of which specifies the entire set of three cubes with one and then with the other material. So there are two faces for each triangle, both using the same vertices. This is odd.

Importing it into Blender leaves it like that, with the two sets of faces with different materials overlying each other, but I don't think it's possible to crerate that in Blender. If you exactly superimpose two cubes with different materials and then remove double vertices, it deletes one of the overlayed faces. No idea how it decides which.

I have to suspect this is what you did ... exactly overlayed the whole set of cubes, one set with each of the two materials, after which the duplicated vertices were removed, either automatically or explicitly. However, unlike in Blender, the superimposed faces were both left intact. If that's not what happened, then something else must have caused the superimposition, either during the editing or during the collada export..

What happens in SL? If you select the visible face, then make it transparent, do you see the second face in it's place?  Anyway, since the uploader has to duplicate the vertices and triangles for each material, it is telling you the correct numbers for what is defined in the collada file. The problem is with the mesh and/or the exporter, not the uploader. If you can access both faces, as when inporting into Blender, then I suppose you are getting your LI's worth in the uploaded mesh.

ETA - actually, looking at your Maya picture, it says 36 triangles. So perhaps it is the collada exporter that's cuasing the problem. I don't know what material;s you have on each triangle in the Maya. Can you have two at the same time? If that's the case, that could be the problem. Then the exporter may have to duplicate them because collada can't have faces with more than one material (but I wouldn't expect Maya to allow that either).

Link to comment
Share on other sites

A small correction to Gaia's explanation..... The importer doesn't ever upload face normals as such. Only vertex normals appear in the upload data. At a smooth shaded vertex, all the triangles that meet at that vertex have the same normal for it. So they can all point to the same entry in the vertex list, and it only counts once (uv seams apart). When the triangles are flat shaded and have different normals, then the vertex has to appear in a different entry for each different normal. All three corners of the triangle then appear in the table with the same vertex normal, which is the same as the face normal in the authoring program.

I's the same with the UV mapping. Most vertices on a seam appear in at least two different locations on the UV map, with different locations for the triangles separated by the seam. Each vertex list entry has only one UV position, so those triangles have to point to different entries in the vertex list.It's not the seams per-se that cause the extra entries, it's the appearance at multiple UV coordinates. So the effect is still there whether you unwrap using seams or by other methods. Highly fragmented UV maps increase land impact, especially of smooth-shaded meshes.

Of course, if the triangles are already pointing to different entries because of sharp shading, then they don't need to be duplicated again for the U?V seam effect...and vice-versa. Tha's why it's better to have sharp edges ans seams coincide.

Materials have copletely separate triangle and vertex lists. So vertices at the edges of more than one material have to be repeated in as many materials as they touch.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4249 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...