My rambling spot on the net

Latest comments

In response to: Dynamic UI in Maya using Python

Ofer [Member]
Thanks for sharing this Matt!
I'll have to test it sometime.
PermalinkPermalink 11/10/09 @ 15:41

In response to: Dynamic UI in Maya using Python

matt [Visitor]
the python-in-maya group has an elegant solution i stumbled across today; use partial. lets you skip all sorts of class trickery (insert indents where appropiate, can't html format comments...):

import maya.cmds as cmds
from functools import partial

def myFunc(set,*args):
print 'you chose ', set

occSets = ['A','B','C','D']
for i in occSets():
cmds.menuItem(l=i, c=partial(myFunc,i))
PermalinkPermalink 11/09/09 @ 22:37

In response to: Creating multiple masks with Renderman

Moritz Moeller [Visitor]
What's wrong with using TIF? Perfect for mattes, supports 16bit int and 32bit float precision, if needed. And any number of AOVs.

PSD support in 3Delight was meant for look dev, not use on actual shots.

.mm
PermalinkPermalink 10/04/09 @ 03:34

In response to: Creating multiple masks with Renderman

chrysl666 [Visitor] · http://www.vimeo.com/chrysl666
Thank you very much .!! I never gonna got this by my self . thanks for sharing , this ideia gonna help me a lot .. cos render masks requests to comps is a big pain in the a** when you first have made this shader , did you have realize this from scratch ? or is a kind of regular method for mask used in CG studios ? .cos is the first time I have seen mask renders like this , one objs in each layer of OpenExr or Psd.. cheers !
PermalinkPermalink 09/12/09 @ 18:59

In response to: Creating multiple masks with Renderman

Ofer [Member]
After quite a lot of testing with 3Delight, here are my conclusions:
1. 3Delight does not support multiple OpenExr layers at this point, so you have to use PSD instead (which is a bit disappointing, since their PSD implementation only supports 8bit images).
2. You have to make sure the size of the arrays is the same in both the SL and the RIB. This means you can't just put a high value in the SL to avoid re-compiling (unless you also put a high number in the RIB, but that would be a waste for 2 reasons: memory usage and the number of wasted layers in the PSD file.)
3. 3Delight doesn't seem to support the SL short writing: color "hsv" Os; so it needs to be changed to ctransform("hsv", Oi).

So, once we realize these issues, here are the changes that would make it work with 3Delight:

The shader should now look like this:

surface multiMatte (
uniform float id=0;
output varying float ids[4]=0;
){
Oi = Os;
Ci = Cs * Oi;
if (id != 0) {
ids[0] = id / (arraylength(ids) - 1);
ids[id] = comp(ctransform("hsv", Oi), 2);
}
}



In the RIB, the only change needed is to the additional display line. The output is now set to PSD, and note the quantize values to convert the float to 8bit values.
Display "+output_multi_layer.psd" "psd" "ids" "int[4] quantize" [0 255 0 255] "float dither" [0]

One more thing to note about the RIB, the number in this line:
DisplayChannel "varying float[4] ids"
_MUST_ be the same as the number in ids array declaration in the SL (in the line: output varying float ids[4]=0; )
If they are not the same, all layers will be rendered black.

Cheers,
o

PermalinkPermalink 09/12/09 @ 16:55

In response to: Creating multiple masks with Renderman

chrysl666 [Visitor] · http://www.vimeo.com/chrysl666
very nice ideia for multimatte .. I`m trying to test it using 3delight , but with no sucess yet , seems that 3delight do not works with float[200] array type , any tip of it ? tnx for sharing !
PermalinkPermalink 09/03/09 @ 01:57

In response to: Dynamic UI in Maya using Python

Kiaran Ritchie [Visitor] · http://www.kiaran.net
Hey Ofer!!

I went Googling to see if anyone else had hit this little snag before. Low and behold my old friend has already solved it. Thanks a lot for putting this together!

Hope you're still liking IM Digital. Jas and I are freezing up here in Canada-duh ;) Keep up the good work.

-Kiaran
PermalinkPermalink 03/01/09 @ 14:55

In response to: Dynamic UI in Maya using Python

Ofer [Member]
Thank you for your comment.
The UIElements variable is a class variable (I had some formatting issues in this post, hope now it's clearer.) However, it is not necessary to use the UIElements var, I only like to use in case I need to manipulate those UI elements later.
As for storing the event functions in an array (UIEventHandlers), this is necessary, because, as I explain in the post, if you don't those functions will be garbage collected as soon as the creation function is done, and the event commands won't work.

o
PermalinkPermalink 12/11/08 @ 06:03

In response to: Dynamic UI in Maya using Python

Bård [Visitor]
This helped me a lot.

I think that you really don't need to store the func in an array. It's better to let the UIElements be a class variable instead of a static (add self. prefix and put on top in __init__). Then you can pass func directly to the command parameter when creating buttons.

Thanks for sharing!
PermalinkPermalink 12/11/08 @ 00:58

©2010 by Ofer Zelichover • Contact • Original b2evo skin design by Andrew Hreschak • upgrade by AfwasEvo Factory
Credits: multiblog | hosting companies