<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-18014991</id><updated>2012-02-16T22:17:24.840+01:00</updated><category term='linux'/><category term='gnuplot'/><category term='rendering'/><category term='houdini'/><category term='solution'/><category term='tool'/><category term='bug'/><category term='shader'/><category term='programming'/><category term='light'/><category term='api'/><category term='lua'/><category term='mental ray for maya'/><category term='standalone'/><category term='render artifact'/><category term='mental ray'/><category term='people'/><category term='NaN'/><category term='skinning'/><category term='praise'/><category term='maya'/><category term='modeling'/><category term='fun'/><category term='IMPORTANT'/><category term='code'/><category term='c++'/><category term='rant'/><category term='sampling'/><title type='text'>riviera</title><subtitle type='html'>the day-by-day non-adventures of a cg artist</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blue-riviera.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18014991.post-7509376752548776056</id><published>2008-07-27T05:55:00.003+02:00</published><updated>2008-07-27T05:58:55.395+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><category scheme='http://www.blogger.com/atom/ns#' term='shader'/><category scheme='http://www.blogger.com/atom/ns#' term='light'/><title type='text'>xyaUberLight: uberlight for mental ray</title><content type='html'>...along with proper OpenGL manipulators in Maya -- for your convenience :)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_qhnv56R64Y4/SIvx0AuC_GI/AAAAAAAACj8/Def2L2yzIdU/s1600-h/xyUberLight.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_qhnv56R64Y4/SIvx0AuC_GI/AAAAAAAACj8/Def2L2yzIdU/s200/xyUberLight.jpg" alt="" id="BLOGGER_PHOTO_ID_5227537668342217826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_qhnv56R64Y4/SIvx0ZIPCuI/AAAAAAAACkE/y9oUV9zje0M/s1600-h/xyUberLight2sml.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_qhnv56R64Y4/SIvx0ZIPCuI/AAAAAAAACkE/y9oUV9zje0M/s200/xyUberLight2sml.jpg" alt="" id="BLOGGER_PHOTO_ID_5227537674894510818" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-7509376752548776056?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=7509376752548776056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/7509376752548776056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/7509376752548776056'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/07/xyauberlight-uberlight-for-mental-ray.html' title='xyaUberLight: uberlight for mental ray'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_qhnv56R64Y4/SIvx0AuC_GI/AAAAAAAACj8/Def2L2yzIdU/s72-c/xyUberLight.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-8292585214304018520</id><published>2008-07-27T05:23:00.004+02:00</published><updated>2008-07-27T05:59:28.909+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='rendering'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><category scheme='http://www.blogger.com/atom/ns#' term='sampling'/><title type='text'>tracetracer: a ray debugger</title><content type='html'>Rays are logged during rendering. Then the log file contents can be displayed and examined in Maya (using OpenGL). Click on images for a larger view.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_qhnv56R64Y4/SIvqnzZljmI/AAAAAAAACjk/NA6GpT41Cw0/s1600-h/tracetracing_v1.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_qhnv56R64Y4/SIvqnzZljmI/AAAAAAAACjk/NA6GpT41Cw0/s200/tracetracing_v1.jpg" alt="" id="BLOGGER_PHOTO_ID_5227529762026917474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Fixed sampling [-5;-5].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_qhnv56R64Y4/SIvqoFJjNdI/AAAAAAAACjs/uNQP39VCVZY/s1600-h/tracetracing_v2.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_qhnv56R64Y4/SIvqoFJjNdI/AAAAAAAACjs/uNQP39VCVZY/s200/tracetracing_v2.jpg" alt="" id="BLOGGER_PHOTO_ID_5227529766791493074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Adaptive sampling [-5;-3].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_qhnv56R64Y4/SIvqoT2EW3I/AAAAAAAACj0/xppGQgrZfAQ/s1600-h/tracetracing_v3.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_qhnv56R64Y4/SIvqoT2EW3I/AAAAAAAACj0/xppGQgrZfAQ/s200/tracetracing_v3.jpg" alt="" id="BLOGGER_PHOTO_ID_5227529770736311154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Adaptive sampling;&lt;br /&gt;upper picture shows ray endpoints only.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-8292585214304018520?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=8292585214304018520' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/8292585214304018520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/8292585214304018520'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/07/tracetracer-ray-debugger.html' title='tracetracer: a ray debugger'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_qhnv56R64Y4/SIvqnzZljmI/AAAAAAAACjk/NA6GpT41Cw0/s72-c/tracetracing_v1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-5420476984456842321</id><published>2008-07-26T18:30:00.007+02:00</published><updated>2008-07-26T18:59:19.055+02:00</updated><title type='text'>mental ray today: color clipping</title><content type='html'>In mental ray, when the image being rendered has to be color-clipped (ie. the resulting image is not EXR or float, but 8bit or 16bit), the color clipping is not done to the final pixel color, but to each individual ray sample contributing to that pixel.&lt;br /&gt;&lt;br /&gt;So why is this distinction is important? Because it can &lt;span style="font-weight: bold;"&gt;heavily affect&lt;/span&gt; antialiasing (therefore &lt;span style="font-weight: bold;"&gt;image quality&lt;/span&gt;) of the rendered images, if you have 'overexposed' areas in your rendering.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Note that over-exposure or 'burnout' can not only come from too bright surfaces, but some &lt;span style="font-weight: bold;"&gt;specular models&lt;/span&gt; (ie. Cook-Torrance [1]) &lt;span style="font-weight: bold;"&gt;can also produce extemely bright areas&lt;/span&gt;, especially at edges of curved objects!).&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;So, if you have renderings, where&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;geometry is heavily motion-blurred,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;motion blur quality is nice -- except on speculars, which looks all pixelly-blocky and badly antialiased,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;you wonder how comes that all motion blur is nice and smooth, except those specular highlights&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;the problem goes away when you render in 8bit/16bit, but back again in float/exr output --&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;Then, well, you 'hit the spot'. (See a &lt;a href="http://blue-riviera.blogspot.com/2007/10/few-notes-on-mr-anti-aliasing.html"&gt;previous post about antialiasing&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;A possible workaround is to apply color-clipping to your shader output. It doesn't have to be clipped at 1.0, so one can still do post-rendering exposure adjustments in compositing. (But I'd recommend clipping intensities above ~4.0-5.0.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;[1]: It is a known attribute of the Cook-Torrance that it can result in extreme highlight values on surfaces facing away from the camera with light coming in at a steep angle (it is mentioned in various renderman-related literature).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;I'm too lazy to elaborate further, so I'll just paste a snippet from the mental ray mailing list:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;On Wed, 21 Jul 2004, Jason Crosby wrote:&lt;br /&gt;&lt;blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"&gt; Somewhere along the pipeline MR seems to be clamping this value so I&lt;br /&gt;can't get very bright motion blurred streaks.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;That's true. Frame buffers that clip (8-bit or 16-bit RGBA) do so before&lt;br /&gt;filtering. The reason is that it often happens that a curved surface gets&lt;br /&gt;a very bright highlight occasionally during an animation, if it just&lt;br /&gt;happens to be at the right angle or position towards a HDR light. Most&lt;br /&gt;of its neigbors stay within a more sane range.&lt;br /&gt;&lt;br /&gt;Such a superbright sample would peg the filter result to (1, 1, 1) no&lt;br /&gt;matter what the other samples under the filter say. The result is a peak-&lt;br /&gt;white pixel or group of pixels in the image, with hard aliasing towards&lt;br /&gt;their neighbor pixels. In an animation, these pixels tend to flicker and&lt;br /&gt;move. There is no way you could manipulate the filters to fix that.&lt;br /&gt;&lt;br /&gt;This problem has been hotly debated here for a while. On one hand, mental&lt;br /&gt;ray can't figure out the user intent, so it would have to become an option.&lt;br /&gt;On the other hand, mental ray doesn't really need more options that have&lt;br /&gt;a subtle effect on a hidden algorithm that one shouldn't need to understand.&lt;br /&gt;But it can't be ignored, so we'll probably extend the colorclip mode with&lt;br /&gt;two modes that turn off preclipping in mental ray 3.4. We are uncertain&lt;br /&gt;whether preclipping should be on or off by default.&lt;br /&gt;&lt;br /&gt;Until then, you'll have to use a floating-point or RGBE frame buffer (the&lt;br /&gt;former uses four times as much memory!).&lt;br /&gt;&lt;br /&gt;Thomas&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;Thomas Driemeyer&lt;br /&gt;mental images, Berlin&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-5420476984456842321?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=5420476984456842321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5420476984456842321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5420476984456842321'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/07/mental-ray-today-color-clipping.html' title='mental ray today: color clipping'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-383242179649572384</id><published>2008-07-26T17:41:00.015+02:00</published><updated>2008-07-27T05:42:08.210+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='rendering'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='standalone'/><category scheme='http://www.blogger.com/atom/ns#' term='lua'/><title type='text'>CSI mental ray: render stats utility</title><content type='html'>If your job includes shepherding and troubleshooting mental ray renderings, you might like this idea.&lt;br /&gt;&lt;br /&gt;It occured to me that in movies and TV shows (like CSI) they always watch graphical feedbacks of everything, but in real life we mostly only read textual log files, which is boring and tedious. As my job involves such reading (mental ray statistics of rendered image sequences), I thought I might put some extra work in to make my life easier, and do a graphical stats display.&lt;br /&gt;&lt;br /&gt;I wrote a small &lt;a href="http://www.lua.org/"&gt;Lua&lt;/a&gt; script, which reads the mental ray output for each frame of the rendered sequence, extracts all 'statistical' data to be displayed, then uses &lt;a href="http://www.gnuplot.info/"&gt;GNUPlot&lt;/a&gt; to generate some nice graphs.&lt;br /&gt;&lt;br /&gt;The following example is an actual 'production' sequence (click to show in full size -- the graphics isn't fancy CSI style, but it's alright).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;This is for an entire sequence: the horizontal axis is for each frame, the vertical is the amount (time/memory/etc.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_qhnv56R64Y4/SItJXBv3UlI/AAAAAAAACjc/93U6tIgYWEo/s1600-h/mr_seq_stats1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_qhnv56R64Y4/SItJXBv3UlI/AAAAAAAACjc/93U6tIgYWEo/s320/mr_seq_stats1.png" alt="" id="BLOGGER_PHOTO_ID_5227352452448604754" border="0" /&gt;&lt;/a&gt;The first image shows how much memory were used by the various rendering modules (eg. so, if lots of textures are used, the IMG section will grow).&lt;br /&gt;&lt;br /&gt;The second image shows render times, including how much time was spent in each preprocessing/rendering phase.&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;(In the example one frame has an extremely long file parsing phase, which could have been a temporary network glitch -- see image #2, bottom, middle.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The third one is memory usage again, but this time shows the consumption during FG and the actual rendering phase.&lt;br /&gt;&lt;br /&gt;The fourth shows the amount of tessellated geometry. It also shows how much geometry got re-tessellated (ie. when mental ray ran out of memory and had to flush geometry). It could be an indicator of too much geometry in the scene, or not enough memory allowed for the geometry cache.&lt;br /&gt;&lt;br /&gt;The actual shot contains a character that walks in then out of the camera view (hence the gradual increase then decrease in both render times and memory usage).&lt;br /&gt;&lt;br /&gt;This proved to be a very useful tool: with just a few graphs you can see most of what happened during sequence rendering. (What's also useful is a stats of how many primary/reflection/etc. rays were traced for each frame -- unfortunately mr doesn't always display this info.)&lt;br /&gt;&lt;br /&gt;To actually get these data printed out by mental ray, the following lines should be added at the end of each .mi file:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# post-render diagnostics&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;debug "mem summary"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;debug "mem dump"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;debug "db statistics"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;debug "db summary"&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;Unfortunately I don't have a web site (yet), but as soon as I finish it, I'll post this utility for download.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-383242179649572384?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=383242179649572384' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/383242179649572384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/383242179649572384'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/07/csi-mental-ray-render-stats-utility.html' title='CSI mental ray: render stats utility'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_qhnv56R64Y4/SItJXBv3UlI/AAAAAAAACjc/93U6tIgYWEo/s72-c/mr_seq_stats1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-5105780028857982540</id><published>2008-05-28T00:50:00.004+02:00</published><updated>2008-05-28T01:13:38.082+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='IMPORTANT'/><title type='text'>C++ did-you-know</title><content type='html'>In C++, you have to place &lt;span style="font-family:courier new;"&gt;inline&lt;/span&gt; functions in the header (&lt;span style="font-family:courier new;"&gt;.h&lt;/span&gt;) files if you want to make sure they get properly inlined.&lt;br /&gt;&lt;br /&gt;What I did not know, however, is that &lt;span style="font-style: italic;"&gt;it is the same with template functions&lt;/span&gt; (be they templated classes, templated member function[s] of an otherwise non-templated class, or templated plain old fashioned 'global' functions).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So you have to place &lt;span style="font-family:courier new;"&gt;template&lt;/span&gt;d functions too (along with &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;inline&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;s), in .h files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you do not, your code won't compile, unless you explicitly define the specializations. (At least, in MSVC++2005. VC++6.0 blurted an &lt;span style="font-family:courier new;"&gt;internal compiler error&lt;/span&gt; quickly, so I couldn't try :))&lt;br /&gt;&lt;br /&gt;Although I understand the "why",  I still hope for the day to come when such issues will never bother us anymore. (One solution would definitely include moving to a tropical island and open my own bar :))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-5105780028857982540?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=5105780028857982540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5105780028857982540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5105780028857982540'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/05/c-did-you-know.html' title='C++ did-you-know'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-2699396739399066664</id><published>2008-05-12T00:02:00.002+02:00</published><updated>2008-05-12T00:04:07.480+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='praise'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='houdini'/><title type='text'>Houdini praise</title><content type='html'>&lt;span style="font-size:85%;"&gt;...and while I'm in a praising mood, here comes another one:&lt;br /&gt;&lt;br /&gt;Houdini is cool!&lt;br /&gt;Houdini is &lt;span style="font-style: italic;"&gt;power&lt;/span&gt;.&lt;br /&gt;Houdini be praised!&lt;br /&gt;&lt;br /&gt;:)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-2699396739399066664?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=2699396739399066664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/2699396739399066664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/2699396739399066664'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/05/houdini-praise.html' title='Houdini praise'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-5605640784964401737</id><published>2008-05-11T23:32:00.008+02:00</published><updated>2008-05-12T00:02:43.284+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='skinning'/><category scheme='http://www.blogger.com/atom/ns#' term='praise'/><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><title type='text'>skinning notes #2</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;Maya 8.5, smooth skinning: copy/mirror skin weights&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blue-riviera.blogspot.com/2005/10/smooth-skinning-headaches.html"&gt;Previously&lt;/a&gt; I made some quite harsh remarks about the quality of the Maya (smooth) skinning tools. As I don't want to appear a 'half empty glass' person, there's some praisin' comin' up:&lt;br /&gt;&lt;br /&gt;In Maya 8.5 the copy/mirror skin weights functions are actually &lt;span style="font-style: italic;"&gt;working&lt;/span&gt; (imagine that! they can &lt;span style="font-style: italic;"&gt;do&lt;/span&gt; the job). And properly! I must say. &lt;strike&gt;Such a rare moment happens in every decade or so, so enjoy!&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;But seriously and without sarcasm, I really like to thank the developers. I'm grateful as for these things now I can talk about 'spent minutes' instead of 'spent hours' (and that's quite a difference).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;---cut---&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Another goodie-goodie: the dual-quaternion skinning now supports scaling, yee-haw! (I'm too lazy to post a link, google it.)&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;A related hint: the good old 'rigid' skinning method is very similar to dq skinning (it does proper rotation interpolation), and &lt;span style="font-style: italic;"&gt;it can be painted&lt;/span&gt;, too (I don't know how many people are aware of that). I'm sorry that it became an 'abandoned' feature, as it's still quite useful and I still use it on a more or less regular basis.&lt;br /&gt;&lt;br /&gt;You can even do what I like to call 'hybrid skinning', if you bind the geometry with both smooth and rigid skinning, and put all skin deformer sets into a partition. The initial setup is a bit of a hassle, but then you can set for each vertex if it should be skinned 'smoothly' or 'rigidly', and paint both, or use flexors or jointClusters, etc. I might write a tutorial about it someday :)&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-5605640784964401737?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=5605640784964401737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5605640784964401737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5605640784964401737'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/05/skinning-notes-2.html' title='skinning notes #2'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-4008866070731212916</id><published>2008-05-09T22:13:00.014+02:00</published><updated>2008-05-28T00:50:32.141+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='render artifact'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='solution'/><category scheme='http://www.blogger.com/atom/ns#' term='NaN'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><title type='text'>NaN blues, a.k.a. if ( dot_nl &gt; 0.0 )</title><content type='html'>&lt;span style="font-size:85%;"&gt;(Note: what's described below is only a half-solution, so expect an update coming soon...)&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;Black/white pixels in rendered images&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Have you even seen annoying black/white pixels on your mental ray rendered images, alongside with similar messages in the output:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;RCFG 0.4  warn   542009: finalgather ray returned NaN for the finalgather point at pixel 401.805 212.559&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well, I have and I didn't like it. I spent the last few hours tracking this bastard down. And catched it I have!&lt;br /&gt;&lt;br /&gt;No matter what, this phenomenon might occur even when rendering with the simplest shaders (like mib_illum_lambert).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_qhnv56R64Y4/SCdXSZ09H5I/AAAAAAAACgY/Gnoz8TSSB9k/s1600-h/%21NaN%21.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_qhnv56R64Y4/SCdXSZ09H5I/AAAAAAAACgY/Gnoz8TSSB9k/s400/%21NaN%21.jpg" alt="" id="BLOGGER_PHOTO_ID_5199220268504784786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The cause of this problem seems to be that sometimes subdivs can have funky surface normals, and this allows sneaking in of NaN values in the illuminance loops of unaware shaders. (Like even the mental images base shaders.)&lt;br /&gt;&lt;br /&gt;The solution is simple (but needs re-compilation of a shader, some artists might want to consult their fellow TDs :)). Modify your illuminance loop to look like the following:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;while (mi_sample_light(&amp;amp;color, &amp;amp;dir, &amp;amp;dot_nl, state, *light, &amp;amp;samples)) {&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;    if (dot_nl&gt;0.0)&lt;/span&gt; // (1)&lt;br /&gt;{&lt;br /&gt;sum.r += dot_nl * diff-&gt;r * color.r;&lt;br /&gt;sum.g += dot_nl * diff-&gt;g * color.g;&lt;br /&gt;sum.b += dot_nl * diff-&gt;b * color.b;&lt;br /&gt;// (...or your own illum stuff, whatever...)&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;(Sorry for the stupid non-formatting). The line marked with (1) first seems only as an obvious quick optimization, but it also filters out any incoming NaN values. (And these values &lt;span style="font-weight: bold;"&gt;do&lt;/span&gt; come in sometimes.)&lt;br /&gt;&lt;br /&gt;If you add this dot_nl checking to your shader code, it will be (a bit) faster, and as a bonus it will get rid of those NaN pixels, too! :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Cause and effects&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;I have to mention that NaN pixels can also be produced by incorrectly written shaders. However you can run into NaNs even &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;with the simplest default shaders and &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;with topologically correct &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;geometry&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;I don't know if this is a mayatomr or a mental ray bug, but these NaNs are caused by tessellated geometry, not shaders.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Under Maya 8.5, if you have subdiv geometry, the "Quads to Triangles" option of the subdiv approx. node can sometimes generate subdiv surfaces with funny normals, resulting in NaN pixels. So be aware of it.&lt;br /&gt;&lt;br /&gt;("Quads to Triangles" can do funny stretches to your UV-mapped textures, too.)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;The effects of NaN pixels can be very annoying. First (of course) they appear as black pixels (or white, depending on what your image viewer prefers :)) Also, they start multiplying when final gather is enabled, and since it's a global effect, you don't have any real chance to backtrack where those NaN values bounced from to your current sample. Even if you could, it's no use, as it happens to models with proper topology, too.&lt;br /&gt;&lt;br /&gt;If you have motion blur, you can have black &lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;streaks&lt;/span&gt;&lt;span style="font-size:100%;"&gt; instead of pixels. Try to blur these in your compositing app, and the blackness will grow quickly instead of diminishing (NaNs quickly propagating to the neighbouring pixels). I've actually had Nuke crashing when I tried to apply a median filter to it.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-4008866070731212916?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=4008866070731212916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/4008866070731212916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/4008866070731212916'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/05/nan-blues-aka-if-dotnl-00.html' title='NaN blues, a.k.a. if ( dot_nl &gt; 0.0 )'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_qhnv56R64Y4/SCdXSZ09H5I/AAAAAAAACgY/Gnoz8TSSB9k/s72-c/%21NaN%21.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-15447595883513955</id><published>2008-05-07T10:43:00.004+02:00</published><updated>2008-05-11T22:14:48.583+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><title type='text'>annoying</title><content type='html'>mental ray (3.5.6.3) still clamps all custom frame buffers if the main framebuffer depth is set to 8 bits. (Works correctly in 16bit and float main buffer modes.) I thought this was fixed decades ago.&lt;br /&gt;&lt;br /&gt;No further comments. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-15447595883513955?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=15447595883513955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/15447595883513955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/15447595883513955'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2008/05/annoying.html' title='annoying'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-3837969772105012453</id><published>2007-10-30T15:12:00.003+01:00</published><updated>2008-05-11T23:02:11.356+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='sampling'/><category scheme='http://www.blogger.com/atom/ns#' term='IMPORTANT'/><title type='text'>a few notes on mr anti-aliasing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_qhnv56R64Y4/RydMMbFQqbI/AAAAAAAAAVc/gfVjkF0kAZY/s1600-h/sampling_problem1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_qhnv56R64Y4/RydMMbFQqbI/AAAAAAAAAVc/gfVjkF0kAZY/s400/sampling_problem1.jpg" alt="" id="BLOGGER_PHOTO_ID_5127150477096561074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;During the last job, I made some observations about a few things one should be careful about when trying to get properly sampled results from mental ray.&lt;br /&gt;&lt;br /&gt;(Actually I was quite surprised, as I didn't expect any problems, mr usually does a pretty good job of sampling and I never had any problems before.)&lt;br /&gt;&lt;br /&gt;1. This one's a no-brainer :) Be careful about view-dependent tessellation (e.g. of subdivs) when you have reflective materials, &lt;span style="font-style: italic;"&gt;especially&lt;/span&gt; if there's thin geometry. Otherwise it'll flicker like hell in animations, even on sampling settings like [1;3] *.&lt;br /&gt;&lt;br /&gt;2. This one's important: Shaders should try not to 'overshoot' pixel color values (above 1.0), &lt;span style="font-style: italic;"&gt;especially&lt;/span&gt; if the geometry is thin.&lt;br /&gt;&lt;br /&gt;Although the second one came as a bit of a surprise, it seems mr can have problems anti-aliasing &lt;span style="font-style: italic;"&gt;extremely&lt;/span&gt; thin &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; bright geometry. In one scene we had some thin 'metal' pieces which had a reflection intensity amount of ~200%.&lt;br /&gt;&lt;br /&gt;While this 'can't happen in reality', this was a (so-called) production scene, where this was an acceptable (?) setting (well, at least it gave the results the compositors needed).&lt;br /&gt;&lt;br /&gt;However in some areas it produced such extremely bright pixels mental ray seemed to have problems anti-aliasing them properly.&lt;br /&gt;&lt;br /&gt;(Well, to be correct: mr did it right, but ... 'garbage in, garbage out', as the saying goes...)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;*: Contrary to some [x]si friends of mine, I dare say I almost never had to render anything with higher sampling than [0;2] -- this could even be used as a warning to oneself: if I have to go higher than [0;2], then something's going wrong :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-3837969772105012453?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=3837969772105012453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/3837969772105012453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/3837969772105012453'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2007/10/few-notes-on-mr-anti-aliasing.html' title='a few notes on mr anti-aliasing'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_qhnv56R64Y4/RydMMbFQqbI/AAAAAAAAAVc/gfVjkF0kAZY/s72-c/sampling_problem1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-4898936821729082404</id><published>2007-08-23T19:59:00.001+02:00</published><updated>2008-05-11T22:14:35.085+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='shader'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>say "monolithic"</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_qhnv56R64Y4/Rs3LqhL8b2I/AAAAAAAAAMM/2C7pYfawCmw/s1600-h/xyaLambert.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 45px; height: 606px;" src="http://bp1.blogger.com/_qhnv56R64Y4/Rs3LqhL8b2I/AAAAAAAAAMM/2C7pYfawCmw/s400/xyaLambert.jpg" alt="" id="BLOGGER_PHOTO_ID_5101957884204052322" border="0" /&gt;&lt;/a&gt;The image on the right is a snapshot of my general-purpose material shader (mental ray) which has only two additional capabilities: it can output shading components to separate buffers and it can 'interact' with a 'fellow' light shader.&lt;br /&gt;&lt;br /&gt;I'm so annoyed that the code got this long (there's no 'extra fat' in there), and with every production-related request, it keeps growing bit-by-bit. I don't like it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-4898936821729082404?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=4898936821729082404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/4898936821729082404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/4898936821729082404'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2007/08/say-monolithic.html' title='say &quot;monolithic&quot;'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_qhnv56R64Y4/Rs3LqhL8b2I/AAAAAAAAAMM/2C7pYfawCmw/s72-c/xyaLambert.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-5321760052956236850</id><published>2007-05-17T14:42:00.001+02:00</published><updated>2008-05-11T22:15:17.659+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='skinning'/><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><title type='text'>Dual Quaternion-Based Skinning</title><content type='html'>I recently stumbled upon dual-quaternion skinning (&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=dual+quaternion+skinning&amp;amp;btnG=Search"&gt;here&lt;/a&gt; to &lt;a href="http://isg.cs.tcd.ie/projects/DualQuaternions/"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;It's very cool, and works much better than regular linear-blended skinning (aka. Smooth Skinning). I'm so tired of working around geometry flattened out by joint rotations (which I usually do using a &lt;a href="http://www.comet-cartoons.com/MELfiles/poseDeformer.html"&gt;PoseDeformer&lt;/a&gt;-like method).&lt;br /&gt;&lt;br /&gt;One serious disadvantage is that DQ skinning doesn't support scaling of joints, and that's &lt;span style="font-style: italic;"&gt;bad&lt;/span&gt; (I often use that, even for non-cartoony characters). I with there was a workaround for that.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;ps.: An updated opinion of smooth skin painting: I realized that the Smooth Skin Paint Weights Tool doesn't (have the chance to) mess up weights, if you "hold" the weights &lt;span style="font-weight: bold;"&gt;on all joints except the one you paint,&lt;/span&gt; and its "relatives". Based on that idea I wrote some support scripts that sped up my painting workflow quite a bit. (Meaning, I don't feel the urge to kill  &lt;strike&gt;who wrote the paint tool&lt;/strike&gt; someone while painting weights anymore.)&lt;br /&gt;&lt;br /&gt;However I still stick to my opinion that a proper paint tool could be written that wouldn't force the user to resort to "manual" tricks. (I &lt;/span&gt;&lt;span style="font-size:100%;"&gt;am &lt;/span&gt;&lt;span style="font-size:100%;"&gt;actually willing to do that if I get the time.)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-5321760052956236850?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=5321760052956236850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5321760052956236850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/5321760052956236850'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2007/05/dual-quaternion-based-skinning.html' title='Dual Quaternion-Based Skinning'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-113580150463924776</id><published>2005-12-28T21:21:00.001+01:00</published><updated>2008-05-11T22:15:32.646+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>still linux</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3677/1752/1600/linux_desktop1.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/3677/1752/320/linux_desktop1.jpg" alt="" border="0" /&gt;&lt;/a&gt;This is not directly work related (as for the last few weeks I managed to take only a "light workload"). Since the last post I keep on using Linux, and I quite like it. It has a different feeling (but nowadays people aren't used to multiple OSs, only the most dominant).&lt;br /&gt;&lt;br /&gt;It took me about a week to get comfortable with it, but after that, it's very familiar and useable (my solid opinion is that there are at least 3-4 *x window managers beat windows UI-wise any time :)).&lt;br /&gt;&lt;br /&gt;Actually I like it's look so much that I even posted a screenshot; take a look. :) Everything is antialiased, nice and smooth, yum-yum. ;) I figured out that I actually &lt;span style="font-style: italic;"&gt;like &lt;/span&gt;the OSX window borders... (But never the other UI buttons'n-stuff -- from that much candy I could almost puke.)&lt;br /&gt;&lt;br /&gt;I know that WinXP also has antialiased fonts and shit, but still, for some reason &lt;span style="font-style: italic;"&gt;this&lt;/span&gt; still looks much better to me. But perhaps it's not just the look, but the richer functionality that gives that. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-113580150463924776?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=113580150463924776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113580150463924776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113580150463924776'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/12/still-linux.html' title='still linux'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-113521085972826882</id><published>2005-12-22T01:17:00.001+01:00</published><updated>2008-05-11T22:15:48.422+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>linux</title><content type='html'>I'm switching to linux (again), this time it's Kubuntu. Now I installed it both at home and at the office, as I'm planning to use it for work and ... everything else :)&lt;br /&gt;&lt;br /&gt;I'd like to have an own web space again and a proper home page plus wordpress installed. The current situation is a bit depressing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-113521085972826882?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=113521085972826882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113521085972826882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113521085972826882'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/12/linux.html' title='linux'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-113295908170240928</id><published>2005-11-25T22:57:00.002+01:00</published><updated>2008-05-11T23:25:17.116+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='shader'/><category scheme='http://www.blogger.com/atom/ns#' term='sampling'/><category scheme='http://www.blogger.com/atom/ns#' term='IMPORTANT'/><title type='text'>a surprising mental ray overhead</title><content type='html'>Today I had a kind of "shocking" mental ray-related discovery.&lt;br /&gt;&lt;br /&gt;A few years ago during an exchange of e-mails with Thomas Driemeyer (a "mental head", I took the liberty of asking questions from the most reliable source :)) we talked about adaptive sampling, and he hinted that the noise pattern of area lights can also be reduced by using very low contrast thresholds, and setting the area light sampling to even as low as 1x1 (as the rigorous overall sampling would take care of it anyway). &lt;span style="font-size:85%;"&gt;[*]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For the past few days I'm gotten back to shader writing, and wrote a "soft illumination" material shader, which basically softens lambertian surface illumination by taking multiple samples, each with a slightly modified surface normal, then averages the result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3677/1752/1600/softillum3.jpg"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/3677/1752/400/softillum3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Technically, it's a small and fast loop within the main illum loop, so I didn't expect any major slowdowns (except that with this softening the shading can go beyond the "terminator", so backface-culling should be disabled for light testing).&lt;br /&gt;&lt;br /&gt;As this is a multi-sampled effect, there's chance for noise, so for the first try I thought of using a low sampling rate in the shader, and trying to get rid of noise using mental ray's adaptive sampling, and the speed results were shocking: the non-smoothed lambert got rendered in ~14 secs, the smoothed one took more than 1 minute!&lt;br /&gt;&lt;br /&gt;Now that's bad, I thought, and set increased the number of softillum-samples within the shader and the rendering time dropped to ~30 secs! Then I picked up my jaw from the floor :) This means that there was a pretty nice administrative overhead of mental ray between the calls of my shader!&lt;br /&gt;&lt;br /&gt;(On second thought, it's really not that surprising, especially if there are other shaders to slow the sampling down, like expensive light or lens shaders.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;So, the conclusion&lt;/span&gt; is even if all artifacts can get rid of by increasing overall sampling, it's faster to use oversampling options &lt;span style="font-style: italic;"&gt;within&lt;/span&gt; the shaders.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;* : Another 'myth' is that by using high image sampling, one can get rid of flickering artifacts of procedural texture shaders. Although I'd be the happiest person on the planet if this was the case, but it is not.&lt;br /&gt;&lt;br /&gt;So, the bad new is, if you write your own procedural texture shader, you have to implement texture antialiasing yourself, or it'll flicker like hell in animations.&lt;br /&gt;&lt;br /&gt;The good news is that if you're lazy and go for the usual 'brute-force' in-shader oversampling, &lt;span style="font-family: courier new;"&gt;mi_sample()&lt;/span&gt; will be a good and reliable friend. I experimented with shaders, where the procedural 3d texture was evaluated n times, and I used &lt;span style="font-family: courier new;"&gt;mi_sample()&lt;/span&gt; to generate 'random' offsets for the xyz coordinate input of each eval, and with very nice results.&lt;br /&gt;&lt;br /&gt;A tight inner sampling loop within a shader is the fastest you can get, so use it! (The general rule applies here, too: move out as much code as you can from the loop itself, especially non-inlined function calls and mi_* calls!)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-113295908170240928?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=113295908170240928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113295908170240928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113295908170240928'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/11/surprising-mental-ray-overhead.html' title='a surprising mental ray overhead'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-113148975083973471</id><published>2005-11-08T23:09:00.002+01:00</published><updated>2008-05-11T23:58:22.420+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><title type='text'>texture deformer; some deformer notes</title><content type='html'>I just finished an implementation of a "texture deformer" -- basically a displacer, which uses a procedural 3d or projected texture to apply displacement on objects' control vertices.&lt;br /&gt;&lt;br /&gt;Initially, I wanted to follow Maya's DG node "behavioural" guidelines as exactly as possible (ie. that a DG node should produce it's result based only it's input attributes -- like a "black box" --, without getting data from the scene any other way).&lt;br /&gt;&lt;br /&gt;Now, for a displacement deformer such as above, the texture node should be evaluated for each vertex. I wanted to achieve this by having an input attribute on my node where the texture is connected. Then I could've found out which output attribute of the texture is connected to my deformer. Then, in the deformer loop, for each vertex I set the texture's output attr "dirty", forcing it's re-evaluation (and feeding it the proper spatial coordinates, of course).&lt;br /&gt;&lt;br /&gt;I was intrigued from a theoretical point of view -- this is basically evaluating a sub-graph multiple times from a node, and I wondered if the architecture allows it. (Actually I hadn't got much doubt on my mind, as regardless of my many Maya-related rants, the foundation is a solid one; that's Alias's luck, that those were some exceptional people who laid out the basics :))&lt;br /&gt;&lt;br /&gt;But my experiment ended a bit unexpectedly sudden when I couldn't find a method for setting an attribute &lt;span style="font-style: italic;"&gt;dirty&lt;/span&gt; (there seems to be no counterpart for ::setClean()). So at the end I ended up using MRenderUtil::sampleShadingNetwork(), which is a 100% valid solution. (The other reason why I wanted to use the general DG-evaluation way is to allow not just shaders but any nodes -- like expressions -- to be used as input. But any such node can be used in shader networks as well, so it remained flexible enough.)&lt;br /&gt;&lt;br /&gt;However the occasion of writing this deformer brought me in a situation that is very common for anyone who writes more complex deformers. It's not the deformer class itself, but rather the MItGeometry class (which the deformer uses for iterating through the geometry control points.)&lt;br /&gt;&lt;br /&gt;To put it short, with MItGeometry &lt;span style="font-style: italic;"&gt;you can only access vertex coordinate data but nothing else&lt;/span&gt; (such as vertex normals, UVs, and the like) -- and if you want any of this, you have to go upstream the graph yourself to find the original geometry, write different code sections for each major geometry type, etc. This quickly defeats the intended elegance and simplicity of the code.&lt;br /&gt;&lt;br /&gt;So I'd really like to have an MItGeometry class extended with methods for querying such common surface attributes (well, at least normals and a few other common topological properties, like tangents, etc). It would be very useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-113148975083973471?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=113148975083973471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113148975083973471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/113148975083973471'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/11/texture-deformer-some-deformer-notes.html' title='texture deformer; some deformer notes'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112992163698591323</id><published>2005-10-21T21:07:00.001+02:00</published><updated>2008-05-11T22:18:51.623+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><title type='text'>a different blendShape implementation</title><content type='html'>A few days ago I read about how blendShapes were implemented in Mirai (the basic idea was that all targets were stored in the same mesh -- for each vertex the position differences from the base mesh, and that's for each target shape), and suddenly I got the idea how to implement this in Maya. One fundamental advantage of this method is that the mesh can be re-modeled even after the blendShape targets are created; the target shapes are preserved properly even after topology-changing operations.&lt;br /&gt;&lt;br /&gt;The actual implementation turned out to be so easy I already got a final working version of this. It took me about only one day and now I have an excellent power tool that turns regular blendShapes to dust, big time! :)&lt;br /&gt;&lt;br /&gt;It feels so &lt;span style="font-style: italic;"&gt;good&lt;/span&gt; when you create something simple that however will change (improve!) a part of your life. That might sound (over-)dramatic, but I'm also a rigging TD, so "with one hand I build it, with the other I use it" :)&lt;br /&gt;&lt;br /&gt;The next step is to implement a pose-based skin deformation tool based on the above. Actually I already have a working prototype of this, I just need to do a bit of testing, and round the edges in terms of UI and the like. A very good thing (that I'm looking forward for) is if a skin is set up with blendShapes helping the skin in critical areas (knee, elbow, shoulder, groin), then I could even switch back to rigid skinning (it's much faster in every term, and I'm sick with the quality of the smooth skin editing tools).&lt;br /&gt;&lt;br /&gt;Finally, the third thing I'm planning (and this is the only that is just a plan for now and doesn't exists yet) is to store skin weights on the mesh in the same way the target shapes are stored. That would provide complete topology-independence for all skinning and blending! (I could even extend this to any weight map, in general.) Wouldn't that be cool! I'm gonna do it, no doubt. No doubt on my mind... :)&lt;br /&gt;&lt;br /&gt;[Actually, it would be cool is Alias somehow extended the deformer class in general that weightmaps would be preserved after topology modifications.]&lt;br /&gt;&lt;br /&gt;I wonder why Alias doesn't implement such features. If I can write this kind of stuff in a few days, they could do this stuff much more properly (without the workarounds I constrained to). My favorite company from this point of view is Side Effects; with every release of Houdini they pump in an awesome amount of &lt;span style="font-style: italic;"&gt;useful&lt;/span&gt; features (especially if you compare them to Alias). That's a good opportunity to remind myself to install that Apprentice edition I grabbed yesterday! (I've also written a Houdini exporter back in the good ol' days... ;))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112992163698591323?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=112992163698591323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112992163698591323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112992163698591323'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/different-blendshape-implementation.html' title='a different blendShape implementation'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112975293567942180</id><published>2005-10-19T22:15:00.001+02:00</published><updated>2008-05-11T22:19:10.557+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><category scheme='http://www.blogger.com/atom/ns#' term='modeling'/><title type='text'>poly modeling, average normals</title><content type='html'>I stared to look for fellow Maya users' presence and found a small article (post) by Eric Hill &lt;a href="http://www.intric8.com/memo/?p=10"&gt; here&lt;/a&gt;. It is about merging a head and a body geometry at the neck.&lt;br /&gt;&lt;br /&gt;One of my comments on that would be that it is always better to merge edges than vertices (ie. with the Merge Multiple Edges), because it has a smaller chance of ending up with improper topology (although not much smaller).&lt;br /&gt;&lt;br /&gt;In this regard, the poly modeling toolset of Maya 1.0 was simply &lt;span style="font-style: italic;"&gt;perfect&lt;/span&gt;: all necessary tools existed, but in a way that you simply couldn't build a topologically incorrect polymesh. The downside was that you couldn't fix bad meshes (for instance, imported ones). But I remember I was very impressed by the thoughtful selection of proper functions.&lt;br /&gt;&lt;br /&gt;(It is more or less true for the entire 1.0 version of Maya: it was one of the most important milestone in the entire history of computer graphics. My opinion is that it is the best 1.0 release ever.)&lt;br /&gt;&lt;br /&gt;Anyway, back to the original point: the other modeling function I wanted to mention is the Normals-&amp;gt;Average Normals, which allows you to set&lt;br /&gt;smooth normals nearby vertices. It can be used to get rid of the hard edges of a neck/body seam &lt;span style="font-style: italic;"&gt;without actually merging the vertices&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112975293567942180?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=112975293567942180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112975293567942180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112975293567942180'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/poly-modeling-average-normals.html' title='poly modeling, average normals'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112973293844353595</id><published>2005-10-19T16:42:00.001+02:00</published><updated>2008-05-11T22:20:43.841+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='people'/><title type='text'>mayaknife</title><content type='html'>It's always interesting to find other people with similar professions and/or interests.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.livejournal.com/users/mayaknife/"&gt;http://www.livejournal.com/users/mayaknife/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This guy was a Maya developer (or at least, worked at Alias when Maya had the slogan "Tools for 3D Minds" -- which was a pretty cool one, I think), then changed to freelance plug-in/shader writing. It's interesting to read about his work (although he spends a bit more time on issues like shadow matte shaders than it deserves :)). I'll try to find other Maya related blogs (with the Google Reader it might be easier, but I'll see).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112973293844353595?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=112973293844353595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112973293844353595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112973293844353595'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/mayaknife.html' title='mayaknife'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112968431638584534</id><published>2005-10-19T03:11:00.001+02:00</published><updated>2008-05-11T22:19:33.810+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='skinning'/><category scheme='http://www.blogger.com/atom/ns#' term='maya'/><title type='text'>Smooth skinning headaches</title><content type='html'>Maya smooth skinning caused me a lot of headaches in the past, but with the "enhancements" included in Maya 7, it got even worse. There was a point when I could actually kill someone.&lt;br /&gt;&lt;br /&gt;Issues:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;In Maya 7, smooth-skinned geometry displays joint colors on geometry components (ie. vertices) when in component mode (even if you turn joint coloring off). This is useless, except that now I cannot see which vertices I select, because of that stupid coloring.&lt;/li&gt;   &lt;li&gt;In the Paint Weights tool, all reflection painting options are now simply disabled, and &lt;span style="font-style: italic;"&gt;the manual explicitly tells you that if you want mirrored weights, you should do it using the appropriate function&lt;/span&gt; (Mirror Weights). Now that is simply outrageous.&lt;/li&gt;   &lt;li&gt;The above mentioned Mirror Weights and Copy Weights functions are still crap. Although they seem to be working better than previously, they are still very unreliable.&lt;/li&gt;   &lt;li&gt;In the Paint Weights tool, smoothing the weighted paints usually messes up everything so much that some vertices try to escape from the known universe. This effect could be found in previous versions, but now it's several times stronger. (This can be reduced by setting the max influences to 5 or more, but you can never get rid of it. Also see below.)&lt;/li&gt;   &lt;li&gt;In practice you have to use at least 5 influences per vertex, otherwise the paint tools doesn't work properly (especially smoothing). I think we all know the usual smooth skinning phenomenon, when you move a character's joint on one side and it moves vertices on the other... The paint weight tools were always imprecise, and I tried to address this by reducing influences to the minimum (usually 2). Now I can forget about that, too.&lt;br /&gt;&lt;/li&gt; &lt;/ul&gt; In general, the quality of Maya's smooth skinning toolset (I'm talking about the editing tools, not the deformer itself) is worse than any beta (or alpha) software, and they didn't address this very serious problem for versions. And it's still not better in 7.0 -- they seem to be doing something to it, but it's still crap, the only difference that it's now crap in a slightly different way. :(&lt;br /&gt;&lt;br /&gt;For Maya 6, I had to &lt;span style="font-style: italic;"&gt;completely rewrite&lt;/span&gt; the "Prune Small Weights" function, as it didn't seem to be working at all. Now, after my first ride with the "new" skinning tools in Maya 7, I'm considering of writing my own version of the Paint Weights tool.&lt;br /&gt;&lt;br /&gt;What I understand least about all this is that skinning is one of the f*cking most important things in a 3d software, and Maya is one of the most popular ones. These are the moments when you try not to think about that you actually &lt;span style="font-style: italic;"&gt;paid&lt;/span&gt; for this. :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Update, 2005. oct. 30.:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the meantime I found a way of re-enabling the reflection option in the Paint Weights Tool, but in response Jill Ramsay from the highend3d list explained why this function got disabled. (So I have to look into this, perhaps I was too harsh about this particular issue.) The rest of my opinion still stands :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112968431638584534?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=112968431638584534' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112968431638584534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112968431638584534'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/smooth-skinning-headaches.html' title='Smooth skinning headaches'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112968195121142752</id><published>2005-10-19T02:17:00.001+02:00</published><updated>2008-05-11T22:19:55.254+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='mental ray for maya'/><title type='text'>mrfm shaders #2</title><content type='html'>While I'm at it, another rant about mental ray for Maya shaders:&lt;br /&gt;&lt;br /&gt;The refraction calculations of &lt;span style="font-style: italic;"&gt;all&lt;/span&gt; mrfm shaders are simply &lt;span style="font-weight: bold;"&gt;crap&lt;/span&gt;. (I've found this out spending about 1 1/2 hours, trying to shade a proper C***-Cola bottle, and when I couldn't get the glass part right, at the end I built it from base shaders -- "material" and "sample compositing".)&lt;br /&gt;&lt;br /&gt;This is very annoying, and one of the most outrageous bugs. It is also so easy to notice, I don't understand why is it not fixed? (Still broken in 7.0)&lt;br /&gt;&lt;br /&gt;[Btw: for the proper IOR effect, the material shader should check if the ray is incoming or outgoing (based on surface normal direction); for an incoming ray the IOR value should be used, for outgoing the reciprocial of the IOR.]&lt;br /&gt;&lt;br /&gt;And I not yet mentioned the other issue of Maya not carrying alpha component with colors within shader networks (although mental ray does), resulting in things like black alpha for areas shaded with base shaders, etc. (I know these things can be fixed, but I want such things to simply &lt;span style="font-style: italic;"&gt;work&lt;/span&gt; without explicitly addressed.) The absence of alpha sometimes can be a problem with native Maya shading networks as well, not just mental ray (the alpha for a shader's defaultColor, for instance).&lt;br /&gt;&lt;br /&gt;Yet again the need for an own material shader. (I'm just too lazy to get into it... :))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112968195121142752?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=112968195121142752' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112968195121142752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112968195121142752'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/mrfm-shaders-2.html' title='mrfm shaders #2'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112968100596929919</id><published>2005-10-19T01:45:00.001+02:00</published><updated>2008-05-11T22:21:03.665+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mental ray'/><category scheme='http://www.blogger.com/atom/ns#' term='shader'/><category scheme='http://www.blogger.com/atom/ns#' term='IMPORTANT'/><title type='text'>Note on mental ray shaders</title><content type='html'>Our most recent job was a 30sec full-CG commercial with animated characters (I'll post images later). I had to do character rigging and lighting/shading (at the end I did comping as well). We used mental ray (for Maya) for rendering.&lt;br /&gt;&lt;br /&gt;When I was lighting one of the backgrounds (a bathroom set), I thought of optimizing shading a bit, and changed the shader of the walls and floor -- both were Maya lambert shaders with textured color channel, and I simply changed this shader to mib_lambert (the mental ray base shader).&lt;br /&gt;&lt;br /&gt;Now consider this: render time dropped from ~5:30 to ~2:30 which is almost &lt;span style="font-weight: bold;"&gt;50%&lt;/span&gt; speed increase! (The walls and floor covered much of the image.) I &lt;span style="font-style: italic;"&gt;did&lt;/span&gt; expect some speedup, but that was definitely beyond my expectations. It is good to know how optimized the Maya shaders are. :)&lt;br /&gt;&lt;br /&gt;Anyway, the conclusion is this: always use the simplest shaders that are suitable for the actual task -- it's worth it. (Other issues might be faced however, for instance the mental ray base shaders doesn't support Maya-style light linking.)&lt;br /&gt;&lt;br /&gt;A side thought: it is not just the quality of the mental ray for Maya shaders -- I never saw a single CG application that had properly written mental ray shaders (including Softimage|XSI, where I could also mention procedural textures' quality). I mean quality of the actual shader code (such as skipping unnecessary calculations, doing texture antialiasing for procedurals, etc).&lt;br /&gt;&lt;br /&gt;One item of my very long "global todo list" is to write a proper shader library (or at least a proper material shader). By the way, what should be mentioned here is Gonzalo Garramuno's excellent mental ray stuff which can be found &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=100649"&gt;here&lt;/a&gt; (called mrClasses, placed at Sourceforge).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112968100596929919?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18014991&amp;postID=112968100596929919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112968100596929919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112968100596929919'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/note-on-mental-ray-shaders.html' title='Note on mental ray shaders'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18014991.post-112967911531350271</id><published>2005-10-19T01:26:00.000+02:00</published><updated>2005-10-19T01:45:15.316+02:00</updated><title type='text'>begin</title><content type='html'>After some (not-so-much) thinking, I've decided to create a "blog" for writing about my everyday experiences in 3d computer graphics work.&lt;br /&gt;&lt;br /&gt;I'm Imre Tüske, and I'm a CG artist and technical director, living/working in Budapest, Hungary.&lt;br /&gt;&lt;br /&gt;I use Alias Maya for 3d and Shake for compositing tasks. For the time being I mostly work on commercials, where one often have to do everything by himself (modeling, animation/rendering and compositing). With about 7 years of experience, I do entire CG commercials just by myself smoothly (and that includes dealing with crazy requests from clients ;)). I have movie/film experience as well.&lt;br /&gt;&lt;br /&gt;When working in a team, I usually do technical direction, that includes: designing and realizing CG workflow pipelines, character rigging (and other areas requiring technical assistance); also lighting/shading and compositing.&lt;br /&gt;&lt;br /&gt;I also have "average" programming skills, and I often do Maya MEL scripting and API plug-in programming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18014991-112967911531350271?l=blue-riviera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112967911531350271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18014991/posts/default/112967911531350271'/><link rel='alternate' type='text/html' href='http://blue-riviera.blogspot.com/2005/10/begin.html' title='begin'/><author><name>Imre Tuske</name><uri>http://www.blogger.com/profile/08376610326620998644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
