Tuesday, November 13, 2012

The shape of things to come: it's a resolution thing


So you want to know what the heck all those resolution buttons are and do.  It depends on the prim shapes you use, first.

For this article, I'll use the box (or cube), cylinder, sphere and torus.


I linked these and added the Object2JoinedMesh script.

First I do Default resolution which is 4/24.


For each of these examples, I created a .dae and imported the .dae to Blender so you could more easily see the mesh and how it looks in 3D.


In Blender, you will see that the mesh is triangulated and this is the way it comes into Second Life.  However, it makes it very difficult to select loops (rows of faces, verts, edges), so we use the Alt-J command (all verts selected on the object(s) in edit mode, and this creates quads wherever possible.  It's just much easier to work with quads for many reasons.

So below is that these four prims look like in Blender (after quadded).

Time for a 3D term:  UV

While our objects are three-dimensional, XYZ, the UVs for meshes get laid out in a two-dimensional format and these are, in turn used as a template that guides us when we texture.  A UV map; a map of the coordinates of the 3D object in a flat 2D way.

When looking at a UV map, you will see rows going across and up/down.  Now mind you, the UVs can end up being rotated and such, but we basically refer to rows going across the UV space as "U" and going up and down vertically as "V"(as demonstrated by the yellow and grey bars on the the box in the image above).

At Default Resolution, 4/24

  • Boxes (known as cubes in some 3D programs) have 12 faces on a U row and 12 on the V rows.  There are four sides around and four sides up and around.  Each side of the cube shows 3 faces on each row U or V.
  • The Cylinder has 24 faces going around in U.  There are three going up in V, if the cap ends are visible, they also have 24 faces.
  • The Sphere has 24 faces going around in U, but only 12 going up in V.
  • The Torus has 24 faces going around in U  and going around in the other direction in V.


At Low Poly Resolution, 2/16
  • Boxes/cubes have 4 faces on U and on V.
  • Cylinders have 16 faces U and 3 on V (the 2 cap ends, if visible, only have 8 faces)
  • Spheres have 16 faces U and 8 V.
  • Torus prims end up with 16 faces U and V.


At Low LOD Resolution, 2/8
  • Boxes/cubes still have four faces on U/V.  This is the minimum number a box can have when all sides are left opaque to generate mesh.
  • Cylinders have 8 faces on U with only one row vertical on V and if the cap ends are visible, they have only four faces.
  • Spheres have 8 faces on U and 4 faces going vertically on V.
  • The torus has 8 faces on U/V.
So we've covered the main resolution buttons, now how about all those plus and minus functions for Straight and Circle.

Straight pertains to prims based on the box.  So box, prism, pyramid and tetrahedron.  Adding or subtracting straight will ignore prims based on circles.


In the following example, the prims were set up with Default.  I then press Straight+1 five times.  In default, if you recall, the U/V rows had 12 faces; 3 faces, in the row, on each side of the box.  I wanted to end up with 32 which meant I needed 5 more faces on each side (4x8=32).

Only the box was affected here; the rest of the prims are based on circles and ignored.
NOTE: Notice that the rows on the cylinder increased in V. This is because this is considered a straight side. It just didn't increase around the circle in U.

Here, below, I added Circle+1 eight times to get 32 faces on the mesh.  Again, notice on the cylinder that this time the increase occured on the U rows where they are defined by the circle.  The straight side remain untouched.  (Mind you, these examples was only for illustration; I wouldn't go above default settings myself.)


Now let's look at how subtracting from the circle changes these prims.  I wanted a pentagon, five sided cylinder, for a table in a lower LOD level mesh I was making.  Using Low Poly resolution makes the cylinder eight sided, so I applied Circle-1 three times to make it five and it worked as expected.  Different prims can have other effects.



So what uses do you have for these.  As mentioned, the most obvious is for lowering the triangle count on your LOD levels.  This is why even using just the Default, LowPoly, and LowLOD buttons will work for your high, medium and low LOD levels in the Uploader.  Now, armed with how the rest of the buttons work, you can experiment and get lower if you need to.

Always check your results in Blender, another 3D program or Aditi, the beta grid.

Knowledge is power.  More power to ya!

Happy Meshing!
~ele

No comments:

Post a Comment