Mesh Slide part 2 – 3d Max SDK + GPU

This entry was posted on Nov 11 2011

As a technical artist, I have worked with Maxscript for a while now and it has been an awesome way to automate repetitive and complex tasks in order to increase the productivity of 3d artists by keeping them focused in the important things. Technical artists make huge effort to keep artists away from boring technical aspects of a production.

However, while Maxscript is quick to learn and to create tools, its use is not suitable for the kind of job that needs high performance and complex calculations. If something like real time mesh deformer is what you need, 3d Max provides you with its lower level software development kit (SDK).

And this is what I wanted to get into to expand my capabilities in the tech art field. Although I have been working with games for a while, the experiments I have been doing with 3d Max SDK are definitely more suitable for VFX on movies production.


Continuing with my first experiments with 3d Max SDK, in this post I will show some of my progress and publish some more details behind my plugin to be. Please have a look at the following video which contains a compilation of my progress.

Low performance with high poly meshes was one of the problems I faced when creating my CPU version of the plugin. At that point I thought of using fancier octree algorithms to reduce the plugin computation time or caching the mesh deformation but, very curious I am, I chose going another way instead. I decided to use the code I had at that point and try to adapt it to use the power of GPU processing.

For that I worked with OpenCL framework – ATI version of Nvidia Cuda – which demands you to know about video cards architecture. Basically, the advantage of using GPU against CPU is that GPUs have dozens of stream processors – 1120 in my video card case, an ATI 6870 – while CPUs’ standard is something around 1, 2, 4 or 8*. Using all these computing units is not so trivial. It is needed to manage the parallelization of jobs sent to the GPU.

The OpenCL framework only gives support for basic computations though and things like ‘ray intersect mesh’ functions given for free in the 3d Max SDK had to be written in OpenCL (C like) language**.

In the video above I present the result of my experiment where my plugin runs 10x faster in the GPU with higher poly meshes. The greater the number of computations to be made, the greater the difference becomes.

* More info about OpenCL and video card architecture at OpenCL™ Zone
** Thanks to Tomas Möller and Ben Trumbore for their paper Fast, Minimum Storage Ray/Triangle Intersection

9 Responses to “Mesh Slide part 2 – 3d Max SDK + GPU”

  1. Hi there! Will you make it available publicly? It looks really nice and useful!

  2. Hi There
    I am trying to do a similar effect in my game engine where I want to be able to use one mesh to push into another and leave an impression behind but I cant figure out how to go about detecting the collision and working out the correct direction to push the effected vertices, do you know of any papers or guides that give the very basics of figuring out which direction to move a vertex etc

  3. Hey!

    This is looking oh so handy, cant wait for a public release / demo on this!
    Good job! :)


  4. Super plugins..

  5. Very impressive ! And so useful ! Will this be freeware or commercial ?

  6. Magnifico

  7. Looks very cool! Fast deformers are my soft spot :)

  8. Have you done any more on this fab plugin? Will you make the source code available would be very interested in seeing how it all works.

  1. 1 Trackback(s)

  2. Video Plug-in future Mesh Slide

Post a Comment