Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 1 22-05-2003 , 11:23 PM
Hugh's Avatar
Registered User
Join Date: Nov 2002
Location: Bristol, UK
Posts: 25

API issues - node attributes & accessing images

I posted this on the maya-dev list, but haven't had a reply yet, so I thought I'd try it on here too....


I've only just started using the Maya API, and as my 'learning' project, I'm doing a few shader nodes - putting some simple compositing features into the hypershader....

The two nodes that I've done so far work fine, but I am trying to make them easier to control...

Is there a way of creating custom attribute controls? I've currently got 4 float sliders that act independently. The ideal control for this would be four markers on the same slider, and some constraint that stops them passing each other. (If you're interested, this is a Luma Key node and the four are the upper and lower threshold and tolerance values)

Another area that I'm not entirely sure about (I'm working my way through David Gould's book, and regularly refer to the Maya docs) is accessing parts of a texture outside of the current point... (in that the shader nodes mainly work on a single point, and just use one pixel value at a time - I'm creating a 'blur' node that needs to be able to access pixel values around the current one...) - I'm also hoping to be able to create a histogram to be shown in the luma key attributes, and, to do that, I'd need to access the rest of the image/texture too...

The third part that is giving me troubles is arrays of attributes... I've used nAttr.setArray(true), which, when I link an element to it in the hypershader, adds [0] to the attribute name, but I can't add more elements - I can only replace the one I've already placed. I've tried using a MArrayDataBuilder - setting the grow size. I've just had a thought on this one, though - do I have to have my own code to expand the array when I place a link - I had assumed that it would do this for me...

Anyway, any help would be hugely appreciated!


Hugh Macdonald

UnFramed Productions
Goodnight Opus - TD Lead

VFXTalk.com - Online Compositing Community - Admin
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads