Wednesday 7 September 2011

ddx and ddy HLSL Intrinsic Function

The ddx and ddy functions return the partial derivatives of a given value with respect to screen coordinates.
In other words: the slope of the function described by the value. Or in other words again: the rate at which a given value changes across the screen.
For example ddx( position ) will tell you how much the surface slopes either left or right. So normalize( cross( ddx(position), ddy(position) ) ) returns a normal to the surface.

Friday 2 September 2011

Maya itemFilter nodes

Maya deletes itemFilter nodes when a user creates a new scene or opens another one. This is unfortunate when the itemFilter is filtering something in a custom Outliner you've made. Unfortunately, specifying the Outliner as a parent is not supported. Setting the category of the itemFilter to "builtIn" however, makes them stick around, even after the current scene is closed.