Back Grid volume renderer script for ICE

Comments on finished work
Lancelot
Posts: 11
Joined: 17 Aug 2009, 15:59
Location: Quebec, Canada

Back Grid volume renderer script for ICE

Post by Lancelot » 22 Feb 2013, 07:15

Hello everyone.

Just in case, if you’re looking for a Softimage ICE technical artist, I am available right now (21-02-2013).

But the real reason for this thread is to present you my ICE volume rendering tool. It is available on my site and it is FREE!

Image

The first things you need to do is to go to my web site http://www.lalancelot.com, under “Scripts” section, and download the BACKGRID.zip file. Into that zip file, you will find 2 other files:
Back_GridPlugin.py
BackGrid.xsicompound

The first one (Back_GridPlugin.py) is a python script (Oh yes! I can program in python) that you need to install into your “Plugins” folder of Softimage. Mine is located:
C:\Users\Lancelot\Autodesk\Softimage_2012\Application\Plugins

The second one (BackGrid.xsicompound) is and ICE compound that the script will use to setup the scene. It is the heart of the tool and it is imperative that you put it into your “Compounds” folder of Softimage. Mine is located:
C:\Users\Lancelot\Autodesk\Softimage_2012\Data\Compounds

After a restart, you should get a new entry in your Model/Primitive menu. Select “Back_Grid”.

Image

You will be prompt to select a camera. This is what the script does. It creates a back grid with a weightmap that will measure the density of the ICE pointcloud that you plug into its ICE compounds. Once you selected the camera, it creates the grids, controls and a property set. All of those are child to the camera. In the property set, you set the resolution of the grid, its position and the position of the Limits gizmo. This gizmo is the start of the sampling that ends to the grid.

You also get four nulls. The “upper_left” is the limit of the view of the camera. It will adapt in size as you change the grid position’s value. It’s the same thing for the “down_right” null. But if you want to size down the grid to your subject, you can by using “upper_left_gizmo” and “down_right_gizmo”. This way, you can reduce the area of sampling. You want the grid to always be the full size of the camera frustum? Just constrain the gizmo to its corresponding corner limit, and you are set to go.

Image

We are not done yet. You need to have a pointcloud to sample. And to do so, you select the grid in the explorer (it is set “unselectable” into the view) and then access its ICE Tree. You now can plug the geometry of your pointcloud into the “PointCloud Geo” input of the “BackGrid” compound. It should turn from red to green.

Image

Adjust the grid and limits using the easy controls available. I love to do tools for the 3d artist. Did I say that I was available for a job right now?

Image

Put your view to constant.

Image

Fire your view visibility option (Shift+S).

Image

Set both “Propety Maps” entries to true.

Image

The grid turns black. It’s ok. Now, we need to add some depth samples.

Image
Image

At last, some results!

Image

Now, just hide your pointcloud.

Image

Here you go. The depth samples seams more important than the grid resolution for a better image. The next image took seven minutes to render.

Image

Render time is affected by the particles number. But it gives much better results. With five time the particles, a few adjustments and twenty five minutes of render, I got this:

Image

Now, you can produce videos like these:
http://vimeo.com/57951266
http://vimeo.com/59717912

Known issues:
There is an issue if you start animating the camera or the pointcloud position. Sometimes, you will get weightmap’s values all set to one (full blue). It is the “Get closest point” inside the “Backgrid” compound that stops using its cutoff distance for no apparent reason. The work around that I found is to put the pointcloud child of the camera and drive the particle position with an external null. This will force you to use the painful matrix to get what you want, but it worked for me.
http://vimeo.com/59754268

The second issue that you could see in the previous video is that if you animate the backgrid size by its gizmos (constrained to animated nulls), the intensity of the sampling changes. Even though that the grid resolution is adjusted to its size. I have no solution but not to animate the grid size.

So, have fun. If you have any trouble, just post it here and I’ll try to help you out. Use as you wish at your own risk.

Oh! And… Did I mention that I am looking for a job right now? http://www.lalancelot.com
Eat well, stay fit, die anyway.