View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# [Open source project] Voxel based mesh generator

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

3 replies to this topic

### #1LordOfTheBytes  Members

Posted 08 October 2012 - 10:08 AM

Hi,
I want to introduce a new open source tool and I hope that this is the right forum. vBaum is a voxel based generator for procedural geometry. vBaum stands for "voxel-Baum", which means "voxel-tree" in english. This primaly relates to the underlying data structure, but we also plan to generate tree meshes with it later. The core algorithms are written in C++ for maximum performance. It supports various geometric figures, noise, splines, boolean operations, extrusion and more. The created geometry can be exported in the .obj and .stl file formats using the marching cubes algorithm and smoothing. A python interface is provided that enables users to quickly construct arbitrary geometry. Let me give an example:

This was created with vBaum (notice the self intersection) and rendered in Ogre. It was created with the following python script:
#!/bin/python
from vBaum import *
from math import *
scale = 5
splinePoints = [Vector3(0,5,0)*scale,
Vector3(3,4,20)*scale,
Vector3(10,5,25)*scale,
Vector3(20,15,15)*scale,
Vector3(25,15,0)*scale,
Vector3(5,5,0)*scale,
Vector3(-10,-10,5)*scale,
Vector3(-10,25,10)*scale,
Vector3(20,-5,10)*scale,
Vector3(16,5,-10)*scale]

spline = Spline(splinePoints, True)  #create a closed spline from the points
knot = spline.extrude(Sphere(20)) #this will thicken the spline, creating a torus knot
knot.exportAsObj("knot", 50) #file will be names knot.obj and a smooth with 50 iterations will be applied

The next example is a bit more complex but the python script still has less than 80 lines. The mesh was rendered with Blender:

The next example shows that vBaum can also be used to generate less abstract objects. It was rendered using Ogre:

Usage: For windows 64 bit users we provide a precompiled binary along with some example scripts, in this case you only need python 3 to get started. If you want to build vBaum from source you need boost (because of boost::python) and the corresponding python version. vBaum was developed, compiled and tested under both windows and linux. Side note: The C++ implementation was developed by me and a friend in only one week of coding fun, so you will not find many commentaries. You can find some background information here. If you create something cool using vBaum please post some screenshots!
Known issues:
• Spline creation sometimes leads to an endless loop. However this problem occured rarely, we are looking into it. Our provided example scripts should run fine.
• Memory consumption: Creating large geometry can lead to memory and performance problems. We spent a lot of time optimising it, but it is still not perfect.

### #2MrOMGWTF  Members

Posted 20 October 2012 - 04:38 AM

C:\Python33>python knot.py
Traceback (most recent call last):
File "knot.py", line 2, in <module>
from vBaum import *
ImportError: DLL load failed: %1 is not a valid Win32 application.

ummm

### #3JTippetts  Moderators

Posted 20 October 2012 - 08:42 AM

C:\Python33>python knot.py
Traceback (most recent call last):
File "knot.py", line 2, in <module>
from vBaum import *
ImportError: DLL load failed: %1 is not a valid Win32 application.

ummm

Looks like the pre-compiled binary is 64-bit, but your python is only 32-bit.

@LordOfTheBytes: Looks pretty cool, I'm going to check it out.

Edited by JTippetts, 20 October 2012 - 08:46 AM.

### #4MrOMGWTF  Members

Posted 20 October 2012 - 10:48 AM

C:\Python33>python knot.py
Traceback (most recent call last):
File "knot.py", line 2, in <module>
from vBaum import *
ImportError: DLL load failed: %1 is not a valid Win32 application.

ummm

Looks like the pre-compiled binary is 64-bit, but your python is only 32-bit.

@LordOfTheBytes: Looks pretty cool, I'm going to check it out.

Yep. That solved the problem
Thanks!

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.