giannic / melt

Physically-based melting simulation
11 stars 4 forks source link

decide how to voxelize primitives and loaded objs #5

Closed giannic closed 12 years ago

giannic commented 12 years ago

Can we use a voxelizing library? How should we represent a voxel class?

giannic commented 12 years ago

cube: count the number of faces (out of 6) that is in contact with air by checking boundaries when constructing. when a particle becomes liquid, decrement number of non-open faces for neighbors.

sphere: if within epsilon of radius, then it is on the surface if less than radius, then it is an internal voxel else it is not part of the object

arbitrary meshes: load full voxel and chip away at it from all 6 faces. will not capture models that has fully encompassed hollow volume

giannic commented 12 years ago

currently using a voxelizer to convert .obj files to .voxel files then, loading .voxel file with code inspired by Terry's project