Gallery – Black Lighting
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: Compiled Python Script (pyc)
Name: sag_instancerToGeometry
Version: 1.0
Released: 2009.11.14
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…
Particle inside a volume and Field Influence checks
Often there’s a need to check whether a particle is inside an object or not and based on that to make something with it (usually kill
)
We can check the normal of nearest point on mesh, but such a calculation for each particle in each frame becomes very slow with increase of their amount. My friend has written a plugin that returns right away whether a coordinate is inside or outside the volume, but anyway due to slow speed of calculations I often had to avoid this method.
The solution is this – since various volume fields affect a particle when it gets inside their volume, if we can represent the object with a number of such fields and check whether any of them influence a particle, we can find out if it is inside the object. Of course, for difficult forms the result will be inaccurate, but we can create a pack of fields that represent them pretty closely. In any case, that’d be much faster

miLabel to control mib_amb_occlusion
There’re two ugly but useful attributes in mib_amb_occlusion – id_inclexcl and id_nonself. Along with custom miLabel attribute they can define which objects can occlude, which ones can’t and whether objects self-occlude or not. Key thing to understand here – it is question of just an ability to occlude, not of ability to receive occlusion.

Disabling self-occlusion with miLabel attribute
