See what's going on with flipcode!




 


Submitted by , posted on 17 March 2001



Image Description, by


These are some screenshots from an engine I've been working on for over a year called Geek. This engine dynamically generates a mesh from a 3D voxel data structure. The voxel structure used to create these images was 128x128x128. I plan on supporting a voxel structure of 65536x65536x65536. I have a long way to go before I can call it complete. I plan on adding a portal basted indoor engine also. A friend of mine is writing a scripting language for it. Check out the website for more details.

Going clockwise, the top right picture shows some terrain that fades into fog. The next image is a wireframe showing LOD in action. Note the more distant terrain has fewer triangles. My cost function for generating the LOD sucks but will be improved soon The next image is what I like to call "green swiss cheese". This model is created using a perlin noise function. The final image shows real-time editing. (Still not as real-time as I would like). When you modify the voxel structure all affected meshes and textures are recalculated allowing you to see your changes immediately.

The engine and the editor are the same. My goal is to have an engine that allows for real-time map deformation. Imagine throwing a bomb and find a hole in the ground where it landed, along with being able to see the grass on the edge and the dirt under the grass from where the bomb exploded. Well that's my goal anyway, hope I can get that far. Current features include:
  • Underlying data structure are voxels contained in an octree.
  • Dynamically Generated Mesh, Textures, and Texture coordinates.
  • Terrain doesn't have to be flat. It can have holes and caves in it easily.
  • Allows modifying of the voxels which in turn causes all affected meshes to be recalculated.
  • Real time editing (this is still slow, but hasn't been optimized yet)
  • Early LOD, as you move farther away I use lower resolution meshes.
  • Saving and Loading of all data structures.
  • Preliminary console implemented.
  • Implemented in C++ and OpenGL under Linux
  • Currently only tested on TNT2 and Geforce2MX
  • Multithreaded (Except can't run in MT mode on SMP machines running NVidia drivers, bug in drivers).
  • Sky sphere has been implented.
  • I'm sure there is more, but I don't remember.
  • You can download the linux executable (Mandrake 7.2) and see more screenshots at http://home.jam.rr.com/jstrohm/projects.html.

    I'm most proud of the dynamic texturing. I can take a OpenGL texture and generate texture coordinates to wrap it around an arbitrary surface. I'm not talking about projection mapping, but I am able to give every triangle it's own area of the texture image and still generate triangle strips that can quickly be fed thru OpenGL. On my TNT2 I can get between 1 and 1.5 million triangles a second. Once some of the driver features that are available under windows for the Geforce2 are implemented under Linux I should be able to get 5-8 million triangles a second on a Geforce2MX.

    Thanks for any comments and constructive criticism,

    Jack Strohm



    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]


     


    Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
    Please read our Terms, Conditions, and Privacy information.