You can get Voxel Farm now. For more information click here.

Friday, June 17, 2011

Mesh re-projection, a screenshot

This screenshot illustrates another key step in the world generation workflow:


As you can see I threw in the silhouette of a gentleman so proportions can be better appreciated.

The world geometry is initially generated in very high detail. I want this to run on low-end devices, so using this geometry in the client is out of the question. The high detail geometry is simplified until a certain thereshold of polygons per volume is met. For this I use simplification based on Quadratic Error Metrics, but a flavor of my own. I tested several of the mesh optimization codes out there, not one could simplify the huge meshes I was generating fast enough. I plan to cover that side of the story in a future post.

Then the high resolution geometry is projected onto the low resolution geometry, so a lot of the detail is preserved in form of textures. I will cover this method in the future too, but it is very similar to the one described in GPU Gems 3, Chapter 22.

As as result, an entire world scene can be rendered with a very small number of polygons, which will come very handy I'm sure.

6 comments:

  1. Are you using normal map to keep details, and manage to keep uv texture coordinates already ?

    ReplyDelete
  2. @CuMu: The projection phase outputs only one thing: a 2D map that given a point of UV coordinates in the detailed mesh will tell you the UV coordinates for the corresponding point in the low density mesh.

    Using this map it is possible to produce specific maps like normals, diffuse light, ambient light, really anything you want to project from the high frequency mesh.

    ReplyDelete
  3. how do you achieve the uvmaps ? ive been essentially creating an art workflow for creating really complex level elements from extremely high res voxel/polygon data. its easy to go about the decimation process and in zbrush, the zproject brush is absolutely crucial for this, but anyways the biggest stumbling block so far has always been uv's for texturing so im curious how you do uv's for your meshes.

    i recently had to unwrap a 150k object with an extremely complex cave system, was *not* fun, and every autounwrapping tool i tried to use crashed and burned on something that big.

    anyways your stuff as always looks great, i almost wish you would release just a demo tool that would allow artists to be able to play with the engine and make some pretty stuff inside of it !

    -planaria

    ReplyDelete
  4. @Planaria: I'm not using any tools for the UV unwrapping, I cannot really recommend you anything.

    I implemented a method from scratch, based on one described in the book Texturing and Modeling: A procedural approach. I don't remember which chapter exactly. (I intend to post about it in the short future.) It is a method for packing scalene triangles without distortion. It produces a soup of triangles that would be very hard for any artist to paint on, but again, this is about bypassing the artist.

    ReplyDelete
  5. Completely unrelated to the post at hand, but anyways: How are your textures generated? I think they look incredible, but you haven't done a post on them yet(i think)

    ReplyDelete
  6. @AyeGill: Thanks. There is nothing really special about how I generate textures. It is multiple layers, each layer has some form of masking, in most cases based on the surface angle and some perlin noise. A post on this method is due for sure, but expect no surprises.

    ReplyDelete

There was an error in this gadget