Controlling particleId values
Almost finishing the working day and planning to send a scene for overnight rendering, I’ve discovered with regret that pretty laborious several-days particle setup has gone terribly wrong. Before my eyes began to appear the images of a dinner first cooling down and then completely gone… of a couch slowly drowning in the haze of non-existence… of the first sun beams streaming through the blinds of the office window… But all these romantic moments were meanly interrupted by the discovery of the problem and it’s unbelievably quick solution.
The thing is, that newborn particles in my setup get uniformly attached via expression to the surface by their particleId, and now they’ve started to bunch up somewhere in the corners and so on. Without getting into the specifics of my particular setup, the overall situation is like this:
When we create particles, tune their behavior with a lot of test simulations and, at last, set an initial state, the range of particleId values usually starts with zero and ends with the order number of the last particle emitted. That’s pretty obvious and clear.

Rendering Motion Vectors with mentalRay in Maya
I’ve made a videotutorial not long ago on rendering motion vectors with mentalRay in Maya by request of RE:Vision Effects. Today I’m making it public on vimeo.

Gallery – Black Lightning
Added several results of my work for feature film “Black Lightning” to the gallery.
Framebuffer setup for passes output in general and mia_material_x in particular
In this article I want to describe manual method for outputting passes with mentalray. Starting from version 2009 maya has a nice new passes system right in the renderSettings. Now Maya 2010 is already available… So why bother?
The answer is very simple – up to now this seemingly nice system works adequately in presentations and tutorials only, but problems become obvious even in medium-level tasks. Very often I use awesome mia_material_x shader, that can handle most of the materials needed, but even in special _x_passes version (which is a bit slower, by the way) it’s not fully and properly supported by this new system. The shader itself has all outputs we need that could be plugged into custom buffers and written out as separate passes, but this is where the main problem of this system resides – simple addition of a custom buffer, even empty one, slows rendering down… sometimes very considerably (the scene I use as an example in this article slows down from 7 min to 57 min).
So, this article is about an older method for outputting passes, that solves the problem of mia_material_x compatibility as well as rendering speed issue.

Lightmaps & Converting image to another uv space
This post is about methods to convert an image (texture, displacement map etc.) made for specific uv-mapping, into corresponding image for another uv-mapping of the same object.
Let’s say, you need to convert a displacement map generated for AUV/GUV mapping of zBrush into more “reasonable” one (loading it into zBrush and regenerating displacement doesn’t work… don’t ask, I had this situation in a midpoint of production
) to mix it with displacement for another uvSet (mentalray has problems with multi-uvSet displacement). Or the mapping of the object has changed, and you want to update already painted textures as well. Or something else – you name it

Convert Instancer into geometry
Type: Python Script (py) Name: sag_instancerToGeometry Version: 1.1 Released: 2010.06.11 Download
Almost every time I use instancer to duplicate geometry via particles, I inevitably want to convert it’s result into standard keyframed objects to modify or simply delete specific ones.
At last I’ve put myself together and have written a tool for this task.

Gallery added
There’s a button to the gallery of my recent works in the top right corner of the blog page. Actually, for a pretty long time already, but only today I’ve finally made it presentable. So, without further ado – you’re welcome to push the mentioned button or the following link – Gallery
Initial values of particle attributes
Let’s say, we’ve set initial state for our particles or just have created them with some defined attribute values via meticulously crafted script, and now we want to change some of them… For example, smoke sprites have various starting scale and then they grow larger with time from it, and we want to make them half their size… Or we simply want to modify mass of exploding object‘s shards (that, let’s say, has been precalculated with respect to the volume of the shard), but without recalculations, re-setups and so on.

Particles with initial mass for each shard
New old articles
I’m closing my old site (now http://www.sigillarium.com/ leads right into this blog) and thereby moving several old articles that still have valuable info (and also to keep links from other resources working) as backdated posts here. For invaluable help in technical aspects of this deal I want to thank Rastler – check his photography blog here – Rastler Blog
Tiling procedurals and Placement mapping
A little trick, pretty simple, but maybe not very obvious. To create coarse surfaces, detailed textures and other high frequency stuff we often use fractal or noise with high value of repeat, that leads to visible tiling:

Fractal with high repeat value reveals tiling
We can try to mix it with other noises, but there is a better solution…
