Mesh Generation Basics
Contents
- 1 Introduction
- 2 First Steps
- 3 The Volume Generator Panel
- 4 Overview of the Volume and Mesh Export Controls
- 5 The Box Algorithm
- 6 The Exporting process
- 7 The Density Algorithm
- 8 The Gaussian Density Algorithm
- 9 The Density Threshold parameter
- 10 Closing the Volume Generator
- 11 Using Meshlab with the generated meshes
- 12 The Laplacian Smooth filter on Meshlab
- 13 Lowering the face counts with Meshlab Quadric Egde Collapse Decimation Filter
- 14 Exporting the result as OBJ
- 15 The Final result
Introduction
This tutorial is a tentative start for exporting meshes using Incendia Expanded. Consider the fact that this version of Incendia is experimental and probably some elements of the tutorial will change on the future.
First Steps
This tutorial requires a parameter file that you can download from here:IFS Shell
- Use the Load Parameter Button to load the provided parameter file (any fractal can work for this tutorial, but the results can vary).
- Go to the Extra tab
The Volume Generator Panel
Let's see an overview of the basic controls:
- The Volumetric Resolution, This control defines the resolution of the volumetric matrix. For this tutorial, select the first option (200x200x200x voxels).
- The Start Volumetric Render button, here is on where the volume calculation starts. Also, several other options will become visible once you start the calculation.
- Fill Hollow Baseshapes when possible, This option is not covered by this tutorial, but its used for filling baseshapes that are simple shells, such as the sphere. This lowers drastically the triangle counts of the output meshes.
Press the Start Volumetric Render button to continue with the tutorial.
Overview of the Volume and Mesh Export Controls
Let's see a more complete overview of the Volume and Mesh generation options:
- The Close the Volumetric Mode, this button stops the volume generator and returns Incendia to the standard mode.
- The Mesh Algorithm control, This control shows three different mesh generations algorithms that you can use for exporting meshes. All three vary in quality and in speed.
- The Density Threshold slider. This slider let you define how thin or thick the mesh walls will be, later in the tutorial you will see the effects of this option.
- The Export Volume as STL Mesh button, Here is on where the actual mesh export happens, once you press this button, Incendia will ask for a filename and a directory and will begin to export the mesh from the volumetric matrix.
- The Render Wheel, If you have pressed the Start Volumetric Render button, this wheel will be turning meaning that the volumetric calculation is in process, it only stops if you start a mesh export or close the volumetric mode.
- The Preview Panel. Still I haven't devised a way to produce a real-time preview of the volumetric generation, so please, just ignore this. Generating a fractal volume will take less than a minute, so actually you didn't need it. I will try to make a realtime preview for the next iteration of Incendia Expanded.
The Box Algorithm
- Select the Boxes option in the Mesh Algorithm. The Boxes algorithm is the simplest and fastest of the three presented algorithm, it basically checks if a voxel is occupied or not and the mesh is generated without any interpolation (by using the Marching Cubes Algorithm).
- Press the Export Volume as STL Mesh button to start the the mesh output. Incendia will ask for a filename and for a directory. Use "Tut1.stl" as a filename.
The Exporting process
- When Incendia is exporting the mesh, a percent counter becomes visible and begins to fill, wait it to be full.
The Density Algorithm
- Once the mesh export is finished, select the Density option in the Mesh Algorithm control. The Density algorithm performs a simple averaging for every empty voxel from the surrounding voxels. The speed is slower than the Boxes algorithm but the quality of the resulting meshes is very good.
- Press the Export Volume as STL Mesh button to start the the mesh output. Incendia will ask for a filename and for a directory. Please use another filename "Tut2.stl", so later you can see differences between the algorithms. Is important to note the fact that you didn't need to recalculate the volume for every mesh export that you execute.
- Wait for the percent counter until it is filled.
The Gaussian Density Algorithm
- Once the mesh export is finished, select the Gaussian Density option in the Mesh Algorithm control. The Gaussian Density algorithm performs a complex gaussian averaging for every empty voxel from the surrounding voxels. The speed is very slo but the cuality of the meshes is very good.
- Press the Export Volume as STL Mesh button to start the the mesh output. Incendia will ask for a filename and for a directory. Please use another filename (Tut3.stl for example).
- Wait for the percent counter until it is filled.
The Density Threshold parameter
You can skip this section tutorial unless you want the effects of the Density Threshold parameter over the mesh generation algorithm.
- Change the Density Threshold parameter to a lower value.
- Select the Boxes option.
- Export the meshes (use different filenames than the previous "Tut1.stl", "Tut2.stl" and "Tut3.stl" since these are are alredy used for the tutorial) and wait for it to finish, once its done, repeat with the Density and the Gaussian Density options.
Closing the Volume Generator
- Press this button in order to return to Incendia normal render mode. This also erases the content of the volumetric matrix.
Using Meshlab with the generated meshes
MeshLab is an open source program dedicated to the operation of complex 3D meshes. Since it is also very easy to use, I have selected it for this 3D mesh tutorial. You can download MeshLab from Sourceforge.
Once you have downloaded and installed MeshLab, you can open the three stl files that you have created with this tutorial.
Here is a preview of the three files:
As you already noticed, there are big differences between the three mesh generation algorithms.
The Laplacian Smooth filter on Meshlab
In MeshLab, theres a wide array of filters for operating with meshes. One of these filters is the Laplacian Smooth Filter, that is used for smoothing some very noisy meshes:
On Incendia Mesh Export algorithms, the Box algorithm produces the most noisy meshes, since its stores the actual content of the volumetric matrix. By using MeshLab Laplacian filter, you can get very good results from these meshes.
- Select the Filter Tab on MeshLab.
- On the Filter Tab, select the Smoothing, Fairing and Deformation option.
- And then select the Laplacian Smooth option.
Now you get the Laplacian Smooth windows:
- Use the default values, higher the number of steps, smoother the details. Press the Apply button.
Once MeshLab finish the filter, your mesh will looks like:
Lowering the face counts with Meshlab Quadric Egde Collapse Decimation Filter
Fractal Meshes tend to the very large, since most fractals are infinitely detailed. Most 3D programs can't handle very big meshes and in many cases is necessary to reduce the triangle counts.
MeshLab has a filter called "Quadric Egde Collapse Decimation" that I have found useful for reducing the face count of large meshes.
This tutorial uses the mesh produced by the Gaussian Density filter "Tut3.stl"
- Select the Filter tab.
- On the Filter tab, select the Remeshing, Simplification and Reconstruction option.
- Then, select the Quadric Egde Collapse Decimation option.
Now you get the Quadric Egde Collapse Decimation windows:
- Change the Target Number of Faces to 7000 and press the Apply button.
Exporting the result as OBJ
Some 3D programs, such as Bryce, didn't support STL files. You can use MeshLab to export the mesh as a OBJ file (Bryce works with that type of meshes).
- In the File Tab, select the Save As option and in the file type, select the Alias Wavefront Object (.OBJ)