Daedalus
11-10-2002, 09:47 PM
The vertex editor in UEd1&2 is crap. You can only move vertices, but not delete any, so you can't merge polys together.
I don't understand why terrain made with TerraEdit consists of so many triangle polys, or why the 2D shape editor in UEd produces so many triangle polys on round shapes.
I mean if you have a 1 square poly (shape) then you don't need to split it into 2 triangle polys. At some certain situations you have to, but not all the time imo. And in some situations it is totally unnecessary.
If you don't know what I'm talking about then import these 2 following brushes into your map:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Begin PolyList
Begin Polygon
Origin -00192.000000,+00064.000000,+00000.000000
Normal +00000.000000,+00000.000000,-00001.000000
TextureU +00000.000000,-00001.000000,+00000.000000
TextureV -00001.000000,+00000.000000,+00000.000000
Vertex -00192.000000,+00064.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
End Polygon
Begin Polygon
Origin +00168.000000,+00056.000000,+00016.000000
Normal +00000.000000,+00000.000000,+00001.000000
TextureU +00000.000000,-00001.000000,+00000.000000
TextureV +00001.000000,+00000.000000,+00000.000000
Vertex +00168.000000,+00056.000000,+00016.000000
Vertex -00168.000000,+00056.000000,+00016.000000
Vertex -00112.000000,-00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00128.000000,-00064.000000,+00000.000000
Normal +00000.000000,+00000.000000,-00001.000000
TextureU +00000.371391,-00000.928477,+00000.000000
TextureV -00000.928477,-00000.371391,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex +00128.000000,-00064.000000,+00000.000000
End Polygon
Begin Polygon
Origin +00168.000000,+00056.000000,+00016.000000
Normal +00000.000000,+00000.000000,+00001.000000
TextureU +00000.371391,-00000.928477,+00000.000000
TextureV +00000.928477,+00000.371391,+00000.000000
Vertex +00168.000000,+00056.000000,+00016.000000
Vertex -00112.000000,-00056.000000,+00016.000000
Vertex +00112.000000,-00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00192.000000,+00064.000000,+00000.000000
Normal +00000.000000,+00000.894427,+00000.447214
TextureU +00000.000000,-00000.447214,+00000.894427
TextureV +00001.000000,+00000.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex -00192.000000,+00064.000000,+00000.000000
Vertex -00168.000000,+00056.000000,+00016.000000
Vertex +00168.000000,+00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00192.000000,+00064.000000,+00000.000000
Normal -00000.596285,-00000.298142,+00000.745356
TextureU +00000.666667,+00000.333333,+00000.666667
TextureV -00000.447214,+00000.894427,+00000.000000
Vertex -00192.000000,+00064.000000,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
Vertex -00112.000000,-00056.000000,+00016.000000
Vertex -00168.000000,+00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00128.000000,-00064.000000,+00000.000000
Normal +00000.000000,-00000.894427,+00000.447214
TextureU +00000.000000,+00000.447214,+00000.894427
TextureV -00001.000000,+00000.000000,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
Vertex +00128.000000,-00064.000000,+00000.000000
Vertex +00112.000000,-00056.000000,+00016.000000
Vertex -00112.000000,-00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00128.000000,-00064.000000,+00000.000000
Normal +00000.596285,-00000.298142,+00000.745356
TextureU -00000.666667,+00000.333333,+00000.666667
TextureV -00000.447214,-00000.894427,+00000.000000
Vertex +00128.000000,-00064.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex +00168.000000,+00056.000000,+00016.000000
Vertex +00112.000000,-00056.000000,+00016.000000
End Polygon
End PolyList[/code]</blockquote><font size="2" face="Verdana, Arial">^This brush I've created with the 2D shape editor in UEd (Extrude to Bevel), part of a UT1 prefab mesh. It consists of 8 polys (4 squares and 4 triangles). The 4 triangles in that brush above (the ones with the 3 vertices only) are total unnecessary for my purpose and just waste space and render time (in game).
Since there's no option or tool to edit this, I deleted the 4 triangles and merged them together into squares, saving 2 polys in effect and keeping my geometry clean. I did this with a simple text editor.
Here's the optimized brush:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Begin PolyList
Begin Polygon
Origin -00064.000000,-00192.000000,+00000.000000
Normal +00000.000000,+00000.000000,-00001.000000
TextureU +00001.000000,+00000.000000,+00000.000000
TextureV +00000.000000,-00001.000000,+00000.000000
Vertex -00064.000000,-00192.000000,+00000.000000
Vertex -00064.000000,+00192.000000,+00000.000000
Vertex +00064.000000,+00128.000000,+00000.000000
Vertex +00064.000000,-00128.000000,+00000.000000
End Polygon
Begin Polygon
Origin -00056.000000,+00168.000000,+00016.000000
Normal +00000.000000,+00000.000000,+00001.000000
TextureU +00001.000000,+00000.000000,+00000.000000
TextureV +00000.000000,+00001.000000,+00000.000000
Vertex -00056.000000,+00168.000000,+00016.000000
Vertex -00056.000000,-00168.000000,+00016.000000
Vertex +00056.000000,-00112.000000,+00016.000000
Vertex +00056.000000,+00112.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00064.000000,+00128.000000,+00000.000000
Normal +00000.298142,+00000.596285,+00000.745356
TextureU -00000.333333,-00000.666667,+00000.666667
TextureV +00000.894427,-00000.447214,+00000.000000
Vertex +00064.000000,+00128.000000,+00000.000000
Vertex -00064.000000,+00192.000000,+00000.000000
Vertex -00056.000000,+00168.000000,+00016.000000
Vertex +00056.000000,+00112.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00064.000000,+00192.000000,+00000.000000
Normal -00000.894427,+00000.000000,+00000.447214
TextureU +00000.447214,+00000.000000,+00000.894427
TextureV +00000.000000,+00001.000000,+00000.000000
Vertex -00064.000000,+00192.000000,+00000.000000
Vertex -00064.000000,-00192.000000,+00000.000000
Vertex -00056.000000,-00168.000000,+00016.000000
Vertex -00056.000000,+00168.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00064.000000,-00192.000000,+00000.000000
Normal +00000.298142,-00000.596285,+00000.745356
TextureU -00000.333333,+00000.666667,+00000.666667
TextureV -00000.894427,-00000.447214,+00000.000000
Vertex -00064.000000,-00192.000000,+00000.000000
Vertex +00064.000000,-00128.000000,+00000.000000
Vertex +00056.000000,-00112.000000,+00016.000000
Vertex -00056.000000,-00168.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00064.000000,-00128.000000,+00000.000000
Normal +00000.894427,+00000.000000,+00000.447214
TextureU -00000.447214,+00000.000000,+00000.894427
TextureV +00000.000000,-00001.000000,+00000.000000
Vertex +00064.000000,-00128.000000,+00000.000000
Vertex +00064.000000,+00128.000000,+00000.000000
Vertex +00056.000000,+00112.000000,+00016.000000
Vertex +00056.000000,-00112.000000,+00016.000000
End Polygon
End PolyList[/code]</blockquote><font size="2" face="Verdana, Arial">^This edited brush is the same like the first one, but with one exception: the 4 triangle polys are deleted and merged into 2 square polys, resulting in a total polycount of 6 now. images/icons/smile.gif
Compare those 2 brushes, if you like, and import them into your map. Paste each of the blocks above into a file, call them prefab1.t3d and prefab2.t3d for example. Then in UEd click on menu "Brush/Import..." to import each of the brushes. Your red builder brush will be replaced each time. Use Perspective view to see their vertices and nodes, you can see how those 2 brushes differ. Oh, and don't worry about the rotation (it's the same brush).
So much for this demonstration. I really miss an option in UEd or a tool with which you can merge polys together. Doing this by hand on such small brush like that above costed me so much time. Now imagine I'd need to edit a terrain brush consisting of 2000+ polys. IMPOSSIBLE! images/icons/frown.gif
Some smart programmer should code a poly editor which visualizes t3d exported brush files and lets the user move/delete vertices and nodes... THAT'S the definitive tool I'm waiting for.....
I don't understand why terrain made with TerraEdit consists of so many triangle polys, or why the 2D shape editor in UEd produces so many triangle polys on round shapes.
I mean if you have a 1 square poly (shape) then you don't need to split it into 2 triangle polys. At some certain situations you have to, but not all the time imo. And in some situations it is totally unnecessary.
If you don't know what I'm talking about then import these 2 following brushes into your map:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Begin PolyList
Begin Polygon
Origin -00192.000000,+00064.000000,+00000.000000
Normal +00000.000000,+00000.000000,-00001.000000
TextureU +00000.000000,-00001.000000,+00000.000000
TextureV -00001.000000,+00000.000000,+00000.000000
Vertex -00192.000000,+00064.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
End Polygon
Begin Polygon
Origin +00168.000000,+00056.000000,+00016.000000
Normal +00000.000000,+00000.000000,+00001.000000
TextureU +00000.000000,-00001.000000,+00000.000000
TextureV +00001.000000,+00000.000000,+00000.000000
Vertex +00168.000000,+00056.000000,+00016.000000
Vertex -00168.000000,+00056.000000,+00016.000000
Vertex -00112.000000,-00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00128.000000,-00064.000000,+00000.000000
Normal +00000.000000,+00000.000000,-00001.000000
TextureU +00000.371391,-00000.928477,+00000.000000
TextureV -00000.928477,-00000.371391,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex +00128.000000,-00064.000000,+00000.000000
End Polygon
Begin Polygon
Origin +00168.000000,+00056.000000,+00016.000000
Normal +00000.000000,+00000.000000,+00001.000000
TextureU +00000.371391,-00000.928477,+00000.000000
TextureV +00000.928477,+00000.371391,+00000.000000
Vertex +00168.000000,+00056.000000,+00016.000000
Vertex -00112.000000,-00056.000000,+00016.000000
Vertex +00112.000000,-00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00192.000000,+00064.000000,+00000.000000
Normal +00000.000000,+00000.894427,+00000.447214
TextureU +00000.000000,-00000.447214,+00000.894427
TextureV +00001.000000,+00000.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex -00192.000000,+00064.000000,+00000.000000
Vertex -00168.000000,+00056.000000,+00016.000000
Vertex +00168.000000,+00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00192.000000,+00064.000000,+00000.000000
Normal -00000.596285,-00000.298142,+00000.745356
TextureU +00000.666667,+00000.333333,+00000.666667
TextureV -00000.447214,+00000.894427,+00000.000000
Vertex -00192.000000,+00064.000000,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
Vertex -00112.000000,-00056.000000,+00016.000000
Vertex -00168.000000,+00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00128.000000,-00064.000000,+00000.000000
Normal +00000.000000,-00000.894427,+00000.447214
TextureU +00000.000000,+00000.447214,+00000.894427
TextureV -00001.000000,+00000.000000,+00000.000000
Vertex -00128.000000,-00064.000000,+00000.000000
Vertex +00128.000000,-00064.000000,+00000.000000
Vertex +00112.000000,-00056.000000,+00016.000000
Vertex -00112.000000,-00056.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00128.000000,-00064.000000,+00000.000000
Normal +00000.596285,-00000.298142,+00000.745356
TextureU -00000.666667,+00000.333333,+00000.666667
TextureV -00000.447214,-00000.894427,+00000.000000
Vertex +00128.000000,-00064.000000,+00000.000000
Vertex +00192.000000,+00064.000000,+00000.000000
Vertex +00168.000000,+00056.000000,+00016.000000
Vertex +00112.000000,-00056.000000,+00016.000000
End Polygon
End PolyList[/code]</blockquote><font size="2" face="Verdana, Arial">^This brush I've created with the 2D shape editor in UEd (Extrude to Bevel), part of a UT1 prefab mesh. It consists of 8 polys (4 squares and 4 triangles). The 4 triangles in that brush above (the ones with the 3 vertices only) are total unnecessary for my purpose and just waste space and render time (in game).
Since there's no option or tool to edit this, I deleted the 4 triangles and merged them together into squares, saving 2 polys in effect and keeping my geometry clean. I did this with a simple text editor.
Here's the optimized brush:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Begin PolyList
Begin Polygon
Origin -00064.000000,-00192.000000,+00000.000000
Normal +00000.000000,+00000.000000,-00001.000000
TextureU +00001.000000,+00000.000000,+00000.000000
TextureV +00000.000000,-00001.000000,+00000.000000
Vertex -00064.000000,-00192.000000,+00000.000000
Vertex -00064.000000,+00192.000000,+00000.000000
Vertex +00064.000000,+00128.000000,+00000.000000
Vertex +00064.000000,-00128.000000,+00000.000000
End Polygon
Begin Polygon
Origin -00056.000000,+00168.000000,+00016.000000
Normal +00000.000000,+00000.000000,+00001.000000
TextureU +00001.000000,+00000.000000,+00000.000000
TextureV +00000.000000,+00001.000000,+00000.000000
Vertex -00056.000000,+00168.000000,+00016.000000
Vertex -00056.000000,-00168.000000,+00016.000000
Vertex +00056.000000,-00112.000000,+00016.000000
Vertex +00056.000000,+00112.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00064.000000,+00128.000000,+00000.000000
Normal +00000.298142,+00000.596285,+00000.745356
TextureU -00000.333333,-00000.666667,+00000.666667
TextureV +00000.894427,-00000.447214,+00000.000000
Vertex +00064.000000,+00128.000000,+00000.000000
Vertex -00064.000000,+00192.000000,+00000.000000
Vertex -00056.000000,+00168.000000,+00016.000000
Vertex +00056.000000,+00112.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00064.000000,+00192.000000,+00000.000000
Normal -00000.894427,+00000.000000,+00000.447214
TextureU +00000.447214,+00000.000000,+00000.894427
TextureV +00000.000000,+00001.000000,+00000.000000
Vertex -00064.000000,+00192.000000,+00000.000000
Vertex -00064.000000,-00192.000000,+00000.000000
Vertex -00056.000000,-00168.000000,+00016.000000
Vertex -00056.000000,+00168.000000,+00016.000000
End Polygon
Begin Polygon
Origin -00064.000000,-00192.000000,+00000.000000
Normal +00000.298142,-00000.596285,+00000.745356
TextureU -00000.333333,+00000.666667,+00000.666667
TextureV -00000.894427,-00000.447214,+00000.000000
Vertex -00064.000000,-00192.000000,+00000.000000
Vertex +00064.000000,-00128.000000,+00000.000000
Vertex +00056.000000,-00112.000000,+00016.000000
Vertex -00056.000000,-00168.000000,+00016.000000
End Polygon
Begin Polygon
Origin +00064.000000,-00128.000000,+00000.000000
Normal +00000.894427,+00000.000000,+00000.447214
TextureU -00000.447214,+00000.000000,+00000.894427
TextureV +00000.000000,-00001.000000,+00000.000000
Vertex +00064.000000,-00128.000000,+00000.000000
Vertex +00064.000000,+00128.000000,+00000.000000
Vertex +00056.000000,+00112.000000,+00016.000000
Vertex +00056.000000,-00112.000000,+00016.000000
End Polygon
End PolyList[/code]</blockquote><font size="2" face="Verdana, Arial">^This edited brush is the same like the first one, but with one exception: the 4 triangle polys are deleted and merged into 2 square polys, resulting in a total polycount of 6 now. images/icons/smile.gif
Compare those 2 brushes, if you like, and import them into your map. Paste each of the blocks above into a file, call them prefab1.t3d and prefab2.t3d for example. Then in UEd click on menu "Brush/Import..." to import each of the brushes. Your red builder brush will be replaced each time. Use Perspective view to see their vertices and nodes, you can see how those 2 brushes differ. Oh, and don't worry about the rotation (it's the same brush).
So much for this demonstration. I really miss an option in UEd or a tool with which you can merge polys together. Doing this by hand on such small brush like that above costed me so much time. Now imagine I'd need to edit a terrain brush consisting of 2000+ polys. IMPOSSIBLE! images/icons/frown.gif
Some smart programmer should code a poly editor which visualizes t3d exported brush files and lets the user move/delete vertices and nodes... THAT'S the definitive tool I'm waiting for.....