Что такое tris maya
Помогите разобраться с понятиями faces, vert. tri. и модельями
Или давайте вместе разбираться:
readstr(filein,oneline);
sscanf(oneline, «NUMPOLLIES %d\n», &numtriangles);
model_struct->triangle = new MODEL_TRIANGLE[numtriangles];
model_struct->numtriangles = numtriangles;
for (int loop = 0; loop triangle[loop].vertex[vert].x = x;
model_struct->triangle[loop].vertex[vert].y = y;
model_struct->triangle[loop].vertex[vert].z = z;
model_struct->triangle[loop].vertex[vert].u = u;
model_struct->triangle[loop].vertex[vert].v = v;
>
>
fclose(filein);
return;
>
void DrawModel(MODEL_GENERAL * model_struct, unsigned int model_material)
<
GLfloat x_m, y_m, z_m, u_m, v_m;
int numtriangles;
for (int loop_m = 0; loop_m triangle[loop_m].vertex[0].x;
y_m = model_struct->triangle[loop_m].vertex[0].y;
z_m = model_struct->triangle[loop_m].vertex[0].z;
u_m = model_struct->triangle[loop_m].vertex[0].u;
v_m = model_struct->triangle[loop_m].vertex[0].v;
glTexCoord2f(u_m,v_m);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f(x_m,y_m,z_m);
x_m = model_struct->triangle[loop_m].vertex[1].x;
y_m = model_struct->triangle[loop_m].vertex[1].y;
z_m = model_struct->triangle[loop_m].vertex[1].z;
u_m = model_struct->triangle[loop_m].vertex[1].u;
v_m = model_struct->triangle[loop_m].vertex[1].v;
glTexCoord2f(u_m,v_m);
glColor3f(0.0f,1.0f,1.0f);
glVertex3f(x_m,y_m,z_m);
x_m = model_struct->triangle[loop_m].vertex[2].x;
y_m = model_struct->triangle[loop_m].vertex[2].y;
z_m = model_struct->triangle[loop_m].vertex[2].z;
u_m = model_struct->triangle[loop_m].vertex[2].u;
v_m = model_struct->triangle[loop_m].vertex[2].v;
glTexCoord2f(u_m,v_m);
glColor3f(1.0f,1.0f,0.0f);
glVertex3f(x_m,y_m,z_m);
glEnd();
>
и данный(я пытался две стенки куба нарисовать)
0.000000 0.000000 0.000000
20.000000 0.000000 0.000000
20.000000 20.000000 0.000000
20.000000 20.000000 0.000000
0.000000 20.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 20.000000
20.000000 0.000000 0.000000
20.000000 0.000000 0.000000
20.000000 0.000000 20.000000
0.000000 0.000000 20.000000
0.000000 0.000000 20.000000
0.000000 20.000000 20.000000
20.000000 20.000000 20.000000
20.000000 20.000000 20.000000
20.000000 0.000000 20.000000
0.000000 0.000000 20.000000
Теория полигонального 3D-моделирования в Maya
В этой статье Jahirul Amin рассмотрит основные составляющие теории полигонального моделирования.
Квады против трисов и N-гонов
Итак, какая же разница между квадом, трисом и N-гоном? Ну, квад – это полигон, у которого 4 стороны, трис – это полигон, у которого 3 стороны, N-гон – это полигон, у которого больше 4 сторон.
В процессе моделирования лучше всего придерживаться четырехугольников или квадов. Главным образом из-за того, что дивайдятся они более предсказуемо, лучше деформируются в анимации, а текстуры искажаются меньше всего.
Трисы или треугольники лучше всего использовать там, где их меньше всего видно.
А вот использования N-гонов лучше вообще избегать, поскольку на рендере они могут образовывать странные артефакты, а хорошо раскрасить скин с многоугольниками при риге вообще практически невозможно.
Кроме того, в программах для цифрового скалптинга, таких, как ZBrush and Mudbox удобнее всего работать с моделью, состоящей из четырехгольников.
Радость от полигонов и печаль от многоугольников
Uniform-геометрия
Uniform-геометрия значит, что в процессе моделирования вы стараетесь максимально придерживаться четырехугольников или квадов, размещая их максимально равномерно. Делать риг такой геометрии будет одно удовольствие, она будет отлично деформироваться на анимации. И, несмотря на то, что хорошие текстуры во многом зависят от хорошей UV-развертки, искажаться они будут еще меньше, если геометрия будет состоять из четырехугольников.
В Maya есть прекрасный инструмент Sculpt Geometry, с помощью которого, при условии перехода в режим Relax, можно прекрасно сгладить эджи по краям.
С помощью инструмента Sculpt Geometry можно сгладить эджи
На первый взгляд расположение эджей не имеет никакого значения. Но это не так.
При моделировании реалистичных персонажей стоит изучить анатомию человека. В таком случае направление эджей и топология должны соответствовать расположению мышц на теле человека, что создаст более правильную деформацию геометрии.
В случае с более мультяшными и стилизованными персонажами пространства для маневра больше, однако, знание анатомии лишним не будет даже в этом случае.
Для корректных деформаций топология должна быть соответствующей с необходимыми эдж лупами
Non-manifold-геометрия
Non-manifold-геометрия может содержать различные ошибки, возникшие в процессе моделирования. Это могут быть висящие эджи (без фейсов); эджи, общие для трех и более фейсов; нормали соседних фейсов, направленные в противоположные стороны; число фейсов, сходящихся в одной вершине может отличаться от числа фейслов, исходящих из этой вершины и пр.
Например, создайте куб, выделите один из его эджей и выполните команду Edit Mesh > Extrude. Итак, мы получили non-manifold-объект. Если бы это был лист бумаги, то это был бы сгиб, от которого было бы сложно избавиться. Если выполнить операцию Boolean для такого куба, то все сразу же станет понятным.
Non-manifold-геометрия может доставить немало боли, поэтому старайтесь избегать ее. Инструмент Cleanup, который находится в меню Mesh, поможет решить многие проблемы, связанные с non-manifold-геометрией.
Non-manifold-геометрия может доставить много боли
Каждый эдж должен быть на своем месте
В идеале мы начинаем процесс моделирования с простого примитива, например, куба, которому затем добавляем эдж лупы, экструдим и пр.
При этом важно соблюдать простую сложность, добавляя детали только там, где это действительно нужно. Меньше может быть лучше. Со временем вы будете лучше понимать, как оптимизировать модель, а сейчас просто продолжайте моделить.
Не делайте модель излишне сложной, добавляйте детали только там, где это действительно нужно
Изучайте окружающий мир
Все, что мы пытаемся воссоздать программно является отражением реально существующих вещей. Поэтому самым важным советом станет изучение окружающего мира.
И это касается не только моделлеров, но и риггеров, аниматоров, художников по свету и пр. Задумайтесь, как устроен тот или иной объект, как он освещается, деформируется и пр. Поиск ответов на такие вопросы значительно облегчит жизнь.
Читайте в нашей предыдущей статье введение в риг от Jahirul Amin.
Tris, Quads & N-Gons
When modeling in 3D with polygons, it is important to construct all of your models using quads and triangles.
Triangular Poly (3 Sides)
A triangular polygon is referred to as a tri or triangle, and is a simple three-sided polygon. It has exactly 3 vertices at its corners and 3 edges connecting those points. This is the smallest configuration required to make a polygonal face.
Quad Polygon (4 Sides)
A square or rectangular polygon is referred to as a quad or quadrilateral polygon, and is a four-sided polygon. It has exactly 4 vertices at the corners connected by 4 edges. This is the most desired type of polygon when creating digital models, and many artists like to build their objects using nothing but quads to help make their work more appealing to customers in complex pipelines.
N-Gon Poly (More than 4 Sides)
An N-Gon is a polygon with more than four vertices and edges. This kind of polygon is not desired by TurboSquid customers and should be avoided. Due to its geometric properties, an N-Gon can always be divided into quads, tris, or a combination of the two; so they are always easy to remove by adding connecting edges between the border vertices.
Why N-Gons Should Be Avoided
Difficulty when subdividing
Yuck! Ngons (marked in Red) don’t subdivide cleanly or predictably
Unwanted behavior when importing and exporting
NGons in 3ds Max — Unable to Sculpt cleanly in Mudbox
How To Identify N-Gons In Your Models
If Editable Poly is not available within the existing Modifier Stack, apply an Edit Poly modifier from the modifier list at the top of the stack.
Poly Sub-Object Mode
By Numeric Settings
Any n-gons will become highlighted in red on the selected model as shown below. Once identified, you can now fix the n-gons so they are converted into quads and tris.
N-Gons highlighted in red
Maya Cleanup Dialog
N-Gons highlighted on Cleanup
Once identified, you can now fix the n-gons so they are converted into quads and tris.
There are a couple of ways of identifying N-Gons inside of CINEMA 4D
Option 1:
If N-gons exist within your model, CINEMA 4D will create highlighted edges with a greenish (default color) line as a suggestion of how to eliminate them as shown below.
CINEMA 4D Filter Option for N-Gons
Option 2:
Structure Panel Modes
The structure panel will update and list polygons by the number of vertices they have. Larger polygons will rise to the top by default. By selecting polygons with more than four points (P5 column and up) C4D will highlight where N-gons exist as shown below.
N-Gons Selected via Structure Panel
Finding N-Gons in Lightwave Modeler is very simple.
Polygon Statistics for N-Gons
At this point, all N-Gons in your model will highlight and you can go in a repair them, converting them to quads and triangles.
Select the object and go into edit mode.
2. Then make sure faces are selected
Make sure the faces are selected.
3. Next, go over to select and press Select All by Trait > Select Faces by Sides
Select > Select All by Trait > Select Faces by Sides
Change the number of vertices to find any tris, quads, or ngons in the model.
Selecting “3” as the number of vertices and selecting “equal to” will highlight all tris.
Selecting “4” as the number of vertices and selecting “equal to” will highlight all quads.
Selecting “4” as the number of vertices and selecting “greater than” will highlight all ngons.
Faces vs Polys vs Tris
Replies
Tri = 3 vertices form one tri, and are rendered via the method of rasterization (real-time). All models are turned into tries for rendering with the GPU, as that’s what the GPU renders.
Polygons and faces are for simplicity sake the same thing. If your model is 4000 polygons, then it’s 4000 faces.
I think that’s the correct way to put it.
Tri’s, quads and 4+ sided polygons are all polygons.
The reason your count doubles is probably because it was triangulated when you exported (turned from quads to triangles), or for whatever reason it is telling you the number of triangles and not quads. Because one quad = 2 triangles (cut it diagonally, you get two triangles).
so lets say it this way: you always have polys, the triangle is just a special case
game related, you talk always about tris, even if you say polygone
After a test found that if you work in edit-poly and export a file then re-import that file the count increases as the object is triangulated automatically.
There seems to be no user intervention required when preparing an object for importation as the engine will triangulate the model for you.
I don’t think that Polygons just means even-sided.. er.. Polygons.
Well that’s because in Max the polygon counter counts polygons instead of triangles by default. Polygons are two or more triangles. Depending on the version of 3ds max you use you would either have to go to viewport configuration under statistics to set max to show the triangle count or go your shortcuts and switch the 7 shortcut from polygon counter to triangle counter.
As far as the face vs polygon lingo it just that semantics. A clear example of this is how different software refer to the same thing with a different term, some call vertices, vertex, vert, or point. The same is true for polygons, some call them faces. On of the unique features that Max had for countless years was the ability to select triangles easily instead of quads. If you want to select just one triangle in another application you have to cut the face into tris.
Its true that one- and two-sided polygons don’t really exist in 3D, the most similar things to them would probably be points and lines.
That particular site is just a general geometry-centric description, there may be better sites that explain the terminology. But one can already see that «tris» is derived from «triangles» and «quads» from «quadriliterals». From what i understand, everything «past» a Quad is usually just binned under «N-Gons».
READ: What Vig posted. If you’re talking about what terms are commonly accepted by game artists, it’s right, and there’s no need to ask any more questions on the matter. And stop listening to Blender. If it’s saying anything different, it more than likely is using nomenclature the industry doesn’t accept as the norm.
The industry predominantly uses Max, Maya, and XSI, they all agree with what Vig posted. Hell, even Lightwave does as far as I can recall.
rebb, agreed! It does seem to get a bit confusing when your looking for a clear definition.
jackbanditdude01 Ahh I should have also said that faces are calculated as individual surface area’s so if you triangulate a quad poly it will become two faces.
If I understood what you wrote, you said you exported a model from 3dsmax that had 17000 polygons. When you brought it into blender and checked the count of faces it was 34000. Assuming that all the polygons are quads (quads are two triangles), it would be safe to say that max was counting quads (polys) only instead of all the triangles (tris for short). When you brought that model into Blender it’s counting all the triangles and not just the quads normally refered as polys by some. Different software will refer to triangles as tris or as faces which is what it sound like what blender is doing from reading your post. Further more editable mesh in Max refers to faces (quads) as two triangles. You can check this when you go into face subobject mode with editable mesh. It has vert, tris, face, edge, border and element mode. So if you want to see want I mean inside of Max make a cube turn it into editable mesh check the polygon count, make sure Max is counting polygons only and see what it tells you. Then turn that box into an editable poly and the polygon counter will say it has half the polygons.
For Max users this was bs introduced with editable poly back in version 4, however other software felt it was important to count triangles, verts, edges, ngons and you guessed it polygons. WTF isn’t polygons the same shit as triangles. In that context it refers to quads but the assholes decided to call it either face or polygons which is just freaking confusing. They should have called it quads, but I guess Autodeks would sue them or they need to be different. Why cause they feel the need to be original, in other words it’s just semantics. I wish they were as anal about making the damn software user friendly and consistent instead of changing every freaking little term to say they are special.
I don’t use Blender so I don’t’ know what they decided to call two triangles. I’m sure they made it sound special. The topic is sort of a sore subject with me because it goes into other things like not being able to turn edges in certain software that claim they target games, etc. But really don’t worry about the polycount thing so much the only thing you need to worry about is that when an employer tells you he needs an object made with polygons they are referring to triangles, but you should ask just to be safe. All you need to know is the subdividing process hates triangles and ngons, ngons are any polygon with more than 4 sides, quads a four sided polygons, tris are triangles, but I hope you guessed that. and all polygons are made of triangles (tris).
Well I hope that makes sense.
That would have made sense, but you got it backwards. It was 17,000 in Blender, 34,000 in 3ds Max. BUT everything you said would make just as much sense if you reversed it. Blender is reading polys, and during conversion, as some other people have said, it converted to tris and it just happened to be that approximately double the polys turned out to be the number of tris. All in all, it seems to me one program read it differently than another, and somewhere along the way, it auto converted.
Thanks everyone for the help.
The reason that is happening is because Max brings in objs as editable mesh, and as I stated earlier it’s showing the true amount of polygons the model has and not just counting quads. If blender has a triangulate function, use it on your object and the polygon count would double provided that the model only had quads. I didn’t know Blender didn’t count triangles as well but I imagine it does, usually these apps show, all sorts of statistics, like face count (quads), verts, edges, uvs, tris.
Blender is reading polys, and during conversion, as some other people have said, it converted to tris and it just happened to be that approximately double the polys turned out to be the number of tris. All in all, it seems to me one program read it differently than another, and somewhere along the way, it auto converted.
Thanks everyone for the help.
There is no discussion here. Only an inconsistency in terminology and functionality betweem separate applications that you seem unable to comprehend. In the context of games and any other realtime application. triangles are what count, and what is counted. I just so happens that a triangle falls under the definition of a face, and a polygon. Here, see for yourself:
polygon : a closed plane figure bounded by straight lines
triangle : a polygon having three sides
face : any of the plane surfaces that bound a geometric solid
It is unfortunate that some DCC tools, that were seemingly developed in 3rd world countries, have managed to mislead you, like so many others, to believe otherwise.
Now for a math lesson. Take one quadrilateral, or quad. That’s a new word, Quad. It means four. It is one 4-sided polygon. Divide that in half from one point to another. You have now 2 triangles. One 4-sided polygon EQUALS two 3-sided polygon. 1 to 2. That’s double. You like milkshakes?
It may be that Blender triangulates OBJs during export by default. That is often encouraged when exporting OBJs to prevent errors when importing to other applications. It may be that Max reads Blender’s OBJ file different, and rebuilds its faces. Max has poor OBJ support that will hopefully be fixed with version 2009, as they have claimed. What happens between Blender and Max makes no difference, because most people here aren’t dumb enough to have that workflow. Their preference isn’t that of torture. For example: XSI provides info on triangles, quads, N-gons, points, etc. all on one stat window. It’s convenient.
And lastly, since you have stated that you are only one month «into this», you have little room to be claiming anything about «intuitive» and «preference» and «experience». These programs are, in fact, only tools, and it is the artists which create the results. But to make these statements, you need more knowledge of what these tools can do for you as an artist. And that takes years of practice using many of the tools available. This is a forum frequented by many who have. And they have found that some programs, over all aspects of design, bring much more ease to their methods. Of these, Blender is rarely mentioned. But it is free, and has all the features a nuclear physicist would love. so high five.