<?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>Julius Ihle &#187; renderman</title>
	<atom:link href="http://julius-ihle.de/?feed=rss2&#038;tag=renderman" rel="self" type="application/rss+xml" />
	<link>http://julius-ihle.de</link>
	<description>LookDev/Lighting TD &#124; Compositor</description>
	<lastBuildDate>Sun, 18 Jun 2023 07:39:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Smoothing dotty Specular Highlights in Motionblur</title>
		<link>http://julius-ihle.de/?p=2228</link>
		<comments>http://julius-ihle.de/?p=2228#comments</comments>
		<pubDate>Tue, 20 Sep 2016 20:06:21 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arnold]]></category>
		<category><![CDATA[fireflies]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[mblur]]></category>
		<category><![CDATA[noise]]></category>
		<category><![CDATA[path tracer]]></category>
		<category><![CDATA[raytracing]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[Sampling]]></category>
		<category><![CDATA[shading]]></category>
		<category><![CDATA[vfx]]></category>
		<category><![CDATA[visual effects]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=2228</guid>
		<description><![CDATA[One of the worst things to sample for any brute-force ray tracer are specular highlights / reflections with a low roughness in motion blur. Even&#8230;<p><a href="http://julius-ihle.de/?p=2228" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://julius-ihle.de/?p=2228"><img class="lazyload alignleft wp-image-2229" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/mblurroughness.png" alt="mblurroughness" width="800" height="333" /></a></p>
<p>One of the worst things to sample for any brute-force ray tracer are specular highlights / reflections with a low roughness in motion blur. Even worse so on fine displacements or bump. And EVEN more worse with lots of small highlights. When all of these things come together sampling these highlights in motionblur is going to become really hard and with conventional methods you will end up having to rely on extemely high AA samples and even then the highlight-streaks will most likely still be dotty&#8230; And you won&#8217;t make any friends if they have to paint these streaks smooth in Comp :) So during the crunch time of a recent project I was brain storming with some of my collegues how this could potentially be fixed without needing too much samples and I&#8217;ve been working on implementing that idea which seems to work quite nicely.</p>
<p><span id="more-2228"></span></p>
<div id="attachment_2233" style="width: 810px" class="wp-caption aligncenter"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/vlcsnap-2016-09-20-22h38m54s198.png" target="_blank"><img class="lazyload wp-image-2233" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/vlcsnap-2016-09-20-22h38m54s198.png" alt="vlcsnap-2016-09-20-22h38m54s198" width="800" height="453" /></a><p class="wp-caption-text">If you try to sample this speedy fella in an environment like that with this look you will inevitably end up with streaky specs.</p></div>
<p style="text-align: left;">So how do you fix it without changing the look? Let&#8217;s say you have a simple scene like the following:</p>
<p style="text-align: left;"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/01_base_nomblur.png"><img class="lazyload aligncenter size-full wp-image-2234" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/01_base_nomblur.png" alt="01_base_nomblur" width="1679" height="579" /></a></p>
<p style="text-align: left;">In this case I&#8217;m using Arnold, but the base concept is the same with any renderer. Low roughness on the specs + bumpy surface + lots of harsh highlights result in something like this when you turn on motionblur:</p>
<p style="text-align: left;"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/02_mblur_base.png"><img class="lazyload aligncenter size-full wp-image-2235" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/02_mblur_base.png" alt="02_mblur_base" width="1679" height="580" /></a></p>
<p style="text-align: left;">This one already has 12 AA samples + 2 light samples. It won&#8217;t get much smoother just cranking up the samples, but trust me it will render longer :) One way to smooth the streaks out however would be to<strong> increase the roughness</strong> and <strong>decrease the bump / displacement</strong>.</p>
<p style="text-align: left;"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/02_mblurrough.png"><img class="lazyload aligncenter size-full wp-image-2236" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/02_mblurrough.png" alt="02_mblurrough" width="1679" height="555" /></a></p>
<p style="text-align: left;">That looks way better. However the problem with this is that these adjustments will affect the look a lot and the asset will look very different in non-motionblurred frames. So let&#8217;s make it work only when the character is in motionblur.<br />
Most renderers offer some sort of a node that allows you to extract the motion vectors from a moving object, which basically define what distance each point on an object travels from one frame to another in XYZ.<br />
<a href="http://julius-ihle.de/wp-content/uploads/2016/09/03_mvector_base_annotated.png"><img class="lazyload aligncenter size-full wp-image-2241" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/03_mvector_base_annotated.png" alt="03_mvector_base_annotated" width="1679" height="578" /></a></p>
<p style="text-align: left;">As you can see we get quite big values for this frame just outputting the raw motion vectors. It&#8217;s very important that they are in a raw format and not normalized, because otherwise you won&#8217;t have the actual movement distance but just something normalized (positive values between 0-1) to make it better visible.<br />
Now these negative values won&#8217;t help us much. Eventually we want to be able to use this infortmation as a mask to switch between rough/blurry (for motion blur areas) and sharp reflections (for non-motionblurred areas).<br />
So let&#8217;s make sure these values are always absolute.</p>
<p style="text-align: left;"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/04_abs_mvector1.png"><img class="lazyload aligncenter size-full wp-image-2242" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/04_abs_mvector1.png" alt="04_abs_mvector" width="1679" height="576" /></a></p>
<p style="text-align: left;">This way no matter what the motionvector outputs, they will always be positive. Now we need to convert this to a float to make it useable as a mask. In this case a simple RGB to luminance won&#8217;t quite cut it as you will have a weighted average of the movement in X,Y and Z. You can use a max or a sum of all the three channels to always make sure you grab the biggest motion.</p>
<p style="text-align: left;"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/05_rgbtofloat.png"><img class="lazyload aligncenter size-full wp-image-2239" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/05_rgbtofloat.png" alt="05_rgbtofloat" width="1679" height="578" /></a></p>
<p style="text-align: left;">The only thing left to do is to bring the whole thing into a suitable normalized range to be able to use it as a mask. How you are remapping it, depends on at which point you want to completely switch from one roughness to the other. If you have your usual range/remap node you can specify with the input max at which point the value of the resulting mask should be 1. If I&#8217;d set it to 30 for example, as soon as the motionvector reaches a value of 30 it will result in a white mask and it will smoothly blend to 0 for areas/frames with no motion. We can use this mask then to mix between 2 roughness and bump values or textures. This way we retain the look of the original asset and have nice and smooth motion blur.<br />
Here&#8217;s a before and after frame with this method. Both have the same sampling settings</p>
<p style="text-align: left;"><a href="http://julius-ihle.de/wp-content/uploads/2016/09/06_mix_result.png"><img class="lazyload aligncenter size-full wp-image-2240" data-original="http://julius-ihle.de/wp-content/uploads/2016/09/06_mix_result.png" alt="06_mix_result" width="1679" height="578" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
<span style="color: #808080;">_________________________________________________</span><br />
<span style="color: #808080;"><span style="font-size: small;"> If this post has helped you in any way you can express your gratefulness by using the <em>Donate </em>Button below to buy me a coffee! :)</span></span><br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=VH5RW3YDWDJSQ" target="_blank" rel="nofollow"><img class="lazyload" data-original="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" /></a></p>
<div class="moz-text-html" lang="x-unicode">
<div><span style="font-size: small;"><span style="color: #808080;">3M5xNSV7g2NzVpHMqzYKhgoKJZ8CWa644m</span></span><br />
<img class="lazyload alignleft size-full wp-image-2576" data-original="http://julius-ihle.de/wp-content/uploads/2018/03/bc_ldgr_qrcode.png" alt="bc_ldgr_qrcode" width="128" height="128" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=2228</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Sampling in RenderMan/RIS</title>
		<link>http://julius-ihle.de/?p=547</link>
		<comments>http://julius-ihle.de/?p=547#comments</comments>
		<pubDate>Sun, 05 Jul 2015 17:26:52 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cg]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[optimizing]]></category>
		<category><![CDATA[path tracer]]></category>
		<category><![CDATA[prman]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[sampler]]></category>
		<category><![CDATA[vfx]]></category>
		<category><![CDATA[visual effects]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=547</guid>
		<description><![CDATA[The new RIS mode introduced in RenderMan 19 is a completely new render-engine that is very different from REYES. Being a brute force path tracer&#8230;<p><a href="http://julius-ihle.de/?p=547" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://julius-ihle.de/?p=547"><img class="lazyload alignleft wp-image-575" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/ris_sampling.jpg" alt="ris_sampling" width="800" height="333" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">The new RIS mode introduced in RenderMan 19 is a completely new render-engine that is very different from REYES. Being a brute force path tracer (uni- and bidirectional modes) it works much more like other renderers that follow a similar approach (e.g. Arnold). That approach aims to make the render process more simple and interactive. And while I personally don&#8217;t like it completely yet it seems to get widely adopted in the film industry and we all have to adjust to it sooner or later :)<span id="more-547"></span><br />
The good thing about RIS is that it offers a much more interactive way of working. The interface and controls are much simpler now and offer easier controls to tweak your renders. However this comes at the price that compared to Reyes I have seen final rendering times increase by 3-6 times, because all the hacks are removed for a &#8220;physically plausible&#8221; workflow.<br />
Now because there is not a lot of stuff you can tweak to squeeze rendering times it is important to understand how sampling in RIS works. RIS uses importance sampling, which in layman terms means instead of uniformly sampling an area above the hemisphere it concentrates samples around the areas that are more important (e.g. brighter, higher solid angle, etc.). Here&#8217;s a good example comparison with 2 objects &#8211; just 1 high contrast environment light importance sampled vs uniformly sampled (same number of samples):</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/importance_sampling.jpg"><img class="lazyload  size-medium wp-image-548 aligncenter" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/importance_sampling-300x150.jpg" alt="importance_sampling" width="300" height="150" /></a><br />
Importance sampling is the standard sampling method in PRMan (both REYES and RIS) due to its obvious benefits.<br />
The main settings in the render globals that control the quality of the final image are the following:<br />
Min Samples<br />
Max Samples<br />
Pixel Variance<br />
Light Samples<br />
Bxdf Samples<br />
Indirect Samples</p>
<p style="text-align: justify;">The way it works is fairly straight forward: Min- and MaxSamples are a global setting for every kind of sampling in your scene (AA, Light, Shader, GI Sampling). The amount of Samples for each of those will never be higher than MaxSamples and never lower than Min Samples.<br />
The parameter to control whether the Sampling biases towards Min or Max Samples is the Pixel Variance. Starting with Min Samples RIS will check the contrast (=noise) between the current sampling-point and those around it. If that contrast is higher than the value specified for Pixel Variance it will adaptively continue to shoot more Samples for that point until the contrast is equal or lower to the Pixel Variance (with Max Samples as a maximum). Therefore a lower Pixel Variance will increase the likelyhood of more rays being fired and therefore a better quality image (and also longer rendering time).<br />
As noted before the problem with just using Min/MaxSamples/Pixel Variance as your global is that it affects all the Sampling in your scene. So if your shadows are grainy for example, but speculars, GI, motion blur, etc look clean, increasing the MaxSamples or reducing the Pixel Variance might give you clean shadows but also waste samples for all other sampling methods in your scene.<br />
Therefore you also have Sampling controls for Lights, Bxdf&#8217;s and Indirect rays. Which one of them to use in a particular scenario depends on a couple of factors.<br />
Indirect is the most obvious knob. Increasing it will spawn more indirect rays after the first bounce (=rays that cannot be directly connected back to a light source). This inhabits indirect diffuse, indirect specular (reflection/refraction) and subsurface. You can gain finer control over the sampling counts on each of these by changing the SampleMode from &#8220;bxdf&#8221; to &#8220;manual&#8221;. That way you can specify exact values for a given indirect ray type.<br />
When to use LightSamples vs BxdfSamples isn&#8217;t quite as obvious at first. It depends on what kind of surface you are shading. The main indicator here is the lobe of the BXDF. Let&#8217;s say you have a plain diffuse material. Increasing the Bxdf samples in that case won&#8217;t benefit you much, because a diffuse surface naturally has a very wide lobe. That way increasing the sampling on the Shader will result in a lot of wasted samples:<br />
<a href="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_bxdfs_diffSurf.jpg"><img class="lazyload  size-medium wp-image-551 aligncenter" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_bxdfs_diffSurf-300x169.jpg" alt="dgrm_bxdfs_diffSurf" width="300" height="169" /></a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/diff_base.jpg"><img class="lazyload  size-medium wp-image-549 aligncenter" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/diff_base-300x238.jpg" alt="diff_base" width="300" height="238" /> </a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/diff_bxdfs.jpg"><img class="lazyload  size-medium wp-image-550 aligncenter" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/diff_bxdfs-300x238.jpg" alt="diff_bxdfs" width="300" height="238" /></a></p>
<p style="text-align: justify;">Note that all the renders are scaled up crops to better show the sampling problems.<br />
However if you are using Light-Sampling things get a lot more efficient as you are now shifting the importance towards the lights:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_ls_diffSurf.jpg"><img class="lazyload aligncenter size-medium wp-image-559" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_ls_diffSurf-300x169.jpg" alt="dgrm_ls_diffSurf" width="300" height="169" /></a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/diff_ls.jpg"><img class="lazyload aligncenter size-medium wp-image-560" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/diff_ls-300x238.jpg" alt="diff_ls" width="300" height="238" /></a></p>
<p style="text-align: justify;">In comparison to get a similarly clean image by solely adjusting the Min/MaxSamples and PixelVariance and leaving LightSamples at its default of 1 you will waste a lot of rendertime to get the same result:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/diff_maxs.jpg"><img class="lazyload aligncenter size-medium wp-image-561" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/diff_maxs-300x238.jpg" alt="diff_maxs" width="300" height="238" /></a></p>
<p style="text-align: justify;">As you might have guessed for direct specular shading that has a very tight lobe (=more mirror-like) it works the exact opposite. Because the lobe is so narrow adjusting light Samples globally will most likely not reduce noise as it&#8217;s very unlikely for all the lights to have an effect on the given point of shading:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_ls_specSurf.jpg"><img class="lazyload aligncenter size-medium wp-image-562" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_ls_specSurf-300x169.jpg" alt="dgrm_ls_specSurf" width="300" height="169" /></a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/spec_base.jpg"><img class="lazyload aligncenter size-medium wp-image-563" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/spec_base-300x238.jpg" alt="spec_base" width="300" height="238" /></a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/spec_ls.jpg"><img class="lazyload aligncenter size-medium wp-image-564" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/spec_ls-300x238.jpg" alt="spec_ls" width="300" height="238" /></a></p>
<p style="text-align: justify;">&#8230;increasing the Bxdf Samples however is way more efficient:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_bxdfs_specSurf.jpg"><img class="lazyload aligncenter size-medium wp-image-565" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/dgrm_bxdfs_specSurf-300x169.jpg" alt="dgrm_bxdfs_specSurf" width="300" height="169" /></a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/spec_bxdf.jpg"><img class="lazyload aligncenter size-medium wp-image-566" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/spec_bxdf-300x238.jpg" alt="spec_bxdf" width="300" height="238" /></a></p>
<p style="text-align: justify;">And once again, just using Min/MaxSamples and PixelVariance to adjust the quality wastes more time than needed:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/spec_maxs.jpg"><img class="lazyload aligncenter size-medium wp-image-567" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/spec_maxs-300x238.jpg" alt="spec_maxs" width="300" height="238" /></a></p>
<p style="text-align: justify;">Now, what about rough speculars? Often times reflections are having a broader lobe which sits somewhere inbetween that of a rather mirror-like specular and a diffuse lobe. In that case you have to mix between Light- and Bxdf Samples. Due to RIS taking advantage of multiple importance sampling it tries to automatically allocate samples that make the most sense for the current shadingpoint. But as a general rule of thumb I personally found that for a roughness of ~30% using the same value for Light- and Bxdf Samples gives a good starting point. If the spec gets more shiny you bias towards Bxdf Sampling and if it gets rougher you bias towards Light Sampling.</p>
<p style="text-align: justify;">Once the direct light components are noise-free, indirect noise tends to be a bit harder to tackle as this will be the main source of noise most of the time. Often times unfortunately adjusting Indirect Samples will only get you so far until render times start to explode:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/specind_base.jpg"><img class="lazyload aligncenter size-medium wp-image-570" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/specind_base-300x238.jpg" alt="specind_base" width="300" height="238" /></a></p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/specind_samples.jpg"><img class="lazyload aligncenter size-medium wp-image-569" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/specind_samples-300x238.jpg" alt="specind_samples" width="300" height="238" /></a></p>
<p style="text-align: justify;">The MaxSpecularDepth in this scene and on the objects is 4. As you can see even with 10 indirect samples the render isn&#8217;t really as smooth as it should be. Luckily you have 2 more options that can help eliminate noise. Clamp Depth and Clamp Luminance. Sampling Fireflies usually happen when there is a big contrast between higher and lower luminance sampling points. The clamp controls try to get rid of those brighter samples to reduce the noise. If you for example set the clamp depth to 2 and the clamp luminance to 1 it means that starting from the 2nd bounce of the light path (be it diffuse, specular or subsurface) the sample intensity will be clamped to 1, meaning no samples at this depth have a higher value than the one specified in the clamp luminance:</p>
<p style="text-align: justify;"><a href="http://julius-ihle.de/wp-content/uploads/2015/07/specind_clamp.jpg"><img class="lazyload aligncenter size-medium wp-image-571" data-original="http://julius-ihle.de/wp-content/uploads/2015/07/specind_clamp-300x238.jpg" alt="specind_clamp" width="300" height="238" /></a></p>
<p style="text-align: justify;">As you can see the resulting image is much cleaner. I was even able to reduce the indirect samples and still get a cleaner result and lower rendering time. However you also have to be careful to not set your clamp luminance too low as this might produce too washed-out-looking bounces.<br />
You can also control indirect sampling through the Roulette Depth/Threshold Control. This will randomly terminate a percentage of samples (threshold) at a given depth. The default values of 4 for roulette depth and 0.2 for roulette threshold means that starting at the 4th bounce of light 20% of the samples will randomly be terminated. This control is useful if you have a lot of light bounces and want to get rid of unneccesserely low-importance samples at larger depths. And while it reduces render times nicely it also reduces quality at the same time, so those controls should be used with caution.</p>
<p style="text-align: justify;">As a general workflow what personally worked best for me is to usually<br />
1) Adjust Min-/MaxSamples and PixelVariance until I get clean Anti-Aliasing and motion blur (..and DOF).<br />
2) Check the diffuse_direct AOV for noise and increase Light Samples if needed<br />
3) Check the specular_direct AOV for noise and balance between increasing Bxdf/Light samples Samples if needed (depending on spec roughness)<br />
4) Check diffuse_indirect, specular_indirect and subsurface and increase indirect Samples as needed<br />
5) Try to play with Roulette Depth/Threshold &amp; Clamp Depth/Luminance to eliminate fireflies</p>
<p style="text-align: justify;">I always try to not go higher than needed with Min-/MaxSamples and PixelVariance. They tend to be the most sensitive control and increase render times the most.<br />
Also often times globally adjusting a sampling type may be excessive when only one light/surface produces noise. For lights you can adjust samples individually, which is quite cool if you have a scene with lots of lights but only the shadows from your keylight are noisy for example. Unfortunately individual sampling controls for controlling the sampling on shaders are not exposed in the out-of-the-box pixar shaders, so unless you create your own you have to adjust Bxdf samples globally.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
<span style="color: #808080;">_________________________________________________</span><br />
<span style="color: #808080;"><span style="font-size: small;"> If this post has helped you in any way you can express your gratefulness by using the <em>Donate </em>Button below to buy me a coffee! :)</span></span><br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=VH5RW3YDWDJSQ" target="_blank" rel="nofollow"><img class="lazyload" data-original="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" /></a></p>
<div class="moz-text-html" lang="x-unicode">
<div><span style="font-size: small;"><span style="color: #808080;">3M5xNSV7g2NzVpHMqzYKhgoKJZ8CWa644m</span></span><br />
<img class="lazyload alignleft size-full wp-image-2576" data-original="http://julius-ihle.de/wp-content/uploads/2018/03/bc_ldgr_qrcode.png" alt="bc_ldgr_qrcode" width="128" height="128" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=547</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More Katana Macros/Tools</title>
		<link>http://julius-ihle.de/?p=492</link>
		<comments>http://julius-ihle.de/?p=492#comments</comments>
		<pubDate>Sat, 28 Feb 2015 10:12:44 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arnold]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[gobo]]></category>
		<category><![CDATA[katana]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[lookdev]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[slidemap]]></category>
		<category><![CDATA[vfx]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=492</guid>
		<description><![CDATA[During the last year I luckily had some time to spend on digging a bit deeper into Katana. From working on assets and shots I&#8230;<p><a href="http://julius-ihle.de/?p=492" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://julius-ihle.de/?p=492"><img class="lazyload alignleft wp-image-493" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/katana_dev.jpg" alt="katana_dev" width="800" height="333" /></a></p>
<p style="text-align: justify;">During the last year I luckily had some time to spend on digging a bit deeper into Katana. From working on assets and shots I experienced some moments where I thought it&#8217;d be great to have some basic tools to help get the job done just a little bit quicker. So whenever I had a bit of spare time I was developing some Macros/Gizmos/Tools to help artists on some common problems.<span id="more-492"></span></p>
<p><iframe src="//player.vimeo.com/video/120869259" width="500" height="281" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p><a href="https://vimeo.com/120869259">Katana Macro/Tool Dev</a> from <a href="https://vimeo.com/julsvfx">Julius Ihle</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
<p>&nbsp;</p>
<p>One of the tools is a macro that helps managing multiple lights. Based on a CEL you can freely modify exposed shading and transform parameters. This especially comes in handy in scenes with bigger environments that have to be lit with multiple light sources. It also features some randomization controls for lightcolor and rotation &amp; scale.</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/lmanager.png"><img class="lazyload aligncenter  wp-image-494" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/lmanager.png" alt="lmanager" width="479" height="580" /></a></p>
<p>&nbsp;</p>
<p>Next up we occasionally had some shots that required very accurate light cookies/gobos based on the plate. On recent shows we for example had some shots of characters walking through the woods with quite direct lighting which caused very complex noticeable shadows from the tree&#8217;s branches and leaves. In some scenes one could get away with putting just some random lightcookies as projectors (slidemaps) on the lights, but others needed a more accurate solution. This is a macro I have been working on which automates the whole process:</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/cookiemaker.png"><img class="lazyload aligncenter  wp-image-495" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/cookiemaker.png" alt="cookiemaker" width="480" height="413" /></a>It basically works this way: You project the plate through the render camera onto the set geometry and render that result back through the light source which will should give you a proper light gobo. Now, there are usually a few things to consider, like the camera&#8217;s focal length, pre/post transformations of the plate to match the light&#8217;s scale and so on which all depends on the way the slidemap is implemented into the shader. On this one no one had to worry about it, because it&#8217;s all handled automatically :) The only drawback is that the generation of the resulting cookie involves a 2-step rendering process (projection on geo and post-tweaks) which makes it not as interactive as it could be, but luckily those renders go through really quick at least.</p>
<p>Here&#8217;s a quick run through on a previous set up which is based on the same technique, but a bit more manual and goes through Nuke. This should also work with really any setup that requires building accurate light cookies.<br />
Say this is your light setup (in this case in Katana, but could be Maya, Houdini, or whatever):</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/katana_lightsetup.png"><img class="lazyload aligncenter  wp-image-496" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/katana_lightsetup.png" alt="katana_lightsetup" width="754" height="547" /></a><br />
You replicate the same thing in Nuke importing the same camera and set geometry. You project the plate through the rendercam onto the set geometry and copy over the light transformations from your 3D package into a new camera, which you then render through:</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/nuke_lightsetup.png"><img class="lazyload aligncenter  wp-image-497" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/nuke_lightsetup.png" alt="nuke_lightsetup" width="999" height="382" /></a><br />
The tricky part is getting the correct settings for focal length, etc. on your camera that resembles the light, which involves a bit trial and error. You can then just desaturate the map and grade, paint and do all the fancy comp stuff to make it do what you want and then use it on your lights:</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/katana_cookie_arealight2.jpg"><img class="lazyload   wp-image-498 aligncenter" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/katana_cookie_arealight2.jpg" alt="katana_cookie_arealight2" width="498" height="280" /></a> <a href="http://julius-ihle.de/wp-content/uploads/2015/02/plate_720.jpg"><img class="lazyload   wp-image-499 aligncenter" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/plate_720.jpg" alt="plate_720" width="500" height="281" /></a></p>
<p>When the guys from FX do their magic and blow things up into thousands of pieces that&#8217;s always awesome. Anyone in comp is usually happy if you provide them ID&#8217;s for just about anything so, provided the FX cache contains separate geometry pieces or face-sets that&#8217;s pretty straight forward with this ID randomizer:</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/idassgner.png"><img class="lazyload aligncenter size-full wp-image-500" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/idassgner.png" alt="idassgner" width="508" height="329" /></a><br />
When Lookdev&#8217;ing assets it always helps to ensure some consistency between the renders. While we had templates that managed chrome- and greyballs and rendercameras, we didn&#8217;t have a setup for the turntable itself&#8230; Well, now we have:</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2015/02/turntable.png"><img class="lazyload aligncenter size-full wp-image-501" data-original="http://julius-ihle.de/wp-content/uploads/2015/02/turntable.png" alt="turntable" width="723" height="296" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
<span style="color: #808080;">_________________________________________________</span><br />
<span style="color: #808080;"><span style="font-size: small;"> If this post has helped you in any way you can express your gratefulness by using the <em>Donate </em>Button below to buy me a coffee! :)</span></span><br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=VH5RW3YDWDJSQ" target="_blank" rel="nofollow"><img class="lazyload" data-original="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" /></a></p>
<div class="moz-text-html" lang="x-unicode">
<div><span style="font-size: small;"><span style="color: #808080;">3M5xNSV7g2NzVpHMqzYKhgoKJZ8CWa644m</span></span><br />
<img class="lazyload alignleft size-full wp-image-2576" data-original="http://julius-ihle.de/wp-content/uploads/2018/03/bc_ldgr_qrcode.png" alt="bc_ldgr_qrcode" width="128" height="128" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=492</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Texture Conversion in the GUI for Arnold &amp; PRMan</title>
		<link>http://julius-ihle.de/?p=460</link>
		<comments>http://julius-ihle.de/?p=460#comments</comments>
		<pubDate>Sun, 28 Dec 2014 11:24:20 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arnold]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[maketx]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[txmake]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[vfx]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=460</guid>
		<description><![CDATA[In the process of trying to streamline things a bit more in my day-to-day workflow I have recently been working on a hand-full of small&#8230;<p><a href="http://julius-ihle.de/?p=460" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://julius-ihle.de/?p=460"><img class="lazyload alignleft wp-image-461" data-original="http://julius-ihle.de/wp-content/uploads/2014/12/tex_gui.jpg" alt="tex_gui" width="800" height="333" /></a></p>
<p>In the process of trying to streamline things a bit more in my day-to-day workflow I have recently been working on a hand-full of small helper tools. One of them is a small set of scripts that handle the conversion of a selection of files to Arnold &amp; RenderMan&#8217;s native .tx/.tex files from the filebrowser&#8230; because people like the GUI, right? :)<span id="more-460"></span><br />
Unfortunately for anyone out there on Windows or OS X they won&#8217;t be of much use I&#8217;m afraid. If you are on Linux and using Gnome or KDE as your Desktop environment (others may work, too) this might come in handy. The file conversion is being handled on a selection of files through the standard right-click context menu:</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_gnome_contextmenu_crop2.png"><img class="lazyload   wp-image-472  alignleft" data-original="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_gnome_contextmenu_crop2.png" alt="" width="275" height="331" /></a></p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_service_screenshot_crop2.png"><img class="lazyload   aligncenter wp-image-473 " data-original="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_service_screenshot_crop2.png" alt="" width="319" height="330" /></a></p>
<p>&nbsp;</p>
<p>Upon clicking you will be presented with a little pop-up menu that allows you to enter additional options for the conversion if needed. Anything that&#8217;s noted in the -help docs of the respective commands should work in the dialog boxes. Upon specifying your options there&#8217;s time to grab another cup of coffee&#8230; The progress bar will let you know when it&#8217;s done :)</p>
<p><a href="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_gnome_arnoldOptions_crop.png"><img class="lazyload alignleft wp-image-465 size-full" data-original="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_gnome_arnoldOptions_crop-e1419764694894.png" alt="txmake_gnome_arnoldOptions_crop" width="287" height="150" /></a><a href="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_kde_progress.png"><img class="lazyload aligncenter size-full wp-image-466" data-original="http://julius-ihle.de/wp-content/uploads/2014/12/txmake_kde_progress.png" alt="txmake_kde_progress" width="310" height="128" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>By default it is assumed that the bin folders of Arnold and RPS are part of your $PATH environment variable, but if you need to change it the code should be fairly easy to read (although it looks a bit messy because it&#8217;s 1 line :) ) and can be modified to suit your needs. The dialogs are using KDialog and zenity (for KDE and Gnome respectively), but those should come by default depending on what desktop you are using.</p>
<p>To use them on KDE put the attached .desktop files in ~/.kde/share/kde4/services/ or /usr/share/kde4/services/ (for all users).<br />
For Gnome you need to install nautilus-actions and import the attached .schemas files. Once that&#8217;s done just restart nautilus/dolphin or log out and log back in again.</p>
<p>Tested on my laptop with CentOS 7 (KDE 4.10.5) and my trusty old CentOS 5 testbox (Gnome 2.16.0). <del>Unfortunately I don&#8217;t have my main workstation around to test it on CentOS 6, but it should work there as well.</del><br />
//Edit: Now also tested &amp; confirmed working on CentOS 6.</p>
<p><span style="text-decoration: underline;"><a href="http://53035544.de.strato-hosting.eu/data/Arnold_MakeTx.desktop" target="_blank">Arnold .tx Converter for KDE</a></span><br />
<span style="text-decoration: underline;"> <a href="http://53035544.de.strato-hosting.eu/data/Arnold_MakeTx_Gnome.schemas" target="_blank"> Arnold .tx Converter for Gnome</a></span><br />
<span style="text-decoration: underline;"> <a href="http://53035544.de.strato-hosting.eu/data/PRMan_txmake.desktop" target="_blank"> PRMan .tex Converter for KDE</a></span><br />
<span style="text-decoration: underline;"> <a href="http://53035544.de.strato-hosting.eu/data/PRMan_TXMake_Gnome.schemas" target="_blank"> PRMan .tex Converter for Gnome</a></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
<span style="color: #808080;">_________________________________________________</span><br />
<span style="color: #808080;"><span style="font-size: small;"> If this post has helped you in any way you can express your gratefulness by using the <em>Donate </em>Button below to buy me a coffee! :)</span></span><br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=VH5RW3YDWDJSQ" target="_blank" rel="nofollow"><img class="lazyload" data-original="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" /></a></p>
<div class="moz-text-html" lang="x-unicode">
<div><span style="font-size: small;"><span style="color: #808080;">3M5xNSV7g2NzVpHMqzYKhgoKJZ8CWa644m</span></span><br />
<img class="lazyload alignleft size-full wp-image-2576" data-original="http://julius-ihle.de/wp-content/uploads/2018/03/bc_ldgr_qrcode.png" alt="bc_ldgr_qrcode" width="128" height="128" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=460</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PrimVar Helper Script (updated)</title>
		<link>http://julius-ihle.de/?p=101</link>
		<comments>http://julius-ihle.de/?p=101#comments</comments>
		<pubDate>Sat, 14 Sep 2013 15:09:04 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[lookdev]]></category>
		<category><![CDATA[maya]]></category>
		<category><![CDATA[primitive variables]]></category>
		<category><![CDATA[primvars]]></category>
		<category><![CDATA[prman]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[vfx]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=101</guid>
		<description><![CDATA[Primitive Variables are a really cool way to get variation in Renderman Shading Networks. As it requires adding Attributes to your Shape Nodes within Maya&#8230;<p><a href="http://julius-ihle.de/?p=101" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://julius-ihle.de/?p=101"><img class="lazyload alignleft wp-image-2184" data-original="http://julius-ihle.de/wp-content/uploads/2013/09/primvar_helper.jpg" alt="primvar_helper" width="800" height="333" /></a></p>
<p>Primitive Variables are a really cool way to get variation in Renderman Shading Networks. As it requires adding Attributes to your Shape Nodes within Maya to control the variation it can be quite time consuming to set it up. So I was trying an attempt to build an interface that helps a bit with the set up.<span id="more-101"></span>The GUI let&#8217;s you choose a name, the PrimVar type and min/max values of which it will randomly pick floating point numbers within that range. It is also possible to just use integers with the according checkbox. The GUI is far from being pretty or well organized, but it does the job. :)</p>
<p>&nbsp;</p>
<p>As I am a bit short on time however I just had the time to properly make use of Float PrimVars as that&#8217;s what I need for a current project I&#8217;m doing. As with all my scripts they are not written very well, but should be kind of readable. So feel free to modify it as needed. I hope I will find the time soon to make the other types work properly.<br />
So for example using 3 PrimVars with just one shader on all objects results in loads of variation&#8230; Which is always a good thing :)</p>
<p>&nbsp;</p>
<p>Additionally as you can see there is also an &#8220;Object ID&#8221; part in the GUI. It let&#8217;s you add integer PrimVars with increasing values for each object. At the same time it will add an AOV with the same name like the primvar (of course this custom AOV has to be set up in Slim beforehand).<br />
An alternative approach to making Object ID&#8217;s would be having distinct floating point values for each object. So the value that get&#8217;s assigned by the script corresponds to the value that is being rendered within the Object ID AOV. For example object 3, that has the Object ID primvar value of 3 assigned has a value of 3,3,3,3 for RGBA. The good part is that it is very easy to set up, but one may run into aliasing issues when dealing with very thin geometry for example. To make use of this technique I also prepared a <strong><span style="text-decoration: underline;"><a href="http://53035544.de.strato-hosting.eu/data/ObjectID.gizmo">Nuke Gizmo </a></span></strong>that handles these kind of Object ID&#8217;s and has a slider to separate them.</p>
<p>Also here&#8217;s a quick demo:<br />
<iframe src="//player.vimeo.com/video/75132311" width="500" height="313" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p><a href="http://vimeo.com/75132311">Simple PrimVar Helper Script</a> from <a href="http://vimeo.com/julsvfx">Julius Ihle</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
<p>So hopefully I will find some time to complete the script, but for now if anyone&#8217;s interested feel free to grab it from <strong><span style="text-decoration: underline;"><a title="HERE" href="http://53035544.de.strato-hosting.eu/data/primvar_helper_v002.py">HERE</a></span></strong>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=101</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Dirt AOVs with Yeti &amp; PRMan</title>
		<link>http://julius-ihle.de/?p=78</link>
		<comments>http://julius-ihle.de/?p=78#comments</comments>
		<pubDate>Sat, 03 Aug 2013 17:04:21 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aov]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[lookdev]]></category>
		<category><![CDATA[passes]]></category>
		<category><![CDATA[peregrine labs]]></category>
		<category><![CDATA[prman]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[vfx]]></category>
		<category><![CDATA[yeti]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=78</guid>
		<description><![CDATA[CG fur always has the tendency to look very clean and soft. To break up the structure and to give a bit more realism I&#8230;<p><a href="http://julius-ihle.de/?p=78" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://julius-ihle.de/?p=78"><img class="lazyload alignleft wp-image-2186" data-original="http://julius-ihle.de/wp-content/uploads/2013/08/yeti_dirt.jpg" alt="yeti_dirt" width="800" height="333" /></a></p>
<p>CG fur always has the tendency to look very clean and soft. To break up the structure and to give a bit more realism I like to mix it with a bit of dirt, e.g. some leafs or sticks in the fur of a character walking through the woods. Here&#8217;s a quick rundown on what I&#8217;m doing to achieve this using Yeti and Renderman within Maya.<span id="more-78"></span>Let&#8217;s start with a simple sphere and some clumpy fur on it to get started. This is my base fur setup.</p>
<p>&nbsp;</p>
<p>What I&#8217;m doing next is to create another YetiNode on the same Mesh. This will be (one of) my dirt layers. In this example I&#8217;d like to have some leafs between the fur strands. For this I&#8217;m going to use polyPlanes with textures on them. So to distribute those planes along my sphere I need to first of all get some guide strands lain out. To make the planes take the direction of the fur I have to create a custom comb attribute which I&#8217;ll call &#8220;dirt_dir&#8221; in this example. So after comb&#8217;ing the grown fur with the groom I&#8217;m going to create yet another comb which has a comb attribute called &#8220;dirt_dir&#8221; in it.</p>
<p>&nbsp;</p>
<p>Next I&#8217;ll import the planes which are supposed to hold the leafs and instance them on the fur strands. For the alignment I&#8217;m going to choose my &#8220;dirt_dir&#8221; attribute to make the planes align along the fur strands. For this to work I have to set the &#8220;Instance To&#8221; to &#8220;Elements.</p>
<p>&nbsp;</p>
<p>To get a bit more variation and randomness one can also change the alignment, scale and twist variation as well as tick the &#8220;Deform&#8221; checkbox in the &#8220;Objects&#8221; tab.<br />
Alright, now that this is setup you can assign a simple Shader which holds a leaf texture for example and render and you&#8217;ll have a bit of dirt between the fur. However I personally like to have a bit more control over things in comp, so let&#8217;s take this a step further. I&#8217;m going to set up an AOV which holds the color and alpha of the leafs respectively, but the actual fur render will not contain the leafs at all. To set this up, I just map the leaf&#8217;s color to the diffuse and the leaf&#8217;s alpha to the mask input of a GPSurface Shader. Also I will turn up the transparency to full white because I don&#8217;t want the leafs to appear in the actual beauty render.</p>
<p>&nbsp;</p>
<p>For more information on how to set up custom AOV&#8217;s in Slim there&#8217;s a nice explanation <a title="using aovs" href="http://renderman.pixar.com/view/using-aovs" target="_blank">over at pixar.</a></p>
<p>When rendered and everything is set up correctly something like this should come out:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Of course with a bit more sophisticated than just planes with textures on them one can get really nice results while still maintaining a lot of control. One thing I might add is that the color AOV of the dirt  should actually be rendered without the fur being visible. Otherwise as you can see it will be held out by the fur aswell, which could lead to premultiplication issues in comp. In this example it&#8217;s not really obvious but there might be cases where you should be aware of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=78</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatic TEX Conversion</title>
		<link>http://julius-ihle.de/?p=71</link>
		<comments>http://julius-ihle.de/?p=71#comments</comments>
		<pubDate>Fri, 28 Jun 2013 21:22:53 +0000</pubDate>
		<dc:creator><![CDATA[Julius]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[prman]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[renderman]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[txmake]]></category>
		<category><![CDATA[vfx]]></category>

		<guid isPermaLink="false">http://julius-ihle.de/?p=71</guid>
		<description><![CDATA[To render more efficiently and to get some particular features working one has to feed Renderman with .tex files. Most regular image files can be&#8230;<p><a href="http://julius-ihle.de/?p=71" class="more-link post-excerpt-readmore"><span class="more-link-inner">Read more</span><span class="more-link-brd"></span></a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://julius-ihle.de/?p=71"><img class="lazyload alignleft wp-image-2188" data-original="http://julius-ihle.de/wp-content/uploads/2013/06/mari_nuke_txmake.jpg" alt="mari_nuke_txmake" width="800" height="333" /></a></p>
<p>To render more efficiently and to get some particular features working one has to feed Renderman with .tex files. Most regular image files can be converted to .tex files with the txmake executable that comes with RPS. However converting multiple files such as UDIM&#8217;s from Mari can be time consuming. So let&#8217;s make things a bit quicker&#8230; :)<span id="more-71"></span></p>
<p>I often use Nuke for things such as texture adjustments or making light cookies. Often I make minor adjustments and want to preview changes right away. So I would have to go and txmake my outputs every single time. Thanks to our Comp TD who generously helped me at this point I wrote a simple script to automate the .tex &#8211; conversion after rendering from within Nuke. You can obtain the script from <span style="text-decoration: underline;"><a title="download" href="http://53035544.de.strato-hosting.eu/data/make_tex.py" target="_blank">HERE</a></span>. Just place it within your .nuke directory. On the Write Nodes you would go to the &#8220;after render&#8221; line in the Python-tab and paste the following to execute the script after the render has finished:</p>
<blockquote>
<h3>import make_tex; make_tex.make_tex()</h3>
</blockquote>
<p>The script assumes that you are outputting .exr&#8217;s. In case you are using something different you can modify the script as needed.</p>
<p>When you are outputting load&#8217;s of UDIM&#8217;s from Mari and want to render with PRMan you have to convert them to .tex files to use them with the TextureAtlas Nodes. I found a very handy script online <span style="text-decoration: underline;"><a title="original script" href="http://www.sfdm.scad.edu/faculty/mkesson/vsfx755/wip/best/winter2010/stephen_withers/mrtorman/mrtorman.html" target="_blank">that does this already</a></span>. However it involves a second step to make the conversion and isn&#8217;t handled by the python script itself. I removed the additional step and made it work in one go. You can get my modified version from <span style="text-decoration: underline;"><a title="download " href="http://53035544.de.strato-hosting.eu/data/tif2tex.py" target="_blank">HERE</a></span>. It&#8217;s just a matter of cd&#8217;ing to the directory that holds the .tifs from Mari (to use something different you can modify the script) and executing the python file.</p>
<p>I tested those scripts only on Linux so far, but they should work no matter the OS.</p>
<p>Maybe someone will find this helpful&#8230; :)</p>
]]></content:encoded>
			<wfw:commentRss>http://julius-ihle.de/?feed=rss2&#038;p=71</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
