<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brian Freisinger &#187; Vray</title>
	<atom:link href="http://www.disopolis.com/wordpress/tag/vray/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.disopolis.com/wordpress</link>
	<description>VFX portfolio</description>
	<lastBuildDate>Sat, 13 Apr 2013 01:39:15 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>xyzWPP pass tutorial</title>
		<link>http://www.disopolis.com/wordpress/2012/xyzwpp-pass-tutorial/</link>
		<comments>http://www.disopolis.com/wordpress/2012/xyzwpp-pass-tutorial/#comments</comments>
		<pubDate>Tue, 06 Nov 2012 01:41:34 +0000</pubDate>
		<dc:creator><![CDATA[faust]]></dc:creator>
				<category><![CDATA[CG]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Nuke]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Vray]]></category>
		<category><![CDATA[vray wpp pass]]></category>
		<category><![CDATA[vrayRE_extra_tex]]></category>
		<category><![CDATA[world point position]]></category>
		<category><![CDATA[wpp]]></category>
		<category><![CDATA[xyz]]></category>
		<category><![CDATA[xyzWPP]]></category>

		<guid isPermaLink="false">http://www.disopolis.com/wordpress/?p=259</guid>
		<description><![CDATA[Setting up a xyzWPP pass in vray using the vrayRE_extra_tex   By Brian Freisinger November 5, 2012 (Reminder: Click on images to enlarge) A common request I get from compositors, is for an XYZ WPP pass in addition to my standard passes. The XYZ or World Point Position pass can be used in multiple ways, from [&#8230;]]]></description>
				<content:encoded><![CDATA[<h3 style="text-align: left;"><strong>Setting up a xyzWPP pass in vray using the vrayRE_extra_tex </strong></h3>
<p style="text-align: left;"><strong></strong><span style="color: #808080;"> <em>By Brian Freisinger</em></span></p>
<p style="text-align: left;"><span style="color: #808080;"><em></em><em>November 5, 2012</em></span></p>
<p style="text-align: left;">(Reminder: Click on images to enlarge)</p>
<p style="text-align: left;">A common request I get from compositors, is for an XYZ WPP pass in addition to my standard passes. The XYZ or World Point Position pass can be used in multiple ways, from doing some re-lighting in Nuke, to creating atmosphere (ground fog) and a variety of other uses.</p>
<p style="text-align: left;">The XYZ WPP pass doesn’t appear in the Render Elements tab, so you’ll have to create it using the <strong>vrayRE_Extra_Tex</strong></p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure1.png"><img class="size-medium wp-image-260" title="figure1" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure1-185x300.png" alt="" width="185" height="300" /></a></p>
<p>The vrayRE_Extra_Tex is a very powerful and often underused render element. You can plug almost anything into it to create a custom pass. For example, you can plug the VrayDirt shader into it and kick out basically an ambient occlusion pass. Again, that’s just one of many things that can be plugged into this node to get almost any pass or variant of pass out painlessly and easily.</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure2.png"><img title="figure2" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure2-300x251.png" alt="" width="300" height="251" /></a></p>
<p>For this one I just created a vrayDirt shader in the hypershade and dragged and dropped it into the vray_ExtraTex “Texture” field. (Make sure you hit enter after doing this so it connects, otherwise you’ll be wondering why it doesn’t work)</p>
<p>&nbsp;</p>
<h3>Creating the xyzWPP pass</h3>
<p style="text-align: left;">The XYZ WPP pass takes a little more work, but isn’t difficult.<br />
I’m just going to set up some spheres in my scene in a loose array so we have multiple objects that exist in multiple xyz coordinate space to make our pass pretty obvious when we render it.</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure3.png"><img title="figure3" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure3-300x181.png" alt="" width="300" height="181" /></a></p>
<p style="text-align: left;">Next I’m going to create my <strong>vrayRE_Extra_Tex pass</strong>.</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure4.png"><img title="figure4" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure4-300x224.png" alt="" width="300" height="224" /></a></p>
<p style="text-align: left;">Make sure you open the vrayRE_Extra_Tex up in the attribute editor.<br />
You’ll see some empty fields.<br />
The first field we want to fill is the Vray Name Extratex, without a name in here it’ll be a blank field in the VFB, and hard to find as a comp pass later.<br />
So I’m just going to name mine xyzWPP</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure5.jpg"><img title="figure5" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure5-185x300.jpg" alt="Figure 5. “Name your pass&quot;" width="185" height="300" /></a></p>
<p style="text-align: left;">Ok, so the xyzWPP pass has now been created, but the render element itself needs to get information, so we’ll create a samplerInfo node in the hypershade.</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure6.png"><img title="figure6" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure6-283x300.png" alt="" width="283" height="300" /></a></p>
<p style="text-align: left;">So we’ve got our samplerInfo node and our xyxWPP pass created. Next we’ll need to get them to talk, so opening up the connection edtor, we want to load the samplerInfo node on the left and the vrayRE_Extra_Tex, on the right.</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure7.png"><img title="figure7" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure7-300x279.png" alt="" width="300" height="279" /></a></p>
<p style="text-align: left;">You can see I’ve expanded the “pointWorld” field on the left, and the vray_texture_extraTex on the right.<br />
So now it’s a simple case of connecting pointWorldX to R, pointWorldY to G, and pointWorldZ to B</p>
<p style="text-align: left;">That’s it. You now have an xyzWPP pass created for your scene.</p>
<p style="text-align: left;">Rendering it can be a bit deceptive. It may not look like there is any gradient to your passes.<br />
The render will all channels on should look something like this</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure-8.png"><img title="figure 8" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure-8-300x177.png" alt="" width="300" height="177" /></a></p>
<p style="text-align: left;">So I’ll load this pass into Nuke, add a shuffle and a grade and take a look at the “G” channel which is assigned to our Y</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure9.png"><img title="figure9" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/11/figure9-300x170.png" alt="" width="300" height="170" /></a></p>
<p style="text-align: left;">I’ve added the grade so I could see a better representation of the gradient I would expect in this pass.</p>
<p style="text-align: left;">And that’s pretty much it. You can look at your X and Z channel and see how they look at this point.</p>
<p style="text-align: left;">For more info about using xyzWPP passes check out some of <a href="http://www.thefoundry.co.uk/">The Foundry’s</a> tutorials.<br />
<strong id="internal-source-marker_0.5798456333577633"><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.disopolis.com/wordpress/2012/xyzwpp-pass-tutorial/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Vray Light Select Script</title>
		<link>http://www.disopolis.com/wordpress/2012/vray-light-pass-script/</link>
		<comments>http://www.disopolis.com/wordpress/2012/vray-light-pass-script/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 07:58:04 +0000</pubDate>
		<dc:creator><![CDATA[faust]]></dc:creator>
				<category><![CDATA[CG]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Mudbox]]></category>
		<category><![CDATA[Nuke]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Vray]]></category>
		<category><![CDATA[vray compositing]]></category>
		<category><![CDATA[vray light select]]></category>
		<category><![CDATA[vray light select re]]></category>
		<category><![CDATA[vray light select render element]]></category>
		<category><![CDATA[vray lights]]></category>
		<category><![CDATA[vray Render Elements]]></category>
		<category><![CDATA[Vray Specular]]></category>
		<category><![CDATA[vray_light_select]]></category>

		<guid isPermaLink="false">http://www.disopolis.com/wordpress/?p=176</guid>
		<description><![CDATA[Using Vray Render Elements, Making Specular Vray Materials, using Vray_Light_Select, basic Vray Compositing in Nuke. Brian Freisinger Feb 19 2012 UPDATE: May 7 2012 &#8211; The script wasn&#8217;t working correctly in Maya 2012 and Vray 2.2. It&#8217;s been updated to now work properly.  (This tutorial requires Maya 2011 or higher, Vray 2.0 and Nuke or [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Using Vray Render Elements, Making Specular Vray Materials, using Vray_Light_Select, basic Vray Compositing in Nuke.</strong></p>
<p><em>Brian Freisinger</em></p>
<p><em>Feb 19 2012</em></p>
<p><span style="color: #ff0000;">UPDATE: May 7 2012 &#8211; The script wasn&#8217;t working correctly in Maya 2012 and Vray 2.2. It&#8217;s been updated to now work properly.</span></p>
<p><em> (This tutorial requires Maya 2011 or higher, Vray 2.0 and Nuke or AfterEffects/Photoshop)</em></p>
<p><em><strong>Click on any image to enlarge.</strong></em></p>
<p>For the most part, the vray render elements are very straight forward and easy to access (not to mention easy to set up for composite)</p>
<p>&nbsp;</p>
<p>In my opinion, the only one that requires a little more fiddling, as well as opens up a wide variety of user mistakes is the vrayRE_Light_Select.</p>
<p>&nbsp;</p>
<p>This tutorial will only cover very basic light pass/compositing techniques to demonstrate the Light_Select technique and introduce a nice MEL script to make your life easier.</p>
<p>&nbsp;</p>
<div id="attachment_177" style="width: 258px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure1.jpg"><img class="size-medium wp-image-177" title="figure1" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure1-248x300.jpg" alt="" width="248" height="300" /></a><p class="wp-caption-text">Figure 1. Turn on the VFB</p></div>
<p>&nbsp;</p>
<p>The first thing necessary for working with your render elements is to switch over to the Vray VFB (Vray Frame Buffer) to view your images and passes. This will also allow you to quickly view your images in both linear and SRGB color space.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_178" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure2.jpg"><img class="size-medium wp-image-178" title="figure2" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure2-300x216.jpg" alt="" width="300" height="216" /></a><p class="wp-caption-text">Figure 2. Three Light Scene.</p></div>
<p>&nbsp;</p>
<p>I built an simple example scene with a sphere and ground plane. In addition I created three Vray rectangular lights for standard three point lighting.</p>
<p>(Standard maya lights also work for this, but I prefer using the Vray native lights)</p>
<p>&nbsp;</p>
<p>You’ll notice right away I’ve named my lights and objects. It’s just a good standard practice.</p>
<p>It can be as complex or simple as you like, but later on knowing which light you’re looking with or modifying in compositing makes it priceless.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_179" style="width: 255px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure3.jpg"><img class="size-medium wp-image-179" title="figure3" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure3-245x300.jpg" alt="" width="245" height="300" /></a><p class="wp-caption-text">Figure 3. Basic Render Elements for Comp</p></div>
<p>&nbsp;</p>
<p>The first thing we’ll do is set up our Render Elements found under the Render Settings.</p>
<p>You’ll see a huge list of possibilities under this tab, but for simplicity we’ll just do one of the more basic setups.</p>
<p>&nbsp;</p>
<p>As I mentioned before, we’re just going to focus on these basic controls since the point here is about Light Passes, not advanced compositing and pass management.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_180" style="width: 140px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure4.jpg"><img class="size-medium wp-image-180" title="figure4" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure4-130x300.jpg" alt="" width="130" height="300" /></a><p class="wp-caption-text">Figure 4. Specular Material</p></div>
<p>A little note about the specular pass and specular materials in Vray.</p>
<p>More spec and less reflection on an object is controlled by the “Reflection Glossiness” in the Material Editor.</p>
<p>Glossiness set for a mix of spec and reflection.</p>
<p>If the Reflection Glossiness is set for 1.0 you’ll see no specular whatsoever in the spec pass. It’s all being pumped through the reflection pass. Great for a mirror ball, bad for a bowling ball&#8230;</p>
<p>&nbsp;</p>
<p>So for our test I want a mix of both, with hot spec we can see, hence my .632 range.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_181" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure5.jpg"><img class="size-medium wp-image-181" title="figure5" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure5-300x190.jpg" alt="" width="300" height="190" /></a><p class="wp-caption-text">Figure 5. Render in SRGB color space.</p></div>
<p>&nbsp;</p>
<p>Now with the lights set, material set and render elements set we can render.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_182" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure6.jpg"><img class="size-medium wp-image-182" title="figure6" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure6-300x206.jpg" alt="" width="300" height="206" /></a><p class="wp-caption-text">Figure 6. Linear Color Space button.</p></div>
<p>&nbsp;</p>
<p>To switch between linear and SRGB color space you need to click on this button.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I will be writing a tutorial in the future on <strong>Linear Workflow</strong>, but if you’re unfamiliar with it basically in Linear color space the image should look far darker than the SRGB space.</p>
<p>SRGB is how we’re seeing it on our monitor, Linear is the “true” color space and gives us more room to move in compositing especially with our whites/blacks and other post correction.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_183" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure7.jpg"><img class="size-medium wp-image-183" title="figure7" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure7-300x193.jpg" alt="" width="300" height="193" /></a><p class="wp-caption-text">Figure 7. Lighting Pass Only.</p></div>
<p>&nbsp;</p>
<p>Next up is our ability to see our passes using the VFB.</p>
<p>What we’re looking at in the “lighting” pass is simply the combination of the shadow and diffuse pass. We’re also left with very limited control of the lights.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_184" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure8.jpg"><img class="size-medium wp-image-184" title="figure8" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure8-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Figure 8. Basic Nuke Comp</p></div>
<p>&nbsp;</p>
<p>If we were to write these out for compositing they’d be combined with a Plus Merge in Nuke (Linear Dodge/Add in Adobe products)</p>
<p>&nbsp;</p>
<p>So, how do we break each light out separately?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_185" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure9.jpg"><img class="size-medium wp-image-185" title="figure9" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure9-300x238.jpg" alt="" width="300" height="238" /></a><p class="wp-caption-text">Figure 9. Create a &#8220;Light Select&#8221; pass</p></div>
<p>&nbsp;</p>
<p>We’re going back to our Render Element Tab in the Render Settings and a new pass.</p>
<p>At this point we&#8217;ll need  to use the VrayRE_Light Select to isolate our lights.</p>
<p>As a test we can  just set one up quickly and hook into the render.</p>
<p>Just double click on it as you would any pass and it should appear in the right column.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_186" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure10.jpg"><img class="size-medium wp-image-186" title="figure10" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure10-300x216.jpg" alt="" width="300" height="216" /></a><p class="wp-caption-text">Figure 10. Naming your Pass</p></div>
<p>&nbsp;</p>
<p>Just like we wanted to name our lights earlier, we’ll want to name our Light_Select to know which light it’s controlling.</p>
<p>Let&#8217;s start off by using the keyLight for our test.</p>
<p>&nbsp;</p>
<p>I’m just changing the fields highlighted in green.</p>
<p>The top one effects how it’s seen in the render elements tab as well as the outliner.</p>
<p>The field below it in green effects how it’s seen in the next step, the set editor.</p>
<p>&nbsp;</p>
<p>Currently the “Type” (at the bottom of the image in Figure 10) is set for “Normal”</p>
<p>We’ll get into the more advanced functions of this later.</p>
<p>&nbsp;</p>
<p>Just because the pass was created and named the same as the light doesn’t mean it automagically knows which light to connect to unfortunately.</p>
<p>So we’ll have to open up the set editor.</p>
<p>&nbsp;</p>
<div id="attachment_187" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure11.jpg"><img class="size-medium wp-image-187" title="figure11" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure11-300x277.jpg" alt="" width="300" height="277" /></a><p class="wp-caption-text">Figure 11. Finding the Set Editor</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The set editor is found under: Windows -&gt;Relationship Editors -&gt; Sets</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_188" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure12.jpg"><img class="size-medium wp-image-188" title="figure12" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure12-300x282.jpg" alt="" width="300" height="282" /></a><p class="wp-caption-text">Figure 12. Set Editor Connection</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once the window comes up any Vray Light Select element we’ve made should show up in the left column. This is also why naming your light pass and light is relatively important.</p>
<p>Simply select the light pass on in the left column, and then select the correct light in the right column. In our case it’s the keyLight_pass connected to the keyLight</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_189" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure13.jpg"><img class="size-medium wp-image-189" title="figure13" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure13-300x190.jpg" alt="" width="300" height="190" /></a><p class="wp-caption-text">Figure 13. Key Light Pass</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now if we re-render our image with the VFB active we can look at our keyLight_pass</p>
<p>&nbsp;</p>
<p>We’ve got the light now seperated, but comparing it to the lighting pass and the specular pass we can see that the new pass (keyLight_pass) has not only the lighting, but the specular combined. This will be a problem later on in compositing since generally having your light pass and spec pass separated give a lot more control.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_190" style="width: 143px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure14.jpg"><img class="size-medium wp-image-190" title="figure14" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure14-133x300.jpg" alt="" width="133" height="300" /></a><p class="wp-caption-text">Figure 14. &#8220;Types&#8221; of Light Select</p></div>
<p>&nbsp;</p>
<p>Looking back at the keyLight_pass in the attribute editor we can go down to the bottom and see some options under “<strong>Type</strong>” : Normal, Raw, Diffuse, Specular</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>We left it at default, so now we’ll switch it over to “Diffuse” and re-render the image.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_191" style="width: 166px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure15.jpg"><img class="size-medium wp-image-191" title="figure15" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure15-156x300.jpg" alt="" width="156" height="300" /></a><p class="wp-caption-text">Figure 15. Setting up the diffuse pass</p></div>
<p>&nbsp;</p>
<p>I’m also going to take the time to rename my pass from “keyLight_pass” to “keyLight_diff”</p>
<p>The reason being, we will have to connect up a “keyLight_spec” pass seperately if we want that as an individual control. When they write out a multichannel EXR or single files you’ll want to know what’s what when putting the comp together. It’ll also help diagnose problem using the VFB</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_202" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure16b.jpg"><img class="size-medium wp-image-202" title="figure16b" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure16b-300x197.jpg" alt="" width="300" height="197" /></a><p class="wp-caption-text">Figure 16b. keyLight_diff / diffuse pass only.</p></div>
<p>&nbsp;</p>
<p>The new render shows   that we lost all the spec from our first render.</p>
<p>That’s good, but we’ll need to make another pass to get the spec and hook it up in the set editor.</p>
<p>&nbsp;</p>
<p>Setting this up for production at this point would require six passes just for the lights.</p>
<p>(Three Diffuse and Three Specular) Doing this manually can be a major pain.</p>
<p>First off it’s easy to make a mistake. I’ve often forgot to set a pass to be diffuse, or accidentally set two to be specular. Forget to connect a new pass up in the set editor. Lost all my passes and connections when Maya decided to be helpful and ‘clean up unknown nodes&#8230;’ etc etc</p>
<p>&nbsp;</p>
<p>So I wrote a mel script to do all this for you.</p>
<p>I walked through the process of doing this manually so we’d understand what’s going on under the hood.</p>
<p>&nbsp;</p>
<p>Ok, on with the script:</p>
<p>&nbsp;</p>
<p>Here’s the code:</p>
<p>&nbsp;</p>
<pre>//////////////////////////////<wbr>//////////////////////</wbr></pre>
<pre>//Create Vray LightPass Render Elements//</pre>
<pre>//Dec 2011</pre>
<pre>//Updated May 2012 for Vray 2.2</pre>
<pre>//Brian Freisinger</pre>
<pre>//<a href="mailto:faust@disopolis.com" target="_blank">faust@disopolis.com</a></pre>
<pre>//<a href="http://www.disopolis.com/" target="_blank">www.disopolis.com</a></pre>
<pre>//Feel free to steal, edit, modify.</pre>
<pre>//////////////////////////////<wbr>/////////////////////</wbr></pre>
<pre>//Call selection list</pre>
<pre>global proc vrLightPass () {</pre>
<pre>//Call selection list</pre>
<pre>string $vRE_Light[] = `ls -sl`;</pre>
<pre>for ($selection in $vRE_Light)</pre>
<pre>{</pre>
<pre>string $vrayLS = $selection;</pre>
<pre>string $diff = "_diff";</pre>
<pre>string $spec = "_spec";</pre>
<pre>//create diffuse pass</pre>
<pre>string $diffs = `vrayAddRenderElement LightSelectElement`;</pre>
<pre>string $vRE_diff[];</pre>
<pre>$vRE_diff[0] = $diffs;</pre>
<pre>//set diffuseFLAG</pre>
<pre>setAttr "vrayRE_Light_Select.vray_<wbr>type_lightselect" 2;</wbr></pre>
<pre>//Set render outputname for diffuse</pre>
<pre>setAttr -type "string" vrayRE_Light_Select.vray_name_<wbr>lightselect ($selection + $diff);</wbr></pre>
<pre>rename $vRE_diff ($selection + $diff);</pre>
<pre>//create spec pass</pre>
<pre>string $specs = `vrayAddRenderElement LightSelectElement`;</pre>
<pre>string $vRE_spec[];</pre>
<pre>$vRE_diff[0] = $specs;</pre>
<pre>setAttr "vrayRE_Light_Select.vray_<wbr>type_lightselect" 3;</wbr></pre>
<pre>//Set render outputname for spec</pre>
<pre>setAttr -type "string" vrayRE_Light_Select.vray_name_<wbr>lightselect ($selection + $spec);</wbr></pre>
<pre>rename $vRE_spec ($selection + $spec);</pre>
<pre>//Set relationships</pre>
<pre>connectAttr ($vrayLS + ".instObjGroups[0]") ($vrayLS + "_diff.dagSetMembers[0]");</pre>
<pre>connectAttr ($vrayLS + ".instObjGroups[0]") ($vrayLS + "_spec.dagSetMembers[0]");</pre>
<pre>}</pre>
<pre>}</pre>
<pre>///endcode///</pre>
<p>You can also <a href="http://www.disopolis.com/vrlightpass/">download it here</a> if the wordpress formatting throws you some errors.</p>
<p>Start by sourcing the code.</p>
<p>Then select the lights you want to make passes out of.</p>
<p>I created a keyLight, fillLight and rimLight so I’ll select those three.</p>
<p>then in the command line type</p>
<p>vrLightPass;</p>
<p>and press enter.</p>
<p>&nbsp;</p>
<div id="attachment_192" style="width: 257px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure16.jpg"><img class="size-medium wp-image-192" title="figure16" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure16-247x300.jpg" alt="" width="247" height="300" /></a><p class="wp-caption-text">Figure 16. vrLightPass.mel script</p></div>
<p>&nbsp;</p>
<p>Now I’ve got six passes, all properly named and all properly assigned.</p>
<p>&nbsp;</p>
<p>I really don’t need the original lighting pass or the original specular pass anymore, but I keep them around so when I comp the shot I have something besides the beauty pass around to make sure I got everything right.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_193" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure17.jpg"><img class="size-medium wp-image-193" title="figure17" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure17-300x192.jpg" alt="" width="300" height="192" /></a><p class="wp-caption-text">Figure 17. Rim Light Pass</p></div>
<p>&nbsp;</p>
<p>So now we re-render the image and we’ll take a look at the rimLight_spec pass.</p>
<p>So that’s it. All our light passes are broken out.</p>
<p>Be aware, you CANNOT break out your reflection per light, the render engine doesn’t work that way. There are comp tricks using the light or spec pass to dial up or dial down your reflection per light, but as a pass, it’s all or nothing. Same goes for Refraction.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_194" style="width: 304px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure18.jpg"><img class="size-medium wp-image-194" title="figure18" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure18-294x300.jpg" alt="" width="294" height="300" /></a><p class="wp-caption-text">Figure 18. Final Composite</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once you write out your passes compositing them is pretty simple, in Nuke it’s all merge plus nodes. (Or linear burn (add) in adobe products)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_195" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure18b.jpg"><img class="size-medium wp-image-195" title="figure18b" src="http://www.disopolis.com/wordpress/wp-content/uploads/2012/02/figure18b-300x205.jpg" alt="" width="300" height="205" /></a><p class="wp-caption-text">Figure 18b. The Nuke Comp</p></div>
<p>&nbsp;</p>
<p>Here’s a quick close up of the Nuke Script</p>
<p>And that&#8217;s basic light pass/compositing with Vray.</p>
<p>&nbsp;</p>
<p><strong id="internal-source-marker_0.47385616041719913"><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.disopolis.com/wordpress/2012/vray-light-pass-script/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Part 3: Multi-Tile Shader Setup/Rendering in Maya.</title>
		<link>http://www.disopolis.com/wordpress/2011/part-3-muli-tile-shader-setuprendering-in-maya/</link>
		<comments>http://www.disopolis.com/wordpress/2011/part-3-muli-tile-shader-setuprendering-in-maya/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 00:18:44 +0000</pubDate>
		<dc:creator><![CDATA[faust]]></dc:creator>
				<category><![CDATA[CG]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Mudbox]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Vray]]></category>
		<category><![CDATA[maya multi tile displacement]]></category>
		<category><![CDATA[multi-tile]]></category>
		<category><![CDATA[multiple UV mapping]]></category>
		<category><![CDATA[Multitile]]></category>
		<category><![CDATA[multitile displacement]]></category>

		<guid isPermaLink="false">http://www.disopolis.com/wordpress/?p=135</guid>
		<description><![CDATA[Part 3: Multi-Tile Shader Setup/Rendering in Maya.  Brian Freisinger October 18, 2011 Update: June 10, 2012 &#8211; To skip directly to how to set up for displacement jump ahead to part 4 of this tutorial series. Also I&#8217;m no longer using the layered texture shader method and instead using the +/- Average node method as [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Part 3: Multi-Tile Shader Setup/Rendering in Maya.</strong></p>
<p><em> Brian Freisinger</em></p>
<p><em>October 18, 2011</em></p>
<p><strong><em>Update: June 10, 2012 &#8211; To skip directly to how to set up for displacement jump ahead to <a href="http://www.disopolis.com/wordpress/?p=211">part 4</a> of this tutorial series.</em></strong></p>
<p><strong><em>Also I&#8217;m no longer using the layered texture shader method and instead using the +/- Average node method as seen in <a href="http://www.disopolis.com/wordpress/?p=211">Part 4</a>. I&#8217;ll be updating this tutorial to reflect that in the future.</em></strong></p>
<p>&nbsp;</p>
<p>At the end of <a href="http://www.disopolis.com/wordpress/?p=102">Part 2</a> you should have ended up with an object (Cube Primitive) laid out with multi-tile UV maps, and six texture maps you extracted from Mudbox.</p>
<p>&nbsp;</p>
<p>There are now two ways you can assign your textures in a shader.</p>
<p>Again this applies to both texture and displacement mapping, but for this part of the tutorial we’ll just be looking at simple textures.</p>
<p>&nbsp;</p>
<p>Let’s start by reloading the original cube scene you should have saved and then exported to Mudbox. If you forgot, just import your cube .OBJ you used in Part 2.</p>
<p>&nbsp;</p>
<p><strong>Simple Setup:</strong></p>
<p>&nbsp;</p>
<p>The first way is the down and dirty face by face assignment. I rarely use this unless I’m in a hurry or just want to run a couple tests without setting up a shader network.</p>
<p>It’s pretty simple to set up.</p>
<p>If we’ve got six tiles, and six textures, we simply create six shaders.</p>
<div id="attachment_136" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure19_MayaPerFaceSHD_01.jpg"><img class="size-medium wp-image-136" title="figure19_MayaPerFaceSHD_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure19_MayaPerFaceSHD_01-300x258.jpg" alt="" width="300" height="258" /></a><p class="wp-caption-text">Figure 19. Shader per Face</p></div>
<p>&nbsp;</p>
<p>I’m using Vray here and creating VrayMTL shaders, but this will work the same with Lamberts, Blinns or anything else.</p>
<p>You’ll also notice I named them with a u#_v# so I can keep not only my surface assignments straight, I can also quickly identify which texture goes with which shader.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_137" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure20_MayaPerFaceAssign_01.jpg"><img class="size-medium wp-image-137" title="figure20_MayaPerFaceAssign_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure20_MayaPerFaceAssign_01-300x203.jpg" alt="" width="300" height="203" /></a><p class="wp-caption-text">Figure 20. Select each face and assign proper shader.</p></div>
<p>&nbsp;</p>
<p>Now you simply grab each UV tile in order and assign the Shader to it.</p>
<p>This can be pretty tedious, but it’s simple and fast for diagnosing texture quality, or if you just want to check a couple of displacement maps on the fly without setting up a more complex network.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_138" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure22_textureAssign_01.jpg"><img class="size-medium wp-image-138" title="figure22_textureAssign_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure22_textureAssign_01-300x281.jpg" alt="" width="300" height="281" /></a><p class="wp-caption-text">Figure 22. The correct texture tile for the correct shader.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once that’s done, it’s pretty straight forward texture assignment per shader.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_139" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure23_pngAlpha_01.jpg"><img class="size-medium wp-image-139" title="figure23_pngAlpha_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure23_pngAlpha_01-300x248.jpg" alt="" width="300" height="248" /></a><p class="wp-caption-text">Figure 23. Make sure there is no Transparency.</p></div>
<p>&nbsp;</p>
<p>There is one ‘gotcha’ when using .png files generated from Mudbox.</p>
<p>If you open the file in PhotoShop you’ll see it’s on ‘Layer 0’ with no background. Maya thinks that the empty background is a full alpha channel. So when it’s assigned to a shader, Maya tries to be helpful by adding a transparency or opacity channel.</p>
<p>So be aware, you either have to break the connection or lock the channel before adding the texture. I generally lock my opacity channels if I’m using this particular technique.</p>
<p>Both of these in Figure 23 have transparency added. The left is a generic Blinn, the right is a VrayMTL.</p>
<p>Double check this if you have render errors.</p>
<p>&nbsp;</p>
<div id="attachment_140" style="width: 308px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure24_simpleAssignment_Render_01.jpg"><img class="size-medium wp-image-140" title="Figure24_simpleAssignment_Render_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure24_simpleAssignment_Render_01-298x300.jpg" alt="" width="298" height="300" /></a><p class="wp-caption-text">Figure 24. Render using the simple assignment technique.</p></div>
<p>&nbsp;</p>
<p>If you wanted to add spec maps, reflection maps, bump, normal, or displacement maps, it’s the same method,  just the proper channels.</p>
<p>While this is the most simple and straight forward of setups, obviously it’s problematic for production because if you want to change Shader/Material attributes you have to make the same change to every shader, everytime. That’s why I only use this as a diagnostic tool, and not for standard production.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Master Shader:</strong></p>
<p>The second and probably best method is to use a ‘layered texture’ node connected to a master shader: Blinn, Lambert, or Vray MTL etc.</p>
<p>The reason here is obvious, you have all your tiled textures under one node for surface property control. It takes a little more time to set up, but it’s worth it.</p>
<p>If you’re not familiar with the layered texture node it’s found under “other textures” in the HyperShade.</p>
<p>Using it can be a little tricky at times, but once it’s set up it can be invaluable.</p>
<div id="attachment_142" style="width: 253px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure25_layeredTexture_01.jpg"><img class="size-medium wp-image-142" title="Figure25_layeredTexture_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure25_layeredTexture_01-243x300.jpg" alt="" width="243" height="300" /></a><p class="wp-caption-text">Figure 25. layeredTexture node</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Create a shader of your choice. For this one I’m going to use a lambert and name it “cubeMaster”</p>
<p>Create a render node under the “color” field, and assign the layered texture.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_143" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure26_layeredTextureATR_01.jpg"><img class="size-medium wp-image-143" title="Figure26_layeredTextureATR_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure26_layeredTextureATR_01-300x160.jpg" alt="" width="300" height="160" /></a><p class="wp-caption-text">Figure 26. layeredTexture Attributes</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once it’s assigned should see the layered texture attributes.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_144" style="width: 202px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure27_layeredTextureNEW_01.jpg"><img class="size-medium wp-image-144" title="Figure27_layeredTextureNEW_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure27_layeredTextureNEW_01-192x300.jpg" alt="" width="192" height="300" /></a><p class="wp-caption-text">Figure 27. Creating a new layer in the node.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now select to the right of of the green swatch in the layered texture attribute edtor and create another node.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Just to make things simple, create four more for a total of six layers.</p>
<p>Six tiles, six layers.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_145" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure28_layerTEX_selected_01.jpg"><img class="size-medium wp-image-145" title="Figure28_layerTEX_selected_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure28_layerTEX_selected_01-300x276.jpg" alt="" width="300" height="276" /></a><p class="wp-caption-text">Figure 28. Add your tile specific texture and make sure Blend is set to &quot;Add&quot;</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once that’s done we’ll assign our first tile to the first layer.</p>
<p>Take special node of the white boarder around what I have selected. It’s easy to mistakenly make changes to the wrong layer. Double check you see that white boarder that signifies “selected” before you make any changes or you might be doing it to the wrong layer.</p>
<p>You’ll also note in Figure 28, I highlighted the “Blend Mode”</p>
<p>It defaults with “none”, for a multi-tile texture set to work we need to set it to “add”</p>
<p>In the color field I’m assigning my first tile which is CubePaint_Tutorial_u1_v1.png</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_146" style="width: 240px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure29_layerTEX_default_01.jpg"><img class="size-medium wp-image-146" title="Figure29_layerTEX_default_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure29_layerTEX_default_01-230x300.jpg" alt="" width="230" height="300" /></a><p class="wp-caption-text">Figure 29. Set Default Color to solid black.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Because we’re using an “Add” Blend we’ll also need to set our default color to a solid black or it will contribute to the color.</p>
<p>If you forget to make this change it will start washing out your texture color until there is enough contribution to make it a solid white. It’s a very important step in the process to assure your painted textures and your rendered textures are 1:1</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_147" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure30_layerTEX_place2d_A_01.jpg"><img class="size-medium wp-image-147" title="Figure30_layerTEX_place2d_A_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure30_layerTEX_place2d_A_01-300x143.jpg" alt="" width="300" height="143" /></a><p class="wp-caption-text">Figure 30. Uncheck wrap U and wrap V. Take note of the Translate Frame fields.</p></div>
<p>&nbsp;</p>
<p>Next we’ll have to move down to the texture’s place2dTexture node and make some changes.</p>
<p>I have two areas highlighted in Figure 30.</p>
<p>The first is the translate frame. For our first tile we’ll do nothing, but this is important to take note of. It’s a bit counter intuitive to the process we’ve been using to count tiles, but the two fields of 0 and 0 basically mean u1_v1, or as it sees it zero translation in U or V. Basically it’s our first tile.</p>
<p>&nbsp;</p>
<p>Second is the wrap u and wrap v fields. They’re on by default so your textures will continue repeating in each tile to infinity. Because we have textures for each tile painted we want to turn this off or the process will fail.</p>
<p>And that’s it, the first tile is done.</p>
<div id="attachment_148" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure31_layerTex_tile2_01.jpg"><img class="size-medium wp-image-148" title="Figure31_layerTex_tile2_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure31_layerTex_tile2_01-300x287.jpg" alt="" width="300" height="287" /></a><p class="wp-caption-text">Figure 31. Keep Track of your layers.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Going back to our layered texture node, we now see tile one is blue, signifying it’s got a connection. You’ll notice the white outline around layer 2 which indicates I have it selected and am now ready to make it an “add” blend and assign the texture.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_149" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure32_layerTEX_place2d_B_01.jpg"><img class="size-medium wp-image-149" title="Figure32_layerTEX_place2d_B_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure32_layerTEX_place2d_B_01-300x287.jpg" alt="" width="300" height="287" /></a><p class="wp-caption-text">Figure 32. Translate the next texture/tile over by a full unit.</p></div>
<p>&nbsp;</p>
<p>I go through the same process, making sure my default color is black, but this time in the place2dTexture node I make one change.</p>
<p>As I pointed out in Figure 30, I left the translate frame fields at the default 0,0</p>
<p>For my second tile, which I saved as CubePaint_Tutorial_u2_v1.png, I need to change the field to<strong> translate 1 in UV x, and 0 in UV v</strong></p>
<p>This basically equals our u2_v1 tag.</p>
<p>So the next layer would have a Translate Frame of 2 for your texture u3_v1 and so on.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>When a lot of files are flying around it’s easy to make the mistake of punching in the wrong numbers for your textures, so double check that if your render looks wrong.</p>
<p>So now it’s just a matter of going through the whole process till you have a full assignment of your tiles to the shader network.</p>
<div id="attachment_150" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure33_hypershadeRender_01.jpg"><img class="size-medium wp-image-150" title="Figure33_hypershadeRender_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/Figure33_hypershadeRender_01-300x188.jpg" alt="" width="300" height="188" /></a><p class="wp-caption-text">Figure 33. Final Hypershade and Render.</p></div>
<p>&nbsp;</p>
<p>In the end your Hypershade should look like this, and as you can see I did a quick render to make sure it was working. I’m using a VrayMTL in this one, but as I stated it works in any of the standard Lambert, Blinn, Phong, etc shaders.</p>
<p>&nbsp;</p>
<p>From this point on I usually copy the network and start connecting it to the other channels I’m planning on using; Spec, Reflection, Bump, Displacement, or in the event of using a SSS shader, I’ll plug it into the Sub-surface color, Scatter color, etc.</p>
<p>&nbsp;</p>
<p>That’s pretty much it.</p>
<p>&nbsp;</p>
<p><a href="http://www.disopolis.com/wordpress/?p=211">Part 4, Multitile displacement mapping</a></p>
<p>&nbsp;</p>
<p><strong><em>Update: June 10, 2012 &#8211; To skip directly to how to set up for displacement jump ahead to <a href="http://www.disopolis.com/wordpress/?p=211">part 4</a> of this tutorial series.</em></strong></p>
<p><strong><em>Also I&#8217;m no longer using the layered texture shader method and instead using the +/- Average node method as seen in <a href="http://www.disopolis.com/wordpress/?p=211">Part 4</a>. I&#8217;ll be updating this tutorial to reflect that in the future.</em></strong></p>
<p>&nbsp;</p>
<p><span style="color: #ffffff;"> Tags: CG, Vray, multiple UV, multiTile, multi-tile, UV mapping</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.disopolis.com/wordpress/2011/part-3-muli-tile-shader-setuprendering-in-maya/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Part 2: Multi-Tile UV Mapping</title>
		<link>http://www.disopolis.com/wordpress/2011/multi-tile-uv-mapping-part-2/</link>
		<comments>http://www.disopolis.com/wordpress/2011/multi-tile-uv-mapping-part-2/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 00:09:48 +0000</pubDate>
		<dc:creator><![CDATA[faust]]></dc:creator>
				<category><![CDATA[CG]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Mudbox]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[multi-tile]]></category>
		<category><![CDATA[multiple UV mapping]]></category>
		<category><![CDATA[multiple uv tiles]]></category>
		<category><![CDATA[Multitile]]></category>
		<category><![CDATA[Vray]]></category>

		<guid isPermaLink="false">http://www.disopolis.com/wordpress/?p=102</guid>
		<description><![CDATA[Part 2: Multi-Tile Painting in Mudbox By Brian Freisinger October 17, 2011 &#160; In Part 1, you should have created a basic Cube geo and a mult-tile UV map. We’ll now export our multi-tiled geometry as an .OBJ and bring it into mudbox On a side note, I generally stick with the .OBJ export instead [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Part 2: Multi-Tile Painting in Mudbox</strong></p>
<p><em>By Brian Freisinger</em></p>
<p><em>October 17, 2011</em></p>
<p>&nbsp;</p>
<p><span style="color: #000000;">In <strong><a href="http://www.disopolis.com/wordpress/?p=81">Part 1</a></strong>, you should have created a basic Cube geo and a mult-tile UV map.</span></p>
<p><span style="color: #000000;">We’ll now export our multi-tiled geometry as an .OBJ and bring it into mudbox</span></p>
<p><span style="color: #000000;">On a side note, I generally stick with the .OBJ export instead of .FBX for maya/mudbox back and forth. FBX has a tendency to scale an object up or down by a power of 100 depending on unit settings, and this will cause severe problem when painting a 32 bit displacement map.</span></p>
<p><span style="color: #000000;">32 bit displacement maps are object scale dependant in the calculations of displacement. So I stick with the .obj format which imports and exports a perfect 1:1So export your Cube as an .obj and import it into mudbox.(if it looks weirdly shaded coming in, turn smooth shade off under the ‘display’ menu. Not necessary but it’ll keep this simple primitive from looking annoying while you’re trying to work.</span></p>
<div id="attachment_103" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure12_mudboxLayout_01.jpg"><img class="size-medium wp-image-103" title="figure12_mudboxLayout_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure12_mudboxLayout_01-300x235.jpg" alt="" width="300" height="235" /></a><p class="wp-caption-text">Figure 12. Mudbox UV Layout</p></div>
<p>&nbsp;</p>
<p><span style="color: #000000;">Once it’s imported switch from your 3D view to the UV view using the tabs in the upper left corner.</span></p>
<p><span style="color: #000000;">You should see a UV layout identical to what you exported from your Maya</span></p>
<p><span style="color: #000000;">Now that we’re certain we have a 1:1 UV layout we’ll start painting.</span></p>
<p>&nbsp;</p>
<p><span style="color: #000000;">Everything I’m about to go over applies equally to extracting and using displacement maps, but because this mesh isn’t exactly parameterized to be a subdivision surface object we’ll cover displacement creation/extraction/assignment in a later section.</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_104" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure13_mudboxPaint_01.jpg"><img class="size-medium wp-image-104" title="figure13_mudboxPaint_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure13_mudboxPaint_01-300x279.jpg" alt="" width="300" height="279" /></a><p class="wp-caption-text">Figure 13. Mudbox Paint Tools</p></div>
<p>&nbsp;</p>
<p><span style="color: #000000;">Switch back to the 3D view, and instead of ‘sculpt’ mode, switch to ‘paint’ mode using the upper right “Paint” tab. Make sure you switch to Paint tools and aren&#8217;t using sculpt tools.  </span></p>
<p><span style="color: #000000;">Create a Mudbox Paint Layer at 2048 resolution.</span></p>
<p>I won’t get into the merits of .png vs .tiff (or .exr vs tiff for displacement) in this tutorial, so use whatever file format you want.</p>
<p>(For the record I use png for color and exr for displacement to get the best results.)Ok, so save your mudbox file and we’ll start laying down some quick paint.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_105" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure14_mudboxPaintdemo_01.jpg"><img class="size-medium wp-image-105" title="figure14_mudboxPaintdemo_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure14_mudboxPaintdemo_01-300x269.jpg" alt="" width="300" height="269" /></a><p class="wp-caption-text">Figure 14. Quick Painting Across Tiles</p></div>
<p>&nbsp;</p>
<p>I also generally switch my base material over to a Gesso in Mudbox for paint instead of that weird flesh tone default. But again, not necessary. But for painting I prefer working off a somewhat &#8216;white&#8217; surface.</p>
<p>I just painted some random texture using the included stamps and some color for this.</p>
<p><span style="color: #000000;">I did however be sure to paint on the corners and around the bottom to show off how the seamless painting works with multi-tile and what it looks like in our UV window now.</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_106" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure15_mudboxUVdemo_01.jpg"><img class="size-medium wp-image-106" title="figure15_mudboxUVdemo_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure15_mudboxUVdemo_01-300x179.jpg" alt="" width="300" height="179" /></a><p class="wp-caption-text">Figure 15. Mudbox UV view with Paint</p></div>
<p>&nbsp;</p>
<p><span style="color: #000000;">If you switch back from the 3D view to the UV view in Mudbox you&#8217;ll see we now have 6 separate texture maps for our object.</span></p>
<p><span style="color: #000000;">And also evident is the fact that it’s painting perfectly across the seams.</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_107" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure16_mudboxSeamPaint_01.jpg"><img class="size-medium wp-image-107" title="figure16_mudboxSeamPaint_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure16_mudboxSeamPaint_01-300x250.jpg" alt="" width="300" height="250" /></a><p class="wp-caption-text">Figure 16. Mudbox Detail Painting.</p></div>
<p>&nbsp;</p>
<p><span style="color: #000000;">I created another layer and brought in a photo I took and used is as a stencil to paint along one edge quickly to show off how well mudbox paints across discontinuous UV maps.</span></p>
<p><span style="color: #000000;">So, if you decide to paint another layer or two go ahead. When you’re done save your working file, and flatten your paint layers. (Merge Visible in your Mudbox Menu)</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_108" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure17_mudboxExportPaint_01.jpg"><img class="size-medium wp-image-108" title="figure17_mudboxExportPaint_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure17_mudboxExportPaint_01-300x253.jpg" alt="" width="300" height="253" /></a><p class="wp-caption-text">Figure 17. Exporting Paint Layers from Mudbox</p></div>
<p>&nbsp;</p>
<p><span style="color: #000000;">You can export each layer separately and continue working in Photoshop or another image manipulation package, but for ease in this tutorial we just want one layer exported with our UV tile coordinates.</span></p>
<p>&nbsp;</p>
<p><span style="color: #000000;">So once we have a single layer we’ll export it. Mudbox has a variety of way to export but we’ll just use the ‘export selected’ function (make sure you have your texture selected of course)Export it to a directory of choice. In production I make a lot of subdirectories for my maps with the object name included because of the sheer volume of maps I end up working with.</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_109" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure18_mudboxExporFilest_01.jpg"><img class="size-medium wp-image-109" title="figure18_mudboxExporFilest_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure18_mudboxExporFilest_01-300x84.jpg" alt="" width="300" height="84" /></a><p class="wp-caption-text">Figure 18. Mudbox Exported FIles.</p></div>
<p><span style="color: #000000;">Your end result after exporting should be something like this.</span></p>
<p><span style="color: #000000;">As I mentioned earlier, this all works in an identical fashion with displacement mapping.</span></p>
<p><span style="color: #000000;">Once you extract your displacement maps and write them out they’ll come out with an identical u1_v1, u2_v1, etc coordinate system.</span></p>
<p>&nbsp;</p>
<p><span style="color: #000000;">I highly recommend NEVER changing your uv coordinates at the end of the file. Changing the names is fine as long as you leave the coordinates the same. Reason? If you wish to re-import these into mudbox for any editing, both paint and displacement Mudbox looks for that coordinate I.D. to assign it to the correct tile.</span></p>
<p>&nbsp;</p>
<p><span style="color: #000000;">So I can have a verson 2 or 3 of my original mudbox paint, that I edited in Photoshop, then import it back into Mudbox to clean up any seams or problems before kicking it back out to use in render. You just need to make sure that if you version up you put it before your U and V coordinate ID;</span></p>
<p>&nbsp;</p>
<p>CubePaint_Tutorial_<span style="color: #993300;"><strong>01</strong></span>_u4_v1.png</p>
<p>CubePaint_Tutorial_<strong><span style="color: #993300;">02</span></strong>_u4_v1.png</p>
<p>&nbsp;</p>
<p><span style="color: #000000;">Now that we have both a Multi-Tile piece of Geometry and associated Texture Maps we’ll move on to assignment for rendering.</span></p>
<p>&nbsp;</p>
<p><a href="http://www.disopolis.com/wordpress/?p=135">Part 3: Muli-Tile Shader Setup/Rendering in Maya.</a></p>
<p><strong><br />
</strong></p>
<p><span style="color: #ffffff;"> Tags: CG, Vray, multiple UV, multiTile, multi-tile, UV mapping</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.disopolis.com/wordpress/2011/multi-tile-uv-mapping-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Part 1: Multi-Tile UV Mapping</title>
		<link>http://www.disopolis.com/wordpress/2011/multi-tile-uv-mapping-part-1/</link>
		<comments>http://www.disopolis.com/wordpress/2011/multi-tile-uv-mapping-part-1/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 23:14:51 +0000</pubDate>
		<dc:creator><![CDATA[faust]]></dc:creator>
				<category><![CDATA[CG]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Mudbox]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[multi-tile]]></category>
		<category><![CDATA[multiple UV mapping]]></category>
		<category><![CDATA[Multitile]]></category>
		<category><![CDATA[Vray]]></category>

		<guid isPermaLink="false">http://www.disopolis.com/wordpress/?p=81</guid>
		<description><![CDATA[Multi-Tile UV Mapping Part 1  By Brian Freisinger October 17, 2011 (This tutorial is designed around Maya and Mudbox. Several of the concepts here can be transposed into other 3d software packages that have UV grid control) &#160; STANDARD UV MAPPING vs. MULTI-TILE (This is a basic overview of UV maps and resolutions, if you’re [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Multi-Tile UV Mapping Part 1 </strong></p>
<div><em>By Brian Freisinger</em></div>
<div><em>October 17, 2011</em></div>
<p>(This tutorial is designed around <strong>Maya and Mudbox</strong>. Several of the concepts here can be transposed into other 3d software packages that have UV grid control)</p>
<p>&nbsp;</p>
<p><strong>STANDARD UV MAPPING vs. MULTI-TILE</strong><br />
<em>(This is a basic overview of UV maps and resolutions, if you’re already familiar with this skip ahead to <a href="http://http://www.disopolis.com/wordpress/?p=102">The Multi-Tile Paint found in Part 2</a>.)</em></p>
<p>Why use a Multi-Tile UV solution over Standard UV mapping?</p>
<p>The quick answer is maximum texture resolution.</p>
<p>This technique becomes incredibly useful when dealing with large terrains, or characters which need to have seamless subdivision surface attributes assigned to them;</p>
<p>i.e.there  no way to cut the geometry into smaller sections without ruining the tangent of the subD.</p>
<p>Generally when an object it UV mapped, it’s unwrapped into a flat 0,1 UV coordinate space as seen in the UV editor</p>
<div id="attachment_82" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure1_basicUV_01.jpg"><img class="size-medium wp-image-82" title="figure1_basicUV_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure1_basicUV_01-300x168.jpg" alt="Basic UV" width="300" height="168" /></a><p class="wp-caption-text">Figure 1, Basic UV</p></div>
<p>&nbsp;</p>
<p>Once your UV maps are created, it’s now time to create a shader. In the event you’re using non-procedural textures, you need to determine resolution.</p>
<p>Is it seen from a distance? Is it up close and in need of detail?</p>
<p>Basically is the texture as low as 512k, or as high as 8192k?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>This tutorial won’t go into memory management and high resolution textures, but basically it’s more efficient to load several smaller textures (2k or 2096 for example than larger textures), for the individual user or small shop not using a robust pipeline, this can be almost essential.</p>
<p>&nbsp;</p>
<p>Even in the event that the user is utilizing an 8k texture, it’s not exactly true.<br />
If we divide each square up in UV space we actually only have 819.2k per square.<br />
So looking at the example below, roughly each side of the box has a resolution less than 2438.7k<br />
Probably plenty for most renders, but if you have multiple 8k textures it will start becoming problematic as the 3D program of choice has to load these these into memory, especially if your render engine of choice loads them up front.</p>
<div id="attachment_170" style="width: 308px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure2_resolution_02.jpg"><img class="size-medium wp-image-170" title="figure2_resolution_02" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure2_resolution_02-298x300.jpg" alt="" width="298" height="300" /></a><p class="wp-caption-text">Figure 2. Actual Pixel Resolution</p></div>
<p>&nbsp;</p>
<p>As you can also see, the resolution for actual coverage area exponentially drops as we get into more common 2k texture usage.</p>
<p>Another issue is painting/creating/extracting 8k textures. Again, this is extremely taxing on a system and without enough ram and a good video card you might find yourself working very slowly or even crashing.</p>
<p>With the advent of software packages such as Mudbox and Zbrush, the user can now extract displacement maps from high resolution sculpts. One of the problems that often arises from extracting displacement maps is what is seen sculpted, is often not what is seen in rendering.<br />
Part of this can be attributed to user render settings, but more often than not, it’s also based on the information written out during the extraction process.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The MULTI-TILE</p>
<p>Even with a 8 or 4k map we’re really not getting full coverage. We have to share the area with all pieces of the Geometry, even those that might go unseen or are further away from camera and don’t require all that resolution space. So how do we maximize our pixel resolution?</p>
<p>&nbsp;</p>
<p>And the better question, how do we paint a seamless texture/displacement map across these?</p>
<div id="attachment_84" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure3_defaultUV_01.jpg"><img class="size-medium wp-image-84" title="figure3_defaultUV_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure3_defaultUV_01-300x256.jpg" alt="maya default settings" width="300" height="256" /></a><p class="wp-caption-text">Figure 3. Default UV Grid</p></div>
<p>&nbsp;</p>
<p>The first thing to do is set up our UV grid in Maya so we can be organized. (And so it shares the same UV layout as Mudbox)</p>
<p>The default UV window in maya is set for the standard 0,1 single tile</p>
<p>&nbsp;</p>
<p>To make sure you have a clean UV layout that “talks” to mudbox, and for organizational purposes you need to change the UV grid.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_85" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure4_uvGRID_options_01.jpg"><img class="size-medium wp-image-85" title="figure4_uvGRID_options_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure4_uvGRID_options_01-300x196.jpg" alt="Grid Options" width="300" height="196" /></a><p class="wp-caption-text">Figure 4. UV Grid Option</p></div>
<p>&nbsp;</p>
<p>Open the UV Texture Editor and in the window under:<br />
view &gt; grid &gt; options</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_86" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure5_uvGRID_settings_01.jpg"><img class="size-medium wp-image-86" title="figure5_uvGRID_settings_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure5_uvGRID_settings_01-300x203.jpg" alt="Grid Settings" width="300" height="203" /></a><p class="wp-caption-text">Figure 5. UV Grid Settings</p></div>
<p>&nbsp;</p>
<p>Change the settings to</p>
<p>Length and Width: 10<br />
Grid lines every : 1<br />
Subdivisions : 2</p>
<p>Leave everything else alone.</p>
<p>You can click the ‘tiles’ option if you like, but that doesn’t have any real effect other than darkening the tile borders. It’s visual help only, and doesn’t do anything else to effect mult-tile UV mapping.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_87" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure6_uvGRID_Tiled_01.jpg"><img class="size-medium wp-image-87" title="figure6_uvGRID_Tiled_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure6_uvGRID_Tiled_01-300x187.jpg" alt="UV Grid Tiled" width="300" height="187" /></a><p class="wp-caption-text">Figure 6. UV Grid set to tile 10x10</p></div>
<p>Now looking at our UV Texture Editor it’ll look exactly the same as figure 3, until we select an object (make a default primative cube and select it.)<br />
And we’ll notice that the Default UV map now falls into the first “tile”</p>
<p>&nbsp;</p>
<p>Maya is now set up to visually layout and deal with Mult-TIle UV maps.<br />
Why is this important? Because just like any other UV map, you need to be inside the 0,1 range of each tile. No crossing the borders with sloppy maps. Having the tiles set gives the user a visual boundary of what&#8217;s &#8216;legal&#8217; and what&#8217;s not.<br />
Without this new grid set up it’ll make it really difficult to deal texture assignment, just like any other UV map.</p>
<p>&nbsp;</p>
<div id="attachment_88" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure8_MudboxWarning_bad_01.jpg"><img class="size-medium wp-image-88 " title="figure8_MudboxWarning_bad_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure8_MudboxWarning_bad_01-300x195.jpg" alt="Mudbox Warning" width="300" height="195" /></a><p class="wp-caption-text">Figure 8. Mudbox Warning. UV&#39;s are crossing tile borders.</p></div>
<p>Also you&#8217;ll be able to trouble shoot quickly if a message like this comes up in Mudbox</p>
<p>You can ignore it and paint away, but there’s a pretty good chance mudbox will crash. Even if you manage to survive a crash and paint away, you’ll still need to import good UV’s into mudbox later if you want to extract your map. If you see this message come up, check your UV’s with a fine tooth comb and make sure everything is ‘legal’</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_89" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure9_UVcoordinates_01.jpg"><img class="size-medium wp-image-89" title="figure9_UVcoordinates_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure9_UVcoordinates_01-300x255.jpg" alt="" width="300" height="255" /></a><p class="wp-caption-text">Figure 9. Example of U and V Coordinate I.D.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>We also now have a U and V coordinate system set up, with each tile representing it’s coordinate I.D.</p>
<p>As always, U is horizontal and V is vertical, but now each tile has it’s own coordinate number as well. As seen above (figure9), four tiles over and three tiles up is U4_V1 in coordinate space.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_90" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure9a_UVfiles_01.jpg"><img class="size-medium wp-image-90" title="figure9a_UVfiles_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure9a_UVfiles_01-300x296.jpg" alt="" width="300" height="296" /></a><p class="wp-caption-text">Figure 9a. Mudbox Mult-Tile Saved Files.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>This helps not only from an organizational point of view, but when Mudbox saves out multiMaps it’ll give them a coordinate ID relating to which tile they belong to.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>UV Mapping with Mult-Tile</strong></p>
<p>So now that the grid is set up, we’ll continue using the simple box/cube object and set it up for a multi-tile texture assignment.</p>
<p>So if you haven&#8217;t done it yet, create a simple Cube Primitive in Maya. For our purposes make it perfectly square.</p>
<p>All we&#8217;ll going to do here is select the edges of the box in the UV Texture Editor and use the UV ‘cut’ tool to separate them from their adjoining faces. Basically making a UV per face, or six discontinuous maps.</p>
<p>For speed in learning this, I’d recommend doing this:</p>
<p><strong>1.</strong> Select all the edges of your cube in the UV editor and use the CUT UV EDGES tool.<br />
This will make each face a ‘discontinuous’ UV map.</p>
<div id="attachment_91" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure10_Normalize_01.jpg"><img class="size-medium wp-image-91" title="figure10_Normalize_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure10_Normalize_01-300x256.jpg" alt="" width="300" height="256" /></a><p class="wp-caption-text">Figure 10. Normalize options.</p></div>
<p>&nbsp;</p>
<p><strong>2.</strong> Select all the UV points in the window and normalize them. I recommend opening the Normalize option window and switching to “Each Face Separately”.</p>
<p>We don&#8217;t need to preserve aspect ratio for this since it&#8217;s a square cube, but if you&#8217;ve decided to try something else as a primitive or other Geometry you may want to click that box.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>3.</strong> Next I recommend scaling the UV borders in from the tile’s edge.While not necessary having UV’s to close to the borders, or even to close to each other in UV layout can cause problems when extracting a displacement map in Mudbox (and Zbrush). You can either scale by hand, or script a 5% scale reduction. I use a quick mel command like this:</p>
<p><span style="color: #0000ff;">polyEditUV -pu 0.5 -pv 0.5 -su 0.95 -sv 0.95 ;</span></p>
<p><strong>4.</strong> Now we need to separate each one into it’s own tile.<br />
This can be someone laborious the first few times out, but it’s worth it to make choices and decisions about what goes in what tile. When doing character work I often have certain layouts I like to use based off experience.<br />
For our tutorial though, the cube is arbitrary and we’ll just lay them out quickly across the first 6 tiles.<br />
I can just simply select a single UV and then tell Maya to select shell border to grab a single shell to move it into the next tile over. Most of the time this is fine for initial UV layout, but what if I need to to fall into the exact same UV position of tile one? For example I have a painted texture already that works, I just need to separate each tile out to be EXACTLY in the same UV coordinate space, just different coordinate tile?<br />
Easy.<br />
Again, we’ll use a mel command.</p>
<p><span style="color: #0000ff;">polyEditUV -u 1 -v 0 ;</span></p>
<p>Will move the selected shell exactly one tile over in U to the right, or in positive U</p>
<p><span style="color: #0000ff;">polyEditUV -u -1 -v 0 ;</span></p>
<p>Will move the selected shell exactly one tile over in U, but this time to the left, or in negative U</p>
<p><span style="color: #0000ff;">polyEditUV -u 0 -v 1 ;</span></p>
<p>Will move the selected shell exactly one tile up in V, and of course negative value one tile down.</p>
<p>I have a series of buttons in my interface that say “UV UP, UVDOWN, UV LEFT, UV RIGHT” that I use for doing layout. This assures that if I need to shift a tile for whatever reason, I’m only shifting it in it’s tile coordinates, not it’s true UV texture coordinates.</p>
<div id="attachment_92" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure11_multiTILE_layout_01.jpg"><img class="size-medium wp-image-92" title="figure11_multiTILE_layout_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure11_multiTILE_layout_01-300x256.jpg" alt="" width="300" height="256" /></a><p class="wp-caption-text">Figure 11. Multi-Tile UV layout in Maya</p></div>
<p>&nbsp;</p>
<p>However you decide to shift your UV’s, in the end they should look similar to this:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>We’ll explore what to do with this and how to handle it for rendering in the <a href="http://www.disopolis.com/wordpress/?p=102">next sections</a>.</p>
<p>Tip:</p>
<p>Obviously you don&#8217;t need a single polygon face per UV tile. You can stack as many areas in a tile as necessary. It can really depend on the size/aspect ratio of your maps.</p>
<p>&nbsp;</p>
<p>Here are a couple of more advanced examples of Mult-Tile Layout</p>
<div id="attachment_93" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure11a_multiTILE_walkway_01.jpg"><img class="size-medium wp-image-93" title="figure11a_multiTILE_walkway_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure11a_multiTILE_walkway_01-300x173.jpg" alt="" width="300" height="173" /></a><p class="wp-caption-text">Figure 11a. Multi-Tile Walkway</p></div>
<p>&nbsp;</p>
<p>This one was for a walkway that needed a high level of displacement and paint since the camera was following along the path for the shot.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_94" style="width: 310px" class="wp-caption alignleft"><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure11b_multiTILE_character_01.jpg"><img class="size-medium wp-image-94" title="figure11b_multiTILE_character_01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/figure11b_multiTILE_character_01-300x250.jpg" alt="" width="300" height="250" /></a><p class="wp-caption-text">Figure 11b. Multi-Tile Character Layout</p></div>
<p>&nbsp;</p>
<p>This one is for a female character for a client.</p>
<p>The options are pretty endless once you follow the basic rules.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.disopolis.com/wordpress/?p=102">Part 2. Mudbox and Mult-Tile</a></p>
<p><span style="color: #ffffff;">Tags: CG, Vray, multiple UV, multiTile, multi-tile, UV mapping</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.disopolis.com/wordpress/2011/multi-tile-uv-mapping-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vray &#8211; Mass SubDivision Surface Flag for Maya</title>
		<link>http://www.disopolis.com/wordpress/2011/vray-mass-subdivision-surface-flag-for-maya/</link>
		<comments>http://www.disopolis.com/wordpress/2011/vray-mass-subdivision-surface-flag-for-maya/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 00:33:43 +0000</pubDate>
		<dc:creator><![CDATA[faust]]></dc:creator>
				<category><![CDATA[CG]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Vray]]></category>
		<category><![CDATA[subdivision surface]]></category>

		<guid isPermaLink="false">http://www.disopolis.com/wordpress/?p=30</guid>
		<description><![CDATA[&#160; &#160; &#160; &#160; When you have a lot of objects in a scene and you want to utilize Vray&#8217;s subdivision flag, it can be time consuming to go through the whole lot and flag each one by one. So here&#8217;s a quick mel script to help out. Select all your objects you want flagged as Subdiv [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/vray_for_maya_logo.png"><img class="alignleft size-medium wp-image-32" title="vray_for_maya_logo" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/vray_for_maya_logo-300x200.png" alt="" width="180" height="120" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>When you have a lot of objects in a scene and you want to utilize Vray&#8217;s subdivision flag, it can be time consuming to go through the whole lot and flag each one by one.</p>
<p>So here&#8217;s a quick mel script to help out.</p>
<p>Select all your objects you want flagged as Subdiv and then run this in the script editor:</p>
<p>&nbsp;</p>
<div>
<p>$selected = `ls -sl -l`;</p>
<p>&nbsp;</p>
<p>for ($i=0;$i &lt; size($selected);$i++)</p>
<p>{</p>
<p>$selShape = `listRelatives -shapes $selected[$i]`;</p>
<p>$selFullPath = ($selected[$i]+&#8221;|&#8221;+$selShape[<wbr>0]);</wbr></p>
<p>vrayAddAttr $selFullPath vraySubdivEnable;vrayAddAttr $selFullPath vraySubdivUVsAtBorders;<wbr>vrayAddAttr $selFullPath vraySubdivUVs;</wbr></p>
<p>//print ($selFullPath+&#8221;\n&#8221;);</p>
<p>}</p>
<p><span style="color: #993300;"><em> (Update/Edit : If you find the code throwing you an error like this:</em></span></p>
<p><span style="color: #993300;"><em>// Error: $selFullPath = ($selected[$i]+”|”+$selShape[0]);</em></span></p>
<p><span style="color: #993300;"><em>//</em></span></p>
<p><span style="color: #993300;"><em>// Error: Syntax error // </em></span></p>
<p><span style="color: #993300;"><em>You need to change the quote marks ( ”|” ) </em></span></p>
<p><span style="color: #993300;"><em>Just select them and retype. You can thank wordpress text formatting for that.)</em></span></p>
<p>&nbsp;</p>
<p>You can then set your globals subdiv to be lower (like 6 instead of 256) and flag the important ones to be higher if needed.</p>
<p>There isn&#8217;t a good rule of thumb for how much to subD. It&#8217;s based a lot on how close you get to camera and how dense the geo was to start with.</p>
<p>In the event you&#8217;re using a displacement map, you&#8217;ll want to push this up higher. I find somewhere around the 40-50 gets me where I need  to be without breaking my rendering bank. Again, in the event I need to scrap the paint via camera move I may start pushing this up.  I will however say, I&#8217;ve found that a lot of  &#8221;my renders are really slow&#8221; come from people flagging the subD on their models and leaving it at default. Again, if 90% of my scene needs a 4-6 subD, I&#8217;ll go into the other 10% and give it an override flag, bringing it up to the minimum level to look good.</p>
<p>&nbsp;</p>
<p><a href="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/vraySubDGlobal01.jpg"><img class="alignleft size-medium wp-image-34" title="vraySubDGlobal01" src="http://www.disopolis.com/wordpress/wp-content/uploads/2011/10/vraySubDGlobal01-300x233.jpg" alt="" width="300" height="233" /></a></p>
<p>&nbsp;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.disopolis.com/wordpress/2011/vray-mass-subdivision-surface-flag-for-maya/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
