An ICEd Polygonise Operator

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…).

About these ads

15 Responses to An ICEd Polygonise Operator

  1. Fantastic, and so fast. Nice one.

    That’s a great idea BTW to use the multi-threading capabilities of ICE. Saved yourself heaps of work too! Would’ve probably taken at least a couple of weeks to get something running as fast as that.

  2. Very cool. Do you plan to release this in the future?

  3. I think I should release it, but I don’t know precisely when. I would like to add some features.
    I hope very soon !

  4. great job using ICE to do some heavy lifting for you. The abstraction that you have done by using ICE for this part allows your partitioning code to be swapped when an improved one is made. Either by some third-party, from Softimage themselves, or hell maybe one day when you feel confident in creating your own.

  5. Hi Steven,

    Exactly. Why re-inventing the wheel when we can use the ICE power ;) .
    The other advantage is that you can use it for any “iso-surface” work. For example, you can create a gradient using Y points position to feed the scalar field and then you get a polygonised Y plane. Ok…not very interesting stuff, just an example :p but no need to re-code the custom operator ! But much more interesting shapes could be done using a 3D superformula !
    :) .

  6. in fact Softimage should take a hint from this project of yours. generalized surfacing tools ( a la houdini? ) for effects work.

  7. Yes, I use this kind of tool very often in Houdini. Softimage really need something like the iso-offset and the fluid-surface nodes !

  8. Did you try readin the density field and trying to build it from that?
    Just because it’s already a density function so you might be able to use it.
    If you want the raw distance field between particles you can try to get SPH_q and SPH_q2 which is the secondary kernel.
    Give it a try!

  9. Pingback: Open Sourced ICEd Polygonise Operator. « Frenchdog’s Weblog

  10. Hi Thiago,

    Thanks for the info about your SPH attributes. I will try it ! And thanks for the nice words on your blog last post !

    I just post some news here : http://frenchdog.wordpress.com/2009/07/15/open-sourced-iced-polygonise-operator/

    I hope my readers will be interested :) .

  11. Amazing job… I hope you can get some more spare time :D

  12. Great stuff Guillaume. Open this sucker up! :)

  13. Awesome!

    I can ‘t wait to try it.

    Thank you so much for doing this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s