<?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>Vidar Rapp &#187; maya</title>
	<atom:link href="http://www.vidarrapp.se/tag/maya/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vidarrapp.se</link>
	<description>blog &#38; art dump</description>
	<lastBuildDate>Fri, 26 Feb 2010 16:55:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Render Layers in Maya 8.5</title>
		<link>http://www.vidarrapp.se/2008/05/09/using-render-layers-in-maya-85/</link>
		<comments>http://www.vidarrapp.se/2008/05/09/using-render-layers-in-maya-85/#comments</comments>
		<pubDate>Fri, 09 May 2008 16:51:10 +0000</pubDate>
		<dc:creator>Vidar Rapp</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[mental ray]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[game art]]></category>
		<category><![CDATA[maya]]></category>
		<category><![CDATA[production tips]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://www.vidarrapp.se/?p=364</guid>
		<description><![CDATA[Something I&#8217;ve found that not many game artists are familiar with is the Render Layers found in Maya since version 7.
They can be extremely handy if you want to render your scene in passes, but they can also be very helpful when baking geometry to textures.

Quick Overview
You&#8217;ll find the render layers in Maya if you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vidarrapp.se/wp-content/bakedtextures.jpg"><img class="alignleft size-thumbnail wp-image-367" style="float: left;" title="bakedtextures" src="http://www.vidarrapp.se/wp-content/bakedtextures-150x150.jpg" alt="" width="150" height="150" /></a>Something I&#8217;ve found that not many game artists are familiar with is the Render Layers found in Maya since version 7.</p>
<p>They can be extremely handy if you want to render your scene in passes, but they can also be very helpful when baking geometry to textures.</p>
<p><span id="more-364"></span></p>
<p><strong>Quick Overview</strong></p>
<p>You&#8217;ll find the render layers in Maya if you switch from &#8220;Display&#8221; to &#8220;Render&#8221;, above your layer panel on the right hand side of your standard Maya layout. By default there are no render layers active, so we&#8217;ll have to go ahead and choose Layer &gt; Create Empty Layer.</p>
<p>This will create two layers, one named <em>layer1 </em>and one called <em>masterLayer</em>. The <em>masterLayer </em>is your default layer, containing all the objects in your scene as well as all your scene settings.</p>
<p>In order to make use of <em>layer1 </em>we&#8217;ll first have to add some of our objects to it, do this by selecting the objects you want to add and then right clicking on <em>layer1</em> and choosing Add Selected Objects. Also note that you can remove objects from the layer in the same fasion, just like with regular Display Layers.</p>
<p>If you right click on <em>layer1</em> you&#8217;ll find that there are some set presets which we can apply to our layer, under the Presets-menu. These include Luminance Depth, Occlusion, Normals, Diffuse, Specula and Ambient render presets. I&#8217;ll show how to make use of some of these in the next section.</p>
<p><strong>Layer Overrides</strong></p>
<p>You can basically create a layer override on any attribute in Maya, simply by right clicking on it&#8217;s name and then choosing Create Layer Override (this requires that you currently have a render layer selected). This will tell Maya to treat that attribute as a unique setting for that layer only, so no matter how you alter that attribute in other layers it will stay the same in this one. Also remember to create the layer override before you change its value, or you will actually be changing that value for every other layer as well.</p>
<p>Attributes that have layer overrides, will show in orange for that specific layer, which is handy when you&#8217;re using the layer presets.</p>
<p>You could for example put a light on both layers 1 and 2, and then set a &#8220;layer override&#8221; that will tell the light not to cast shadows on layer 2.</p>
<p>By default, all layers will use the same render settings, unless you are using a render layer preset. By creating a layer override you could for example tell maya to render a specific layer using Mental Ray and Final Gathering, while using the Maya Software Renderer for your other layers.</p>
<p><strong>Production example: Creating multiple textures using Render Layers</strong></p>
<p>I find it&#8217;s always easier to explain things with a real world example, so that&#8217;s what I&#8217;m going to try here. I created some random poly geometry that I&#8217;ll be setting up render layers for, as well as an ortographic camera to render it with.</p>
<p><a href="http://www.vidarrapp.se/wp-content/grey.jpg"><img class="alignnone size-medium wp-image-370" title="grey" src="http://www.vidarrapp.se/wp-content/grey-300x300.jpg" alt="" width="300" height="300" /></a></p>
<p><em>image: some example geometry for this tutorial.</em></p>
<p>I started out by creating a polygon plane 1*1 meters big and at an 90 degree angle towards the front-camera. Then set up the rendering resolution to 512*512 pixels.</p>
<p>Lock the XYZ-translation on the front-camera and set the the Orthographic Width (found under Orthographic Views-tab in the camera&#8217;s Attribute Editor) to 10 and lock that as well.</p>
<p>Your Orthographic Width may differ depending on your scene&#8217;s unit-settings. Just make sure that your front-camera&#8217;s render region exactly matches the size of your initial polygon plane, the best way to do this is to open the Attribute Editor, select your front-camera and choose Display Options &gt; Display Resolution. Also set the Overscan to something like 1.3-1.5.</p>
<p>That way you can see exactly what portion of your viewport will be rendered and can easily match up your Orthographic Width to the size of your polygon plane.</p>
<p>As soon as you have your front-camera and base plane set up it&#8217;s time to do some modelling, at this stage you can also take the time to apply some basic materials to your geometry, see below. While doing this, feel free to use any shaders, textures and shading networks, even procedural textures. Since the result will be baked to a texture anyway it does not matter what you use to get your final diffuse. Colored speculars would be good to set up at this point as well, since they will show up nicely in the specular-render.</p>
<p><a href="http://www.vidarrapp.se/wp-content/colored.jpg"><img class="alignnone size-medium wp-image-368" title="colored" src="http://www.vidarrapp.se/wp-content/colored-300x300.jpg" alt="" width="300" height="300" /></a></p>
<p><em>image: some coloured materials applied to the geometry. </em></p>
<p>When you&#8217;re satisfied with the general complexity of your geometry, it&#8217;s time to set up our render layers.</p>
<p>To do this, simply follow the instructions in the overview section of this article, creating a layer for diffuse, occlusion, normal and specular and assigning the matching preset for each layer. Don&#8217;t forget to assign all your geometry to each layer as well.</p>
<blockquote><p>Some tweaking may be nessiccary at this point, I would suggest changing the pixel filtering on the normal-layer to Triangular Filtering with a size of 1 &#8211; 1.5, in the Render Settings for that layer. Otherwise you may loose quite a bit of sharpness in your normal-maps. I would also suggest increasing the samples on the mib_occlusion-shader that is created when you use the occlusion-preset.</p></blockquote>
<p>To render your texture maps, simply choose the layer you want to render, then open your Render View and choose Render &gt; Render &gt; Front. These were the resulting textures I got from rendering my example scene from the front-camera.</p>
<p><a href="http://www.vidarrapp.se/wp-content/diffuse.jpg"><img class="alignnone size-thumbnail wp-image-369" title="diffuse" src="http://www.vidarrapp.se/wp-content/diffuse-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.vidarrapp.se/wp-content/occlusion.jpg"><img class="alignnone size-thumbnail wp-image-372" title="occlusion" src="http://www.vidarrapp.se/wp-content/occlusion-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.vidarrapp.se/wp-content/normal.jpg"><img class="alignnone size-thumbnail wp-image-371" title="normal" src="http://www.vidarrapp.se/wp-content/normal-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.vidarrapp.se/wp-content/specular.jpg"><img class="alignnone size-thumbnail wp-image-373" title="specular" src="http://www.vidarrapp.se/wp-content/specular-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><em>image: resulting renders from the Diffuse, Occlusion, Normal and Specular render layers.</em></p>
<p>I then multiplied the Occlusion render on top of the Diffuse in Photoshop and assigned all the textures to a shader on a simple poly plane, see below.</p>
<p><a href="http://www.vidarrapp.se/wp-content/bakedtextures.jpg"><img class="alignnone size-full wp-image-367" title="bakedtextures" src="http://www.vidarrapp.se/wp-content/bakedtextures.jpg" alt="" width="500" height="653" /></a></p>
<p><em>image: Resulting textures applied to a plane and rendered in Maya&#8217;s high quality render mode.</em></p>
<p>You can download this scene below and either use it as a guide when doing your own geometry/material baking or for reference purposes.</p>
<p><a href="http://www.vidarrapp.se/wp-content/example.mb">Download example maya scene (Maya 8.5)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vidarrapp.se/2008/05/09/using-render-layers-in-maya-85/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mental Ray &#8211; skin shading</title>
		<link>http://www.vidarrapp.se/2008/05/08/metal-ray-secrets/</link>
		<comments>http://www.vidarrapp.se/2008/05/08/metal-ray-secrets/#comments</comments>
		<pubDate>Thu, 08 May 2008 07:30:37 +0000</pubDate>
		<dc:creator>Vidar Rapp</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[maya]]></category>
		<category><![CDATA[mental ray]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[skin shading]]></category>

		<guid isPermaLink="false">http://www.vidarrapp.se/?p=361</guid>
		<description><![CDATA[I've been doing a lot of rendering at work lately, and I figurered I could share some of what I've learned as well as some old tricks.

]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-363" href="http://www.vidarrapp.se/2008/05/08/metal-ray-secrets/misss_fastskin2mia_material/"><img class="alignleft size-thumbnail wp-image-363" style="float: left;" title="misss_fastskin2mia_material" src="http://www.vidarrapp.se/wp-content/misss_fastskin2mia_material-150x150.jpg" alt="Using mia_material together with misss_fast_skin shader." width="150" height="150" /></a><span style="font-weight: bold">Better skin with the mia_material</span><br />
By combining the blurry reflections and built-in ambient occlusion of the mia_material with the layered subsurface scattering of the misss_fast_skin shader you can get great looking skin while maintaining artistic control.</p>
<p><span id="more-361"></span></p>
<p>If you want to archive this, begin by setting the specular weight of your misss_fast_skin-node to 0. Also set your diffuse weight on your mia_material to 0. Then connect your misss_fast_skin-node to the Additional Color-input on your mia_material. This way you have all your diffuse component coming from the misss_fast_skin-node and all of the specular component of the mia_material.</p>
<p>What you then want to do is to connect the misss_fast_lmap to the Light Map Shader slot of the mia_material&#8217;s Shading Group. Simply drag and drop the misss_fast_lmap into the slot (with the middle mouse button). Your shading network should look like below.</p>
<p><a href="http://www.vidarrapp.se/wp-content/misss_fastskin2mia_material.jpg"><img class="alignnone size-full wp-image-363" title="misss_fastskin2mia_material" src="http://www.vidarrapp.se/wp-content/misss_fastskin2mia_material.jpg" alt="Using mia_material together with misss_fast_skin shader." width="500" height="318" /></a></p>
<p><em>example: Connecting the lightmap-shader to the mia_material&#8217;s Shading Group. </em></p>
<p>Don&#8217;t forget you still have to feed a writable 32bit mentalrayTexture to the misss_fast_lmap and connect that texture to the lightmap input on the misss_fast_skin-node.</p>
<p><span style="font-weight: bold">Using normal and bump maps with the mia_material</span><br />
Sadly, in maya 8.5, assigning a bump map to the mia_material can be quite troublesome, the documentation suggests a lenghty arrangement of nodes that I at first could make no sense of.</p>
<p>However I found a quick (and dirty) solution which involves borrowing the misss_set_normal-node from the misss-shaders. Just connect a misss_set_normal-node to the bump-slot of the mia_material and then connect a bump2d-node to the normal-input on the misss_set_normal-node. This way you can easily connect a file texture to your bump2d-node. A greyscale bump-map or even a tangentspace normal map will both work fine this way.</p>
<p><a href="http://www.vidarrapp.se/wp-content/normal2miamat.jpg"><img class="alignnone size-full wp-image-362" title="normal2miamat" src="http://www.vidarrapp.se/wp-content/normal2miamat.jpg" alt="Connect normal map to mia_material" width="500" height="136" /></a></p>
<p><em>example: normal-map connected to mia_material through bump2d and misss_set_normal node.</em></p>
<p>In later articles I will discuss:</p>
<p><strong>Making more use of the mia_material</strong><br />
Getting into the nitty gritty of metal IOR&#8217;s, colored reflections and reflection curves. And much more</p>
<p><strong>Using the mr physical sun &amp; sky</strong><br />
How to light your scene with a full dynamic range and render to an High Dynamic Range (HDR) Image and how to avoid common problems, such as using textures with a low dynamic range in your scene.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vidarrapp.se/2008/05/08/metal-ray-secrets/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
