<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0">
<channel>
<title>jeffpatton's CGPortoflio Blog</title>
<link>http://jeffpatton.cgsociety.org/blog/</link>
<description>jeffpatton's blog</description>
<language>en-us</language>
<ttl>120</ttl>
	<item>
	<title>Optimizing your scenes for mr proxies</title>
	<link>http://jeffpatton.cgsociety.org/blog/4057</link>
	<description><![CDATA[&quot;I'm using the new mr Proxy objects in 3ds Max 2009 / 3ds Max Design 2009 and I can't render but a few proxy objects before I run into the dreaded out of memory error....what gives?&quot;  <br />
<br />
I've been asked this a few times, and seen it asked on various forums so I thought I'd post some information here that will help that situation.<br />
<br />
In 3ds Max 2009 / 3ds Max Design 2009 there's a new BSP method introduced called BSP2.  For those wondering, BSP = Binary Space Partitioning and it sub-divides our scenes into boxes (voxels) which allow mental ray to accelerate the ray-tracing process.  <br />
(Of course that's an over simplified explanation)<br />
<br />
BSP vs. BSP2 (per the help file in 2009):<br />
<br />
BSP - Fastest solution for single-processor systems.  Also good for small-to-medium sized scenes (less than 1 million triangles).  Offers adjustable parameters for tuning.<br />
<br />
BSP2 -  Optimized for large scenes containing more than one million triangles.  Requires less memory than BSP and is able to flush memory when necessary.  May produce a small performance loss when using BSP2 with smaller / less complex scenes.  Adjustments are automatic here, so there are no adjustable parameters needed for tuning.<br />
<br />
Now that you're armed with this information it becomes clear that when rendering a complex scene with a lot of mr proxies, you should switch over to BSP2.  But, there's another option that you can disable that will also help:  Turn off the scanline option.  <br />
<br />
The scanline option is enabled by default and it allows mental ray to use both methods of calculation to render a scene.  When enabled, the scanline option handles the direct illumination (primary rays) only.  As expected, raytracing handles the indirect illumination, reflections/refractions, etc.  <br />
<br />
BTW, if you turn off scanline, that doesn't mean you'll lose the direct illumination in your scene, it just means raytracing will take over that task.  <br />
<br />
So, why would we want to turn scanline off?  Zap has explained that the scanline option speeds up simple scenes, but doesn't really help complex scenes that much.  He also mentioned that it creates some memory consumption that isn't flushable.  Therefore, turning it off on complex scenes with BSP2 will help free up some extra memory.<br />
<br />
Cool eh?  Now if anyone is asking at this point &quot;where is all this BSP &amp; scanline stuff you speak of located?&quot;...here's a screen capture:<br />
<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/BSP2.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/BSP2-thb.jpg" border="0" alt="" /></a><br />
]]>
	</description>
	<pubDate>Mon, 12 May 2008 21:28:57 +0000</pubDate>
	</item>
	<item>
	<title>Brute Force made easy</title>
	<link>http://jeffpatton.cgsociety.org/blog/4007</link>
	<description><![CDATA[<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Force_mode.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Force_mode-thb.jpg" border="0" alt="" /></a><br />
<br />
Thought I'd expand a bit upon my previous blog entry where I mentioned the Ctrl.Ghost shader to use importons &amp; irradiance particles.  In 3ds Max 2009 (+ Design), we have access to the Force  mode of Final Gather right out of the box.  To enable this mode you simply set the final gather &quot;Interpolate over num points&quot; setting to 0.  <br />
<br />
Doing so will enable a &quot;brute force&quot; style FG mode.  For this method there's no interpolation or precalculation.  Therefore you won't be able to save a .fgm with this method.  However, if you're yearning for an easy to configure lighting setup and have a fair amount allocated for the render to 'clear' this is a handy option.  <br />
<br />
<img src="http://jeffpatton.net/Blog-images/Force_01.jpg" border="0" alt="" /><br />
<br />
A. Set the Interpolation to 0 (green highlight) to enable the Force mode.<br />
B. Think of the Rays per FG Point setting as your &quot;grain control&quot;.  Higher values = less grain (longer renders).  This isn't the only thing that affects the grain (or render time) though.  Your sampling quality affects it as well, more on that later.<br />
C. Diffuse bounces:  Same as usual, controls the number of bounces.  FWIW, I've kinda grown fond of using low bounces for the contrast that it provides.<br />
D. Noise Filtering (optional):  If you set the noise filtering to &quot;none&quot; you're getting close to an 'unbiased' approach because mental ray won't filter out some of light data.  However, it may introduce more &quot;speckling&quot;  to your image which would require more FG rays.<br />
<br />
NOTE:  I'm NOT saying this is equal to an unbiased approach because we can still control/limit the diffuse bounces (amongst other things).  However, that's not a bad thing though because it can help keep the render times down from those of an unbiased solution.  Mind you, any time you hear &quot;brute force&quot; or &quot;unbiased&quot;, I think you all know by now that render times aren't going to be blistering fast.<br />
<br />
As usual it seems, props to Zap for implementing this nifty little trick in 3ds Max 2009. <img src="http://forums.cgsociety.org/images/smilies/smile.gif" border="0" alt="" title="" class="inlineimg" /><br />
Link to Zap's blog for anyone that may not have it bookmarked already:<br />
<a href="http://mentalraytips.blogspot.com/" target="_blank">http://mentalraytips.blogspot.com/</a><br />
(I REAALLLLY wish I could add sticky links to my blog here...it may be time for me to move this blog somewhere else to make it more user friendly)<br />
<br />
NOTES:<br />
I briefly mentioned how the Rays per FG point setting &amp; sampling quality can affect the amount of grain in your 'brute force' renders.  Using an aggressive adaptive sampling rate with a high 'maximum' value will sample more in the grainy areas to help &quot;clear&quot; those areas.  So you could possibly use a lower Rays per FG Point setting in that case.<br />
<br />
Adaptive sampling vs. 'fixed' sampling:<br />
<img src="http://jeffpatton.net/Blog-images/Force_02.jpg" border="0" alt="" /><br />
Fixed sampling rates force mental ray to use a fixed amount of samples for every pixel of the image.  Adaptive sampling varies the samples locally (higher where needed, lower where less sampling is required).<br />
<br />
----------<br />
<br />
Don't have 3ds Max 2009 yet?  You can get a similar result to this Force method in previous versions by setting the &quot;Interpolate over num points&quot; to 1 and use a very high &quot;Initial FG Point Density&quot;. <img src="http://forums.cgsociety.org/images/smilies/smile.gif" border="0" alt="" title="" class="inlineimg" /><br />
]]>
	</description>
	<pubDate>Sun, 27 Apr 2008 12:53:04 +0000</pubDate>
	</item>
	<item>
	<title>3ds Max 2009 (+Design) - Importons & Irradiance Particles</title>
	<link>http://jeffpatton.cgsociety.org/blog/3984</link>
	<description><![CDATA[If you already have (or will soon have) access to 3ds Max 2009 and/or 3ds Max Design 2009 then you're going to want to head over to the Maya forum to get the new ctrl.ghost shader.  Many, many  thanks to Max (not the program...but the man) for creating/sharing these shaders (including a 3ds Max version) that allows us to use the new Importons &amp; irradiance particles.<br />
<br />
Here's a direct link to the thread where you'll find the shaders (32 &amp; 64 bit) &amp; more information:<br />
<a href="http://forums.cgsociety.org/showthread.php?f=87&amp;t=621727" target="_blank">http://forums.cgsociety.org/showthr...p?f=87&amp;t=621727</a><br />
<br />
Now with the 3ds Max package you'll also get the mrGeomShaderObject.dlo file, place this in your plugins or stdplugs folder.  Thanks to Dave (maxplugins.de) for compiling the geometry shader.  The Geometry Shader will be our access point to the importons &amp; irradiance particles options.  <br />
<br />
The zip archive also contains the ctrl_ghost_settings shaders.  You'll find both a .dll file &amp; .mi file.  Place the ctrl_ghost_settings.dll file in the shaders_autoload subfolder: ex. C:|3ds Max 2009|mental ray|shaders_autoload|shaders<br />
<br />
Then place  the ctrl_ghost_settings.mi file in your include folder: ex. C:|3ds Max 2009|mental ray|shaders_autoload|include<br />
<br />
Now you're all set to start using these new options.  To access the settings you'll first create a mr Shader object in your scene then assign the ctrl_ghost shader to it and drag that ctrl_ghost shader to the material editor as an instance copy then edit the settings from the material editor.  Not clear enough, here's some screen captures:<br />
<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Ctrl_ghost.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Ctrl_ghost-thb.jpg" border="0" alt="" /></a><br />
<br />
You can find more information on these options in the thread listed at the beginning of this entry, and in the mental ray documentation included with 3ds Max.  To access the mental ray documentation, go to: Help&gt;Additional help...&gt;mental ray 3.6 Reference<br />
]]>
	</description>
	<pubDate>Sun, 20 Apr 2008 14:11:12 +0000</pubDate>
	</item>
	<item>
	<title>A&D Clay material (and other random stuff)</title>
	<link>http://jeffpatton.cgsociety.org/blog/3930</link>
	<description><![CDATA[Recently I wanted to create a somewhat realistic clay material.  After making a few variations I thought it might be helpful to others out there if I share my settings.<br />
<br />
First up, here's a render of the material in my studio setup:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Clay_test.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Clay_test-thb.jpg" border="0" alt="" /></a><br />
<br />
Here are the parameters I used for my material:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Clay_mat.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Clay_mat-thb.jpg" border="0" alt="" /></a><br />
<br />
Notes on settings:<br />
I used a medium Roughness settings to give the material some softness. <br />
The reflectivity &amp; BRDF values I used are simply what looked 'right' for the look I wanted.  You'll notice a map in the color swatch of the reflection settings.  I tried a few procedurals and they worked ok, but I wanted a more human touch to my material.  So, I created a tilable fingerprint texture with Photoshop.  I used this black &amp; white image as both a bump map and a reflection <br />
mask to break up the reflectivity.  I'll attach my fingerprint texture because I think it could be useful for things other than this particular material.<br />
<br />
Here's the tileable fingerprint map:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Fingerprints.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Fingerprints-thb.jpg" border="0" alt="" /></a><br />
<br />
Quick note on my studio setup:<br />
I used portal lights with mib_blackbody shaders providing kelvin control, FG &amp; Photographic Exposure control.  I placed single sided planes in front of the portal lights and applied an A&amp;D material to the planes.  I then placed a gradient ramp in the cut-out map of this material.  Doing so provides a soft edge to the portal lights.  I then linked these planes to their respective portal light so that when I need to move the light sources, the 'soft box' moves with it automatically.<br />
<br />
Screen capture of studio setup:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Studio_lights.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Studio_lights-thb.jpg" border="0" alt="" /></a><br />
<br />
So that's one rather simple recipe for a clay material.  <img src="http://forums.cgsociety.org/images/smilies/smile.gif" border="0" alt="" title="" class="inlineimg" /><br />
<br />
Now onto the 'other random stuff'.  As I've done in the past, I'm just sharing a few tests that don't really fit into my gallery, or anywhere else for that matter.<br />
<br />
I saw people using the Sponza scene and since it's been a while since I tinkered with that file I thought I'd give it a whirl in 3ds Max Design 2009. <br />
<br />
Sponza Test<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Sponza01.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Sponza01-thb.jpg" border="0" alt="" /></a><br />
Link to the Sponza Model:<a href="http://hdri.cgtechniques.com/~sponza/" target="_blank">http://hdri.cgtechniques.com/~sponza/</a><br />
<br />
In my gallery I posted a render of the Dwayne Ellis bathroom scene.  Here's just another angle of that same scene:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Bathroom_02.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Bathroom_02-thb.jpg" border="0" alt="" /></a><br />
(my water material needed some lovin'!...note this and the other render of this scene in my gallery primarily use the new ProMaterials)<br />
<br />
Up next are a few Cornell box tests with 3ds Max Design 2009.  For reference I used real-world information provided via Richard Rosenman's site here: <a href="http://www.richardrosenman.com/project/?cid=59" target="_blank">http://www.richardrosenman.com/project/?cid=59</a><br />
<br />
Here's my resulting renders:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Cornell_01.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Cornell_01-thb.jpg" border="0" alt="" /></a><br />
<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Cornell_02.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Cornell_02-thb.jpg" border="0" alt="" /></a><br />
<br />
NOTE:  Obviously I needed to adjust my light placement so the shadows inside the box would better match Richard's photos.  However, I was mainly interested in seeing how the new photometric lights in 3ds Max Design 2009 would compare.  Good news...I think the results are pretty darn accurate!<br />
<br />
Finally, here's an ice material I'm still tuning:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Ice-render.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/ice-render-thb.jpg" border="0" alt="" /></a><br />
Once I have this ice material dialed in to the look I'm after I may post it.]]>
	</description>
	<pubDate>Fri, 11 Apr 2008 05:49:55 +0000</pubDate>
	</item>
	<item>
	<title>Animated dance floor in mental ray</title>
	<link>http://jeffpatton.cgsociety.org/blog/3838</link>
	<description><![CDATA[Since glow/self-illumination questions pop up so frequently I figure there can never be enough tutorials/examples out there, so I guess one more won't hurt anyone.<br />
<br />
I made a simple animated dance floor scene, and it was the perfect opportunity to use the funny biped model example from Daniel Martinez Lara (www.pepeland.com) that ships with 3ds Max.  <br />
<br />
<img src="http://jeffpatton.net/Blog-images/Disco_00.jpg" border="0" alt="" /><br />
<br />
Here's the completed animation: <br />
<a href="http://jeffpatton.net/Blog-images/Dance_floor.mov" target="_blank">http://jeffpatton.net/Blog-images/Dance_floor.mov</a><br />
(right click, save as will probably work better than streaming)<br />
<br />
Here's some information on the scene configuration:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Disco_01.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Disco_01-thb.jpg" border="0" alt="" /></a><br />
As you can see by this screen grab, the dance floor is a three part system; A frosted glass floor, glowing planes to simulate the lights, and the frame of the floor.  There's a skylight in the scene to provide some uniform lighting.  It's color is white and the multiplier is set to 0.35...it's there to make the parts of the scene not lit by the floor visible.<br />
<br />
Here's the settings used for the frosted glass floor material:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Disco_02.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Disco_02-thb.jpg" border="0" alt="" /></a><br />
<br />
Here's the settings on the self-illuminated light cards:<br />
<b>(click image to enlarge)</b><br />
<a href="http://jeffpatton.net/Blog-images/Disco_03.jpg" target="_blank"><img src="http://jeffpatton.net/Blog-images/Disco_03-thb.jpg" border="0" alt="" /></a><br />
Nothing fancy, the &quot;Illuminates the scene (when using FG)&quot; option is enabled to help light the scene...and there's an animated RGB tint map applied to the self-illumination filter color that drives the shifting colors.<br />
<br />
Some notes/myths on the self-illumination option of the A&amp;D material:<br />
1. It turns my geometry into a light source!  Not really.  It's a visual representation of a light source, but it doesn't act like a 'normal' light (like the photometric lights).  It's similar to using an output map or glow shader + FG.  It'll only provide direct illumination when used with final gather.<br />
<br />
2. The A&amp;D self-illumination turns my geometry into a light source that emits photons.  Wrong.  It will not make your objects to emit photons.<br />
<br />
3. Can I light my architectural interior scene with strands of tiny glowing lights using only the self-illumination option on the A&amp;D material?  You could...but it's certainly not efficient to do so.  I would use an area light source to provide the primary light in the scene.  A self-illuminated A&amp;D material would be used on the geometry to properly visualize the lights themselves and provide some secondary illumination.<br />
<br />
So that's one method of creating an animated dance floor (or whatever).  You'll probably notice some shadow flickering in the animation.  Since my computer is rather dated now I had to use the draft quality to get this rendered quickly.  If I had a faster PC I would have used better settings to prevent that.  All things considered, the flickering isn't terribly bad in this example for such low settings.<br />
]]>
	</description>
	<pubDate>Tue, 18 Mar 2008 19:18:34 +0000</pubDate>
	</item>
</channel>
</rss>
