There was a set of image processing nodes in Maya 4 which seem to have disappeared from Maya 5. They included such node types as imageMultiply, imageDiff, and a few others. I think the idea was to bring simple compositing functionality to Maya.
I’m creating a set of nodes that perform basic image processing operations – Sobel operators, edge extraction, thresholding, Hough line transform, blur, stereo depth maps, optical flow, contour extraction, etc. A few of these (e.g., thresholding) could be accomplished using utility nodes or ramps, but most others (e.g., contour extraction) can’t.
The goal is to extract interesting geometric information from images and make that available in Maya as pts, polys, nurbs, particles, whatever. (A cool example that was the inspiration for this project is the optical-flow driven particles that Glassworks did in Dreamkeeper.) To get something interesting, however, usually requires a sequence of operations, and a certain amount of tweaking of each of them, so a set of nodes that could be strung together will be very useful. It will likely prove very useful quite beyond my current intentions – for instance, with a bit of MEL, you could make a mini-compositor within Maya.
The image nodes that seem to have existed in 4 interested me because creating something along the lines that I’m describing involves building a certain amount of infrastructure, which was something I hoped to avoid. In particular, the way the Maya moves data through the DG involves a lot of copying, which with image data would be inefficient, so I wanted to create an alternative method of passing images between node using handles, which raised multithreading issues. Turns out it wasn’t that tough after all, though I’m still sorting out the threading issues. As far as I can tell, only shading nodes have to be made MP safe, since only rendering operations are multithreaded, though I’m still not certain if that is something I should rely on. These image nodes in general won’t be shading nodes – only a final rendering node will be a shading node.
I’m well aware of the MImage type, which can read pixels from shading nodes, and the IFF library. I used it to create the image source node.
So that’s the plan.
Kevin Atkinson