Frenchdog’s Weblog

An ICEd Polygonise Operator

June 29, 2009 · 15 Comments

Hi,
If you have read my previous posts, you are aware of the speed problem of my first polygonise operator. Processing a scalar field using a
distance like formula is very slow even on a medium point cloud !
So I spend some time learning how to implement an octree structure in my C++ plugin. It was really interesting but then I realised it was a serious task, a real developer job in fact.  As I do those search in my (short) spare time, I was rather upset by the amount of time before I can get something working.   And to be honest, I was not very confident on writing enough efficient code for this task.
So I decided to use ICE for the big bottleneck of the polygonise operator, the processing a scalar field in a voxel grid.  I build two ICEtrees (voxel center and corners) to store all the needed voxels data.

Hi,

If you have read my previous posts, you are aware of the speed problem of my first polygonise operator. Processing a scalar field using a
distance like formula is very slow even on a medium point cloud !

So I spend some time learning how to implement an octree structure in my C++ plugin. It was really interesting but then I realised it was a serious task, a real developper job in fact.  As I do those search in my (short) spare time, I was rather upset by the amount of time before I can get something working.   And to be honest, I was not very confident on writing enough efficient code for this task !

So I choosed to use ICE for the big bottleneck of the polygonise operator, the processing a scalar field in a voxel grid.  I build two ICEtrees (voxel center and corners) to store all the needed voxels data.

ICE_SPH_Polygonised_02

It is easy to get the distance between each voxels corners and an other particle cloud using  just an ICEtree. And it is FAST !
The other advantage is that the formula for the scalar field is open. You can plug any super formula you want as far as it returns a scalar value :) .
ICE_SPH_Polygonised_03

The custom operator job is to read the scalar field, send it to the marching cube function and then use the result to build the triangles.
ICE_SPH_Polygonised_01

Here is a screen capture on my old laptop (XP32bit,  Intel core duo 1.83GHz and a GEFORCE GO 7600…).

Categories: dev · xsi

15 responses so far ↓

Leave a Comment