<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>= undefined - Latest comments</title>
		<link>http://oferz.com/blog////blog4.php?disp=comments</link>
		<atom:link rel="self" type="application/rss+xml" href="http://oferz.com/blog////blog4.php?tempskin=_rss2&#38;disp=comments" />
		<description></description>
		<language>en-US</language>
		<docs>http://backend.userland.com/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.3"/>
		<ttl>60</ttl>
				<item>
			<title>Ofer [Member] in response to: Dynamic UI in Maya using Python</title>
			<pubDate>Tue, 10 Nov 2009 23:41:04 +0000</pubDate>
			<dc:creator>Ofer [Member]</dc:creator>
			<guid isPermaLink="false">c10@http://oferz.com/blog////</guid>
			<description>Thanks for sharing this Matt!&lt;br /&gt;
I'll have to test it sometime.</description>
			<content:encoded><![CDATA[Thanks for sharing this Matt!<br />
I'll have to test it sometime.]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#c10</link>
		</item>
				<item>
			<title>matt [Visitor] in response to: Dynamic UI in Maya using Python</title>
			<pubDate>Tue, 10 Nov 2009 06:37:22 +0000</pubDate>
			<dc:creator>matt [Visitor]</dc:creator>
			<guid isPermaLink="false">c9@http://oferz.com/blog////</guid>
			<description>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...):&lt;br /&gt;
&lt;br /&gt;
import maya.cmds as cmds&lt;br /&gt;
from functools import partial&lt;br /&gt;
&lt;br /&gt;
def myFunc(set,*args):&lt;br /&gt;
    print 'you chose ', set&lt;br /&gt;
&lt;br /&gt;
occSets = ['A','B','C','D']&lt;br /&gt;
for i in occSets():&lt;br /&gt;
    cmds.menuItem(l=i, c=partial(myFunc,i))&lt;br /&gt;</description>
			<content:encoded><![CDATA[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...):<br />
<br />
import maya.cmds as cmds<br />
from functools import partial<br />
<br />
def myFunc(set,*args):<br />
    print 'you chose ', set<br />
<br />
occSets = ['A','B','C','D']<br />
for i in occSets():<br />
    cmds.menuItem(l=i, c=partial(myFunc,i))<br />]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#c9</link>
		</item>
				<item>
			<title>Moritz Moeller [Visitor] in response to: Creating multiple masks with Renderman</title>
			<pubDate>Sun, 04 Oct 2009 10:34:29 +0000</pubDate>
			<dc:creator>Moritz Moeller [Visitor]</dc:creator>
			<guid isPermaLink="false">c8@http://oferz.com/blog////</guid>
			<description>What's wrong with using TIF? Perfect for mattes, supports 16bit int and 32bit float precision, if needed. And any number of AOVs.&lt;br /&gt;
&lt;br /&gt;
PSD support in 3Delight was meant for look dev, not use on actual shots.&lt;br /&gt;
&lt;br /&gt;
.mm</description>
			<content:encoded><![CDATA[What's wrong with using TIF? Perfect for mattes, supports 16bit int and 32bit float precision, if needed. And any number of AOVs.<br />
<br />
PSD support in 3Delight was meant for look dev, not use on actual shots.<br />
<br />
.mm]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#c8</link>
		</item>
				<item>
			<title>chrysl666 [Visitor] in response to: Creating multiple masks with Renderman</title>
			<pubDate>Sun, 13 Sep 2009 01:59:07 +0000</pubDate>
			<dc:creator>chrysl666 [Visitor]</dc:creator>
			<guid isPermaLink="false">c7@http://oferz.com/blog////</guid>
			<description>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 !</description>
			<content:encoded><![CDATA[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 !]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#c7</link>
		</item>
				<item>
			<title>Ofer [Member] in response to: Creating multiple masks with Renderman</title>
			<pubDate>Sat, 12 Sep 2009 23:55:15 +0000</pubDate>
			<dc:creator>Ofer [Member]</dc:creator>
			<guid isPermaLink="false">c6@http://oferz.com/blog////</guid>
			<description>After quite a lot of testing with 3Delight, here are my conclusions:&lt;br /&gt;
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).&lt;br /&gt;
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.)&lt;br /&gt;
3. 3Delight doesn't seem to support the SL short writing: color &quot;hsv&quot; Os; so it needs to be changed to ctransform(&quot;hsv&quot;, Oi).&lt;br /&gt;
&lt;br /&gt;
So, once we realize these issues, here are the changes that would make it work with 3Delight:&lt;br /&gt;
&lt;br /&gt;
The shader should now look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; surface multiMatte (&lt;br /&gt;
    uniform float id=0;&lt;br /&gt;
    output varying float ids[4]=0;&lt;br /&gt;
){&lt;br /&gt;
    Oi = Os;&lt;br /&gt;
    Ci = Cs * Oi;&lt;br /&gt;
    if (id != 0) {&lt;br /&gt;
        ids[0] = id / (arraylength(ids) - 1);&lt;br /&gt;
        ids[id] = comp(ctransform(&quot;hsv&quot;, Oi), 2);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;code&gt;Display &quot;+output_multi_layer.psd&quot; &quot;psd&quot; &quot;ids&quot; &quot;int[4] quantize&quot; [0 255 0 255] &quot;float dither&quot; [0]&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
One more thing to note about the RIB, the number in this line: &lt;br /&gt;
&lt;code&gt;DisplayChannel &quot;varying float[4] ids&quot;&lt;/code&gt;&lt;br /&gt;
_MUST_ be the same as the number in ids array declaration in the SL (in the line: &lt;code&gt;output varying float ids[4]=0;&lt;/code&gt; )&lt;br /&gt;
If they are not the same, all layers will be rendered black.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
o&lt;br /&gt;
&lt;br /&gt;</description>
			<content:encoded><![CDATA[After quite a lot of testing with 3Delight, here are my conclusions:<br />
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).<br />
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.)<br />
3. 3Delight doesn't seem to support the SL short writing: color "hsv" Os; so it needs to be changed to ctransform("hsv", Oi).<br />
<br />
So, once we realize these issues, here are the changes that would make it work with 3Delight:<br />
<br />
The shader should now look like this:<br />
<br />
<code> surface multiMatte (<br />
    uniform float id=0;<br />
    output varying float ids[4]=0;<br />
){<br />
    Oi = Os;<br />
    Ci = Cs * Oi;<br />
    if (id != 0) {<br />
        ids[0] = id / (arraylength(ids) - 1);<br />
        ids[id] = comp(ctransform("hsv", Oi), 2);<br />
    }<br />
}</code><br />
<br />
<br />
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.<br />
<code>Display "+output_multi_layer.psd" "psd" "ids" "int[4] quantize" [0 255 0 255] "float dither" [0]</code><br />
<br />
One more thing to note about the RIB, the number in this line: <br />
<code>DisplayChannel "varying float[4] ids"</code><br />
_MUST_ be the same as the number in ids array declaration in the SL (in the line: <code>output varying float ids[4]=0;</code> )<br />
If they are not the same, all layers will be rendered black.<br />
<br />
Cheers,<br />
o<br />
<br />]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#c6</link>
		</item>
				<item>
			<title>chrysl666 [Visitor] in response to: Creating multiple masks with Renderman</title>
			<pubDate>Thu, 03 Sep 2009 08:57:03 +0000</pubDate>
			<dc:creator>chrysl666 [Visitor]</dc:creator>
			<guid isPermaLink="false">c5@http://oferz.com/blog////</guid>
			<description>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 !</description>
			<content:encoded><![CDATA[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 !]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#c5</link>
		</item>
				<item>
			<title>Kiaran Ritchie [Visitor] in response to: Dynamic UI in Maya using Python</title>
			<pubDate>Sun, 01 Mar 2009 22:55:31 +0000</pubDate>
			<dc:creator>Kiaran Ritchie [Visitor]</dc:creator>
			<guid isPermaLink="false">c4@http://oferz.com/blog////</guid>
			<description>Hey Ofer!!&lt;br /&gt;
&lt;br /&gt;
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!&lt;br /&gt;
&lt;br /&gt;
Hope you're still liking IM Digital. Jas and I are freezing up here in Canada-duh ;) Keep up the good work.&lt;br /&gt;
&lt;br /&gt;
-Kiaran</description>
			<content:encoded><![CDATA[Hey Ofer!!<br />
<br />
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!<br />
<br />
Hope you're still liking IM Digital. Jas and I are freezing up here in Canada-duh ;) Keep up the good work.<br />
<br />
-Kiaran]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#c4</link>
		</item>
				<item>
			<title>Ofer [Member] in response to: Dynamic UI in Maya using Python</title>
			<pubDate>Thu, 11 Dec 2008 14:03:47 +0000</pubDate>
			<dc:creator>Ofer [Member]</dc:creator>
			<guid isPermaLink="false">c3@http://oferz.com/blog////</guid>
			<description>Thank you for your comment.&lt;br /&gt;
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.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
o</description>
			<content:encoded><![CDATA[Thank you for your comment.<br />
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.<br />
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.<br />
<br />
o]]></content:encoded>
			<link>http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#c3</link>
		</item>
			</channel>
</rss>
