<?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-18308600</id><updated>2011-12-03T15:22:47.420Z</updated><title type='text'>renderdan</title><subtitle type='html'>Maybe the most boring blog ever... but it's *my* most boring blog ever.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18308600.post-4847838899687807629</id><published>2011-12-03T15:20:00.002Z</published><updated>2011-12-03T15:22:47.427Z</updated><title type='text'>How annoying is grep ?</title><content type='html'>So in a directory with only subdirectories, I was doing&lt;br /&gt;&lt;br /&gt;grep -r 'Distribution2D' *.cpp&lt;br /&gt;&lt;br /&gt;but it didn't work. "Bloody recursive flag is a load of bollocks" I thought to myself. So it turns out it does work but you have to be a bit careful with the file wild cards to make sure it finds everything into which it can recurse.&lt;br /&gt;I.e. this worked fine.&lt;br /&gt;&lt;br /&gt;grep -r 'Distribution2D' */*.cpp&lt;br /&gt;&lt;br /&gt;Well, f**k me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-4847838899687807629?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/4847838899687807629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=4847838899687807629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4847838899687807629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4847838899687807629'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2011/12/how-annoying-is-grep.html' title='How annoying is grep ?'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-8794356941563721601</id><published>2011-05-16T09:24:00.003+01:00</published><updated>2011-05-16T09:39:06.193+01:00</updated><title type='text'>Diagram of the Day #6</title><content type='html'>You've heard of a bell curve. Well this is a bellend curve.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-jP0JA8Mn3bM/TdDfcP3Pn_I/AAAAAAAAAFA/DPsjgcT7Clw/s1600/bellendGraph.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 237px;" src="http://2.bp.blogspot.com/-jP0JA8Mn3bM/TdDfcP3Pn_I/AAAAAAAAAFA/DPsjgcT7Clw/s320/bellendGraph.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5607227212463841266" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also from the same paper, bottom right is an interesting shape... where have I seen that shape before ??&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-oeDHff1c-LQ/TdDiauNAGZI/AAAAAAAAAFI/OdWazRc3aK4/s1600/bellendCurve2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 171px;" src="http://1.bp.blogspot.com/-oeDHff1c-LQ/TdDiauNAGZI/AAAAAAAAAFI/OdWazRc3aK4/s320/bellendCurve2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5607230484783307154" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://www.cv.ci.ritsumei.ac.jp/~takeday/research/paper/egmm04.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-8794356941563721601?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/8794356941563721601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=8794356941563721601' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/8794356941563721601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/8794356941563721601'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2011/05/diagram-of-day-6.html' title='Diagram of the Day #6'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://2.bp.blogspot.com/-jP0JA8Mn3bM/TdDfcP3Pn_I/AAAAAAAAAFA/DPsjgcT7Clw/s72-c/bellendGraph.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-2939731115660186251</id><published>2010-12-31T10:01:00.000Z</published><updated>2010-12-31T10:04:22.469Z</updated><title type='text'>Funniest website of the week/month/year?</title><content type='html'>http://damnyouautocorrect.com/category/best-of-dyac&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-2939731115660186251?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/2939731115660186251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=2939731115660186251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/2939731115660186251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/2939731115660186251'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/12/funniest-website-of-weekmonthyear.html' title='Funniest website of the week/month/year?'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-3397775938678493122</id><published>2010-11-22T08:12:00.002Z</published><updated>2010-11-22T08:15:15.007Z</updated><title type='text'>Diagram of the Day #5</title><content type='html'>Its wang time again. This wang is importance sampled!&lt;br /&gt;Woooo. No wonder that eye is looking at it.&lt;br /&gt;Bucking  the page 3 trend, this comes from p.13 of the siggraph 2010 "IS in production  rendering course notes". Good work!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KqsALB4OQ1o/TOomWjACUKI/AAAAAAAAAEY/3Y3Uehi7VXM/s1600/ISwang.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 170px;" src="http://1.bp.blogspot.com/_KqsALB4OQ1o/TOomWjACUKI/AAAAAAAAAEY/3Y3Uehi7VXM/s320/ISwang.jpg" alt="" id="BLOGGER_PHOTO_ID_5542284460227186850" 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/18308600-3397775938678493122?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/3397775938678493122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=3397775938678493122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/3397775938678493122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/3397775938678493122'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/11/diagram-of-day-5.html' title='Diagram of the Day #5'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://1.bp.blogspot.com/_KqsALB4OQ1o/TOomWjACUKI/AAAAAAAAAEY/3Y3Uehi7VXM/s72-c/ISwang.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-4046436179322818946</id><published>2010-11-08T14:45:00.001Z</published><updated>2010-11-08T14:46:41.890Z</updated><title type='text'>Diagram of the Day #4</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_KqsALB4OQ1o/TNgNQru6xmI/AAAAAAAAAEQ/CZPxvsp7XoI/s1600/dotd4.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 118px;" src="http://3.bp.blogspot.com/_KqsALB4OQ1o/TNgNQru6xmI/AAAAAAAAAEQ/CZPxvsp7XoI/s320/dotd4.jpg" alt="" id="BLOGGER_PHOTO_ID_5537190322120607330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This one comes from p.3 of :&lt;br /&gt;&lt;br /&gt;http://langley.atmos.colostate.edu/courses/at622/lectures/supp_lecture_4A.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-4046436179322818946?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/4046436179322818946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=4046436179322818946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4046436179322818946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4046436179322818946'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/11/diagram-of-day-4.html' title='Diagram of the Day #4'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://3.bp.blogspot.com/_KqsALB4OQ1o/TNgNQru6xmI/AAAAAAAAAEQ/CZPxvsp7XoI/s72-c/dotd4.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-4533093953162675385</id><published>2010-09-21T15:33:00.001+01:00</published><updated>2010-09-21T15:34:33.202+01:00</updated><title type='text'>iomanip</title><content type='html'>C++ std iomanip is super handy! &lt;br /&gt;e.g. &lt;br /&gt;&lt;br /&gt;"setw(4) &lt;&lt; setfill('0')" &lt;br /&gt;&lt;br /&gt;http://www.cplusplus.com/reference/iostream/manipulators/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-4533093953162675385?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/4533093953162675385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=4533093953162675385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4533093953162675385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4533093953162675385'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/09/iomanip.html' title='iomanip'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-3421570765253161357</id><published>2010-09-16T13:13:00.002+01:00</published><updated>2010-09-16T13:15:02.227+01:00</updated><title type='text'>Diagram of the Day 3</title><content type='html'>thanks to @fxmonkeydan for this little beauty :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KqsALB4OQ1o/TJIKDxHJzNI/AAAAAAAAAD0/iH4ZLmIvWSI/s1600/rubyk.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 292px;" src="http://1.bp.blogspot.com/_KqsALB4OQ1o/TJIKDxHJzNI/AAAAAAAAAD0/iH4ZLmIvWSI/s320/rubyk.jpg" alt="" id="BLOGGER_PHOTO_ID_5517483553321503954" 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/18308600-3421570765253161357?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/3421570765253161357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=3421570765253161357' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/3421570765253161357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/3421570765253161357'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/09/diagram-of-day-3.html' title='Diagram of the Day 3'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://1.bp.blogspot.com/_KqsALB4OQ1o/TJIKDxHJzNI/AAAAAAAAAD0/iH4ZLmIvWSI/s72-c/rubyk.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-2058978659021219315</id><published>2010-09-09T22:27:00.010+01:00</published><updated>2011-05-16T10:26:18.716+01:00</updated><title type='text'>these just make me laugh...</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_KqsALB4OQ1o/TIlSDAJvXNI/AAAAAAAAADk/-QZMpJeQh_g/s1600/photo2"&gt;&lt;img style="margin: 0px 10px 10px 0px; width: 214px; float: left; height: 320px;" id="BLOGGER_PHOTO_ID_5515029430225820882" alt="" src="http://3.bp.blogspot.com/_KqsALB4OQ1o/TIlSDAJvXNI/AAAAAAAAADk/-QZMpJeQh_g/s320/photo2" border="0" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_KqsALB4OQ1o/TIlRbZWDAEI/AAAAAAAAADU/lRHLv2_OB4A/s1600/photo.PNG"&gt;&lt;img style="margin: 0px 10px 10px 0px; width: 214px; float: left; height: 320px;" id="BLOGGER_PHOTO_ID_5515028749793558594" alt="" src="http://4.bp.blogspot.com/_KqsALB4OQ1o/TIlRbZWDAEI/AAAAAAAAADU/lRHLv2_OB4A/s320/photo.PNG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;this week on Jamie Oliver inside a badgers arse :&lt;br /&gt;  "Inside a Badgers Arse  Risotto".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-2058978659021219315?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/2058978659021219315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=2058978659021219315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/2058978659021219315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/2058978659021219315'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/09/these-just-make-me-laugh.html' title='these just make me laugh...'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://3.bp.blogspot.com/_KqsALB4OQ1o/TIlSDAJvXNI/AAAAAAAAADk/-QZMpJeQh_g/s72-c/photo2' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-7418485014621502891</id><published>2010-09-01T12:27:00.003+01:00</published><updated>2010-09-01T12:29:47.771+01:00</updated><title type='text'>RSL shadeop plugin memory</title><content type='html'>So there are 5 ways to manage memory allocation in an RSL shadeop.&lt;br /&gt;&lt;br /&gt;1. per plugin init  - lifetime from first call to end of frame, not threadsafe, no access to args&lt;br /&gt;&lt;pre&gt;RSLEXPORT RslFunctionTable RslPublicFunctions(myFunctions,&lt;br /&gt;                                             initStringBuffer,&lt;br /&gt;                                             deleteStringBuffer);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;2. per function init - lifetime from first call to end of frame, not threadsafe, access to args&lt;br /&gt;&lt;pre&gt;static RslFunction myFunctions[] = {&lt;br /&gt;   { "string appendTx(string)", appendTx, initStringBuffer, deleteStringBuffer },&lt;br /&gt;   { NULL }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;3. Set / GetGlobalStorate - lifetime from first call to end of frame, not threadsafe&lt;br /&gt;&lt;br /&gt;4. Set / GetThreadData - lifetime of thread, threadsafe&lt;br /&gt;&lt;br /&gt;5. Set / GetLocalData - lifetime of current shaded grid, threadsafe&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-7418485014621502891?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/7418485014621502891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=7418485014621502891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7418485014621502891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7418485014621502891'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/09/rsl-shadeop-plugin-memory.html' title='RSL shadeop plugin memory'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-2436111793565008481</id><published>2010-08-24T13:36:00.002+01:00</published><updated>2010-08-24T13:41:30.179+01:00</updated><title type='text'>Not bloody makefiles again ?</title><content type='html'>Replacing symlinks at compile time, so that republished shadeop DSOs don't fuck with existing shaders:&lt;br /&gt;&lt;br /&gt;Makefile :&lt;br /&gt;# here's the symlink path&lt;br /&gt;MY_SO = $(PRMAN_PLUGDIR)MY.so&lt;br /&gt;&lt;br /&gt;# resolve that to what the symlink points at&lt;br /&gt;_MY_SOA := $(shell readlink $(MY_SO))&lt;br /&gt;&lt;br /&gt;# double slashes in the path will mess up my shader macro's, so remove them&lt;br /&gt;_MY_SO := $(subst //,/,$(_MY_SOA))&lt;br /&gt;&lt;br /&gt;#now we can pass that into SL file scope using the pre-processor define flag, -D&lt;br /&gt;shader .... -D_MYSO=$(_MY_SO)&lt;br /&gt;&lt;br /&gt;Eat it, Makey - in your face, ha!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-2436111793565008481?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/2436111793565008481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=2436111793565008481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/2436111793565008481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/2436111793565008481'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/08/not-bloody-makefiles-again.html' title='Not bloody makefiles again ?'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-1012135960641728469</id><published>2010-07-23T14:01:00.003+01:00</published><updated>2010-07-23T14:08:50.430+01:00</updated><title type='text'>SIGGRAPH 2010</title><content type='html'>I am flying off to LA to attend my first ever SIGGRAPH conference tomorrow. I couldn't be more excited - its something i've always wanted to do since discovering SIGGRAPH papers existed when I was studying computer graphics at UMIST. ( 15+ yrs ago ! ).&lt;br /&gt;I'm not sure why exactly but i've always been a fan of Jim Blinn's articles and work, and always thought it would be quite cool to attend a talk of his or meet him at Siggraph perhaps.&lt;br /&gt;Any road up I am also due to give a short presentation at Pixar's exhibition booth about rendering the Olympus Map room clouds for Clash of the Titans. I am experiencing terror and excitement in equal measure. This is a new experience, usually its just the terror on its own. Fingers crossed it all goes to plan.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-1012135960641728469?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/1012135960641728469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=1012135960641728469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/1012135960641728469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/1012135960641728469'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/07/siggraph-2010.html' title='SIGGRAPH 2010'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-7019801516269144771</id><published>2010-07-13T11:36:00.001+01:00</published><updated>2010-07-13T11:37:57.938+01:00</updated><title type='text'>Diagram of the Day 2</title><content type='html'>Todays winner comes from the cutting edge of towel research.&lt;br /&gt;&lt;br /&gt;( again, page 3 seems a popular choice ) :&lt;br /&gt;&lt;br /&gt;&lt;span class="Object" id="OBJ_PREFIX_DWT3820"&gt;&lt;a target="_blank" href="http://reference.kfupm.edu.sa/content/a/b/abstract_a_layered_method_for_realistic__76571.pdf"&gt;http://reference.kfupm.edu.sa/content/a/b/abstract_a_layered_method_for_realistic__76571.pdf&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KqsALB4OQ1o/TDxBzmrsmjI/AAAAAAAAADM/A3meuJMgRzE/s1600/diagramOfTheDay2.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 250px;" src="http://1.bp.blogspot.com/_KqsALB4OQ1o/TDxBzmrsmjI/AAAAAAAAADM/A3meuJMgRzE/s320/diagramOfTheDay2.jpg" alt="" id="BLOGGER_PHOTO_ID_5493338000298121778" 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/18308600-7019801516269144771?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/7019801516269144771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=7019801516269144771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7019801516269144771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7019801516269144771'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/07/diagram-of-day-2.html' title='Diagram of the Day 2'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://1.bp.blogspot.com/_KqsALB4OQ1o/TDxBzmrsmjI/AAAAAAAAADM/A3meuJMgRzE/s72-c/diagramOfTheDay2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-5188817218722806980</id><published>2010-07-13T11:33:00.004+01:00</published><updated>2010-07-13T13:43:14.875+01:00</updated><title type='text'>Diagram of the Day 1</title><content type='html'>How they ever managed to sneak a picture of a cock and pair of balls past the moderator, i'll never know...&lt;br /&gt;&lt;br /&gt;http://www.cemyuksel.com/research/dualscattering/dualscattering.pdf&lt;br /&gt;&lt;br /&gt;( from  page 3 ):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_KqsALB4OQ1o/TDxBbkofjFI/AAAAAAAAADE/dO9xgOcTJuM/s1600/diagramofTheDay1.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 280px; height: 320px;" src="http://4.bp.blogspot.com/_KqsALB4OQ1o/TDxBbkofjFI/AAAAAAAAADE/dO9xgOcTJuM/s320/diagramofTheDay1.jpg" alt="" id="BLOGGER_PHOTO_ID_5493337587430952018" 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/18308600-5188817218722806980?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/5188817218722806980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=5188817218722806980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5188817218722806980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5188817218722806980'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/07/diagram-of-day-1.html' title='Diagram of the Day 1'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://4.bp.blogspot.com/_KqsALB4OQ1o/TDxBbkofjFI/AAAAAAAAADE/dO9xgOcTJuM/s72-c/diagramofTheDay1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-7572662850181482638</id><published>2010-07-07T15:10:00.005+01:00</published><updated>2010-07-07T15:26:42.685+01:00</updated><title type='text'>Makefile and GLSL</title><content type='html'>So it turns out, as cool as GLSL is, there's no support for #include directives.&lt;br /&gt;Arse.&lt;br /&gt;Includes are quite handy so they are.&lt;br /&gt;&lt;br /&gt;Right, so what we need now is some existing pre-processor to expand the includes in-place.&lt;br /&gt;What about gcc -E ( or g++ -E ) ? Weeelll, they are ok, but they leave place markers everywhere, it doesn't read very nicely. Also you'd have to name all your glsl shader files .c or .cpp or something icky like that.&lt;br /&gt;&lt;br /&gt;Turns out you can run "cpp -P" and that will pre-process the includes nicely. It works on any old file name too - so no problem calling them .glsl&lt;br /&gt;How do I automate it though ? A script ? A makefile ?&lt;br /&gt;Well, since you're preprocessing code, its near enough to a compile to use a makefile.&lt;br /&gt;This is where the (un)fun begins... actually lets cut a long story short, i'm already sick of makefiles without recounting blow by blow details.&lt;br /&gt;&lt;br /&gt;basically you'd do this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;GLSL_SHADERS := $(wildcard hwshaders/*.glsl)&lt;br /&gt;GLSL_SHADERSOUT:= $(GLSL_SHADERS:.glsl=.glslo)&lt;br /&gt;&lt;br /&gt;%.glslo : %.glsl&lt;br /&gt;  @echo $&lt; $@&lt;br /&gt;  @rm -rf $@ ; cpp -P $&lt; $@&lt;br /&gt;&lt;br /&gt;glsl : $(GLSL_SHADERSOUT) &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and then run&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;make glsl&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Which would expect the glsl files to be one directory below the makefile in a dir called hwshaders.&lt;br /&gt;Also I found out that if you are using a makefile conditional if, then the @ thingy to silence command echo doesn't really work. What did work for me was using the .SILENT rule.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;.SILENT: safepub&lt;br /&gt;&lt;br /&gt;safepub:&lt;br /&gt;make clean&lt;br /&gt;make&lt;br /&gt;echo&lt;br /&gt;if test -e /some/path/or/other/my.file; \&lt;br /&gt;then \&lt;br /&gt;echo File Exists \&lt;br /&gt;else \&lt;br /&gt;echo Doesn't Exist \&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;so let that be a lesson to ye.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-7572662850181482638?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/7572662850181482638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=7572662850181482638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7572662850181482638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7572662850181482638'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/07/makefile-and-glsl.html' title='Makefile and GLSL'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-8287624863369269743</id><published>2010-06-15T17:21:00.002+01:00</published><updated>2010-06-15T17:24:40.291+01:00</updated><title type='text'>dPds works !</title><content type='html'>This was posted on the renderman forums, so i'm pretty sure its common knowledge.&lt;br /&gt;Basically if you are in need of a consistent local basis transform for the usual stuff like normal maps and mapped anisotropic direction, you'll need a reliable tangent vector, sometimes referred to (by me, mainly) as dPds.&lt;br /&gt;&lt;br /&gt;The RSL code is as follows:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;void dPdst( float ss,tt; point PP;&lt;br /&gt;           output varying vector dPds;&lt;br /&gt;           output varying vector dPdt; )&lt;br /&gt;{&lt;br /&gt;   float Dus = Du(ss);&lt;br /&gt;   float Dut = Du(tt);&lt;br /&gt;   float Dvs = Dv(ss);&lt;br /&gt;   float Dvt = Dv(tt);&lt;br /&gt;   vector DuP = Du(PP);&lt;br /&gt;   vector DvP = Dv(PP);&lt;br /&gt;   float det = (Dus*Dvt-Dvs*Dut);&lt;br /&gt;   dPds = (DuP*Dvt - DvP*Dut) / det;&lt;br /&gt;   dPdt = (DvP*Dus - DuP*Dvs) / det;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-8287624863369269743?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/8287624863369269743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=8287624863369269743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/8287624863369269743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/8287624863369269743'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/06/dpds-works.html' title='dPds works !'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-9518372788045933</id><published>2010-06-01T09:10:00.003+01:00</published><updated>2010-06-29T09:04:53.279+01:00</updated><title type='text'>9 things i hate about my iPhone</title><content type='html'>These are the &lt;strike&gt;10&lt;/strike&gt; 9 most irritating things about my iPhone that stop at 'quite good' where it could have been truly great.&lt;br /&gt;&lt;br /&gt;1 - Battery Life : shocking.&lt;br /&gt;2 - Its expensive. Very very expensive.&lt;br /&gt;3 - It can't bluetooth photos to non-iPhones. Basic stuff, and it can't even do that.&lt;br /&gt;4 - You can't use your own sound files for ring tones. You have to buy them&lt;br /&gt;&lt;strike&gt;5 - You can't copy files, such as pdfs, to it for offline reading. That's rubbish!!&lt;/strike&gt;&lt;br /&gt;5 - The calendar can't repeat on useful intervals such as 'last working day of month' or 'first tuesday in month'. Basic, basic, *basic* functionality that it can't even do.&lt;br /&gt;6 - The pin number screen-lock is so irritating. If I want my data  secure, I have to keep unlocking it all the time, even with the least annoying unlock option. Its so annoying when you are in a hurry.&lt;br /&gt;7 - Touch sensitive keypad and predictive text frequently cause typos. The more of a hurry you are in, the worse it gets since it is so over-sensitive to mis-keying (or not adding the letter even when you hit a button with your finger).&lt;br /&gt;8 - You can't write your own software for it unless you have a mac. Why should that be? Its not even running OSX !&lt;br /&gt;9 - The sim card slot is like a chinese maths puzzle.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And that ladies and gentlemen, is why I think Apple are such smug bastards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-9518372788045933?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/9518372788045933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=9518372788045933' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/9518372788045933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/9518372788045933'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/06/10-things-i-hate-about-my-iphone.html' title='9 things i hate about my iPhone'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-5229523306680213370</id><published>2010-04-12T09:37:00.002+01:00</published><updated>2010-04-12T09:52:02.847+01:00</updated><title type='text'>handy shell alias</title><content type='html'>&lt;span style="font-weight: bold;"&gt;pf is a wildcard running task search :&lt;/span&gt;&lt;br /&gt;&lt;code&gt;alias pf "ps -ef | grep \!* | egrep -v 'grep |bin/pf'"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rmane set prman env :&lt;/span&gt;&lt;br /&gt;&lt;code&gt;alias rmane   'setenv RMANTREE /opt/pixar/RenderManProServer-\!:1 ;   setenv PRMANVER \!:1_64 ; setenv PRMAN_SHADER_PATH ${BUILDROOT}prman-${PRMANVER}/shaders ; setenv PRMAN_DSO_PATH ${BUILDROOT}prman-${PRMANVER} ; echo RMANTREE set to $RMANTREE ; echo PRMANVER set to $PRMANVER ; echo PRMAN_SHADER_PATH set to $PRMAN_SHADER_PATH ; echo PRMAN_DSO_PATH set to $PRMAN_DSO_PATH '&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rmanv queries prman env :&lt;/span&gt;&lt;br /&gt;&lt;code&gt;alias rmanv 'env | grep RMAN'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ribgrep :&lt;/span&gt;&lt;br /&gt;&lt;code&gt;alias ribgrep '~/ribgrepext \!*'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;where ribgrepext is a bash script like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ribgrepext&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; :&lt;/span&gt;&lt;br /&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;if [ ! $# == 2 ]; then&lt;br /&gt;$RMANTREE/bin/catrib $1 | grep -o -e '[^\"]*\.exr\|[^\"]*\.dsh\|[^\"]*\.shd\|[^\"]*\.ptc\|[^\"]*\.optc\|[^\"]*\.bkm\|[^\"]*\.tex\|[^\"]*\.unk' | sort | uniq&lt;br /&gt;else&lt;br /&gt;$RMANTREE/bin/catrib $1 | grep -o -e [^\"]*\.${2} | sort | uniq&lt;br /&gt;fi&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-5229523306680213370?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/5229523306680213370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=5229523306680213370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5229523306680213370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5229523306680213370'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2010/04/handy-shell-alias.html' title='handy shell alias'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-3475119057662351212</id><published>2009-04-01T08:28:00.003+01:00</published><updated>2009-04-01T08:30:59.052+01:00</updated><title type='text'>Shader DSO Global Storage</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;RixStorage* storage = rslContext-&gt;GetGlobalStorage();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is global across all plugins ! So two plugins using the same string key in&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;void* myglobal = storage-&gt;Get( *inArg );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will behave differently to one plugin. I.e. to the second of the two plugins, it will appear that the string was already encountered by this function, when in fact it was not. Use the thread storage in that case, but remember the locking to make it threadsafe has an speed penalty.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-3475119057662351212?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/3475119057662351212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=3475119057662351212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/3475119057662351212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/3475119057662351212'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2009/04/shader-dso-global-storage.html' title='Shader DSO Global Storage'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-1806491239599013640</id><published>2009-01-13T09:24:00.000Z</published><updated>2009-01-13T09:29:32.581Z</updated><title type='text'>ldd for static libraries</title><content type='html'>&lt;code&gt;&lt;br /&gt;objdump -af&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-1806491239599013640?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/1806491239599013640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=1806491239599013640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/1806491239599013640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/1806491239599013640'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2009/01/ldd-for-static-libraries.html' title='ldd for static libraries'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-7246455373231840144</id><published>2008-04-03T08:04:00.005+01:00</published><updated>2010-03-15T08:15:55.208Z</updated><title type='text'>Vector Basics</title><content type='html'>&lt;span style="font-size:180%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_KqsALB4OQ1o/R_SMKIytozI/AAAAAAAAABM/PAHB2eqKZvo/s1600-h/R.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_KqsALB4OQ1o/R_SMKIytozI/AAAAAAAAABM/PAHB2eqKZvo/s320/R.jpg" alt="" id="BLOGGER_PHOTO_ID_5184923176797053746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reflect I about N&lt;br /&gt;&lt;br /&gt;  I - 2*(I.N)*N&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KqsALB4OQ1o/R_SLGYytoxI/AAAAAAAAAA8/uTt6E2P2INE/s1600-h/ProjD.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_KqsALB4OQ1o/R_SLGYytoxI/AAAAAAAAAA8/uTt6E2P2INE/s320/ProjD.jpg" alt="" id="BLOGGER_PHOTO_ID_5184922012860916498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Project d onto the plane that N is normal to&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  d - (N.d) * N&lt;br /&gt;&lt;/span&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-7246455373231840144?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/7246455373231840144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=7246455373231840144' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7246455373231840144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7246455373231840144'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/04/reflect-i-about-n-i-2i.html' title='Vector Basics'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://4.bp.blogspot.com/_KqsALB4OQ1o/R_SMKIytozI/AAAAAAAAABM/PAHB2eqKZvo/s72-c/R.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-7125127897747002078</id><published>2008-03-10T13:53:00.003Z</published><updated>2008-03-10T13:59:06.540Z</updated><title type='text'>help for shake scripters</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);"&gt;This is so cool, I can't beleive I didn't know about it before&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;shake -help |&amp;amp; more&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Previously I only knew that shake -help will output on stderr, not stdout so (under tcsh) I can pipe that to a file using &gt;&amp;amp; (instead of &gt; which pipes stdout to a file ) but then I have to open the file and read it, whereas all I want to do is | more&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;So the | pipe symbol works on stdout and |&amp;amp; is the same but stderr, which is where shake -help outputs to.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-7125127897747002078?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/7125127897747002078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=7125127897747002078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7125127897747002078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7125127897747002078'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/03/help-for-shake-scripters.html' title='help for shake scripters'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-5149849350808823084</id><published>2008-02-20T12:55:00.001Z</published><updated>2008-02-20T12:56:45.144Z</updated><title type='text'>gnu plot tricks</title><content type='html'>in case anyone else needs to, the way to store a variable and use that instead of directly using equations is;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;   plot f(x) = cos(x/180.0*3.141592), f(x)**2 * (3.0 - (2.0 * f(x)) ), f(x)**2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where "f(x)" is the name of the 'variable'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-5149849350808823084?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/5149849350808823084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=5149849350808823084' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5149849350808823084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5149849350808823084'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/02/gnu-plot-tricks.html' title='gnu plot tricks'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-8377833720721908800</id><published>2008-02-14T11:14:00.001Z</published><updated>2008-02-14T11:14:59.194Z</updated><title type='text'>4 digit padding in mel (using python)</title><content type='html'>string $padframe = python( "'%04d' % " + $newFnum );&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-8377833720721908800?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/8377833720721908800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=8377833720721908800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/8377833720721908800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/8377833720721908800'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/02/4-digit-padding-in-mel-using-python.html' title='4 digit padding in mel (using python)'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-5041676981745464743</id><published>2008-02-08T11:46:00.000Z</published><updated>2008-02-08T11:50:01.459Z</updated><title type='text'>symbol table utility</title><content type='html'>&lt;pre&gt;&lt;br /&gt;    &lt;font size="4" color="#000000"&gt;&lt;b&gt;nm -A -C dof.so | grep globalThreadCount&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;This is useful to track the source of an error message related to a mangled sym table name,&lt;br /&gt;eg.&lt;br /&gt;    &lt;font size="4" color="#000000"&gt;&lt;b&gt;D02001 {WARNING} TgPathDLOpen: Bad DSO found: dof.so (undefined symbol: _ZN3Imf17globalThreadCountEv)&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;    &lt;font size="4" color="#000000"&gt;&lt;b&gt;man nm&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;   &lt;br /&gt;will give the manual page&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;font size="4" color="#000000"&gt;&lt;b&gt;ldd mydso.so&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;will list the dependencies a dso has. Which is also useful&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-5041676981745464743?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/5041676981745464743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=5041676981745464743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5041676981745464743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/5041676981745464743'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/02/symbol-table-utility.html' title='symbol table utility'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-7469792213718496155</id><published>2008-01-29T12:25:00.000Z</published><updated>2008-12-11T16:17:35.781Z</updated><title type='text'>Cross Product, Right Hand Rule</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_KqsALB4OQ1o/R58cNVOdxLI/AAAAAAAAAA0/0uGXB4UVN-A/s1600-h/RightHandedRuleCrossProduct.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5160874713351570610" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_KqsALB4OQ1o/R58cNVOdxLI/AAAAAAAAAA0/0uGXB4UVN-A/s320/RightHandedRuleCrossProduct.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;1stFinger  x  2ndFinger = Result&lt;br /&gt;&lt;br /&gt;The order in the equation has to match the spatial order in the picture. 1st Finger comes first when reading equation left to right.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-7469792213718496155?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/7469792213718496155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=7469792213718496155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7469792213718496155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/7469792213718496155'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/01/cross-product-right-hand-rule.html' title='Cross Product, Right Hand Rule'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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://4.bp.blogspot.com/_KqsALB4OQ1o/R58cNVOdxLI/AAAAAAAAAA0/0uGXB4UVN-A/s72-c/RightHandedRuleCrossProduct.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18308600.post-4395826426822790134</id><published>2008-01-17T13:50:00.000Z</published><updated>2008-01-17T13:52:03.394Z</updated><title type='text'>reducing errors</title><content type='html'>Put this in the rib. Sweet!&lt;br /&gt;&lt;br /&gt;&amp;nbsp&amp;nbsp &amp;nbsp &amp;nbsp  &lt;code&gt;&lt;font color="black"&gt;ErrorHandler "printonce"&lt;/font&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-4395826426822790134?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/4395826426822790134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=4395826426822790134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4395826426822790134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/4395826426822790134'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2008/01/reducing-errors.html' title='reducing errors'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-1123416212796874948</id><published>2007-03-05T15:34:00.000Z</published><updated>2007-03-05T15:51:20.359Z</updated><title type='text'>stl in gnu / gcc</title><content type='html'>&lt;span style="font-style: italic;"&gt;Listening to : Werefrogs, "Forest of Doves"&lt;/span&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;So i wanted to use the stl pair and couldn't remember how to include it in ( #include &amp;lt pair &amp;gt didn't compile ) and I found out that in gcc334 pair is deprecated, but still available via #include &amp;lt bits/stl_pair.h &amp;gt&lt;br /&gt;&lt;br&gt;&lt;br /&gt;then use it with the &lt;b&gt;std&lt;/b&gt; namespace as per usual.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The other one that's slightly different is hash_map, which is part of the extension.&lt;br /&gt;Include it like this;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;#include &amp;lt ext/hash_map &amp;gt&lt;br /&gt;&lt;br&gt;&lt;br /&gt;and use it with the &lt;span style="font-weight: bold;font-family:courier new;" &gt;__gnu_cxx&lt;/span&gt; namespace&lt;br /&gt;like this&lt;br /&gt;&lt;br&gt;&lt;br /&gt;__gnu_cxx::hash_map &amp;lt int,double &amp;gt X;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;voila!&lt;br /&gt;&lt;br&gt;&lt;br /&gt;(oh and by the way these should be automatically included by gcc, no need for -I in your makefile or anything)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-1123416212796874948?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/1123416212796874948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=1123416212796874948' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/1123416212796874948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/1123416212796874948'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2007/03/stl-in-gnu-gcc.html' title='stl in gnu / gcc'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-115036848788508773</id><published>2006-06-15T11:45:00.000+01:00</published><updated>2006-06-15T11:48:07.900+01:00</updated><title type='text'>Rib attributes in a Slim Template</title><content type='html'>&lt;span style="font-style: italic; font-weight: bold;"&gt;Listening to : Blue Jam&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Here's the syntax for adding a Rib attribute to your Slim Template, so that it appears as a built in control.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;       collection void RIB {&lt;br /&gt;           state closed&lt;br /&gt;           ribattribute string "shade:transmissionhitmode" {&lt;br /&gt;               label "shadeTransmissionHitMode"&lt;br /&gt;               default "primitive"&lt;br /&gt;               subtype selector&lt;br /&gt;               range { "primitive" "primitive"&lt;br /&gt;                       "shader" "shader"&lt;br /&gt;               }&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-115036848788508773?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/115036848788508773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=115036848788508773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/115036848788508773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/115036848788508773'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2006/06/rib-attributes-in-slim-template.html' title='Rib attributes in a Slim Template'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-114908535611943723</id><published>2006-05-31T15:00:00.000+01:00</published><updated>2006-05-31T15:32:45.556+01:00</updated><title type='text'>Rotation Matrix from Axis Vectors</title><content type='html'>&lt;span style="font-style: italic;"&gt;Listening to : The Decemberists (various)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is an oldie but a goodie, and I haven't posted it anywhere else, so here it is before I forget.&lt;br /&gt;&lt;br /&gt;If you want to make a rotation matrix ( 4x4 ) so that you can make objects orient the same way as, say for example a normal and a tangent on a surface, so long as you have 2 of 3 of the desitnation "axes" then you can build a matrix directly from copying the values of those vectors. (if you do only have two, you get the third from doing a cross product).&lt;br /&gt;&lt;br /&gt;I'm using row major notation here - so anyone who needs this column major, just transpose it.&lt;br /&gt;I'm also assuming that the space of the sought rotation matrix is the same space that the vectors are in. (e.g. world space)&lt;br /&gt;Lastly we're assuming that the normal and tangent and binormal are all normalized.&lt;br /&gt;&lt;br /&gt;So, you have a normal and a tangent in (say) world space and you want a rotation matrix so you can apply the same orientation to other objects. This is the same as making a new coordinate system and transforming them into it without any rotation at all in that new coordinate space.&lt;br /&gt;&lt;br /&gt;It helps to think of normal and tangent, and the 3rd vector called the 'binormal' (which is the cross product of the other two) as the &lt;span style="font-weight: bold;"&gt;axes of a space into which we're transforming&lt;/span&gt;.&lt;br /&gt;It can be any order really, so lets pick :-&lt;br /&gt;Normal = +Y axis&lt;br /&gt;Tangent = +X axis&lt;br /&gt;Binormal = +Z axis&lt;br /&gt;&lt;br /&gt;So we have (for example)&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;+X vector is ( 0.670014, 0.541446, 0.507856 )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;+Y vector is ( -0.609193 0.791979 -0.0406534 )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;+Z vector is ( -0.424223 -0.282144 0.860482 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So our 4x4 matrix will be&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;| Xx Xy Xz 0 |&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;| Yx Yy Yz 0 |&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;| Zx  Zy Zz  0 |&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;| 0    0    0    1 |&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which in our example gives us the following 4x4 rotation matrix !&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;| 0.670014     0.541446      0.507856        0  |&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;| -0.609193    0.791979     -0.0406534     0  |&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;| -0.424223   -0.282144      0.860482        0  |&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;|     0                  0                     0              1   |&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;&lt;span style="font-weight: bold;"&gt;So all that any rotation matrix consists of, is the three axes vectors that define it as a coordinate system.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To rotate a plane by -45 degress about X in MEL, you'd do this&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// -45 degrees in X&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;xform -m 1.0 0.0 0.0 0.0  0 0.707107 -0.707107 0.0  0 0.707107 0.707107 0.0  0.0 0.0 0.0 1.0 pPlane1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where 0.707107 is of course 1/sqrt(2)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-114908535611943723?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/114908535611943723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=114908535611943723' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/114908535611943723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/114908535611943723'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2006/05/rotation-matrix-from-axis-vectors.html' title='Rotation Matrix from Axis Vectors'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-114535358214246897</id><published>2006-04-18T10:43:00.000+01:00</published><updated>2006-04-18T10:46:22.160+01:00</updated><title type='text'>Accented Characters on Linux</title><content type='html'>Alt Gr + ;&lt;br /&gt;e&lt;br /&gt;= é&lt;br /&gt;&lt;br /&gt;Alt Gr + ;&lt;br /&gt;a&lt;br /&gt;= á&lt;br /&gt;&lt;br /&gt;Alt Gr + '&lt;br /&gt;e&lt;br /&gt;= ê&lt;br /&gt;&lt;br /&gt;Alt Gr + '&lt;br /&gt;a&lt;br /&gt;= â&lt;br /&gt;&lt;br /&gt;Alt Gr + #&lt;br /&gt;e&lt;br /&gt;= è&lt;br /&gt;&lt;br /&gt;etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-114535358214246897?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/114535358214246897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=114535358214246897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/114535358214246897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/114535358214246897'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2006/04/accented-characters-on-linux.html' title='Accented Characters on Linux'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-114079399897660152</id><published>2006-02-24T15:04:00.000Z</published><updated>2006-02-24T15:26:01.226Z</updated><title type='text'>Faking depth in a cyc arena</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/1719/1788/1600/fakeCycDepth.1.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/1719/1788/320/fakeCycDepth.1.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;i&gt;Listening To : Prince, Raspberry Beret&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A problem that came up during Flyboys was that we had a tiled arena floor that was 10kms square, but beyond that we had a matte painting 'cyc' aka cylindrically projected onto a bowl shaped geometry with vertical sides.&lt;br /&gt;When rendering a Depth pass or secondary output, when a camera following the action got close to the bowl, then the colour information in the matte tells you there are things far away in the distance, but the depth (as in length(I) ) doesn't. The depth values decrease rapidly as you approach the sides of the cyc.&lt;br /&gt;&lt;br /&gt;Not what we want at all.&lt;br /&gt;&lt;br /&gt;So if its safe to assume the ground continues in a near-planar fashion in all directions out to the horizon, we can do a very simple, quite elegant cheat to work out what the depth would be, if the cyc wasn't there.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;Breifly (see diagram also):&lt;br /&gt;&lt;br /&gt;float  S  = 1;&lt;br /&gt;point  P  =  transform("world", P);&lt;br /&gt;point  E  =  transform("world", E);&lt;br /&gt;vector I  = vtransform("world", I);&lt;br /&gt;&lt;br /&gt;if ( ycomp(I) &lt; 0 )  // I.e. point being shaded is closer to ground than the camera&lt;br /&gt;{&lt;br /&gt; // S is some scale value we need to solve to scale I upto;&lt;br /&gt; //  I' = P'-E&lt;br /&gt; // ycomp(P') we know is always zero&lt;br /&gt; // therefore we can solve the scale for ycomp and use it to scale I (similar triangles)&lt;br /&gt; //  P' = E + I*S;&lt;br /&gt; // so;&lt;br /&gt; //  ycomp(E) + ( ycomp(I) * S ) = 0;&lt;br /&gt;&lt;br /&gt; S = ( -ycomp(E) / ycomp(I) );&lt;br /&gt;&lt;br /&gt; I = vtransform("world", "current", I*S);&lt;br /&gt;&lt;br /&gt; // Voila, our new fake (clamped) depth is;&lt;br /&gt; depth = min( length(I), 65535 );&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; // E.g. plane is upside down, etc.&lt;br /&gt; // Just Set depth to Max ( 65535, which is the largest value our EXR's can store )&lt;br /&gt; depth = 65535;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-114079399897660152?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/114079399897660152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=114079399897660152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/114079399897660152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/114079399897660152'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2006/02/faking-depth-in-cyc-arena.html' title='Faking depth in a cyc arena'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113777598543357637</id><published>2006-01-20T16:46:00.000Z</published><updated>2006-01-20T16:53:05.446Z</updated><title type='text'>occlusion, subset and the minus sign</title><content type='html'>Listening To : 'The Now Show', Radio4.&lt;br /&gt;&lt;br /&gt;I didn't know that you could negate subsets the same way as you can for light categories, but it totally works. You need to assign the group via rib attributes, to the geometry.&lt;br /&gt;e.g.&lt;br /&gt;    &lt;code&gt;Attribute "grouping" "string membership" ["noRflOccl"]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113777598543357637?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113777598543357637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113777598543357637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113777598543357637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113777598543357637'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2006/01/occlusion-subset-and-minus-sign.html' title='occlusion, subset and the minus sign'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113741323862156619</id><published>2006-01-16T12:03:00.000Z</published><updated>2006-01-16T12:07:18.736Z</updated><title type='text'>Current Project Path via MEL</title><content type='html'>&lt;span style="font-style:italic;"&gt;&lt;span style="font-weight:bold;"&gt;Listening To : "Its Art, Dad!", The Clientele&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here's a handy tip. How do you get the current project path from MEL ?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;code&gt;&lt;b&gt;string $ws = `workspace -q -rd`;&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Voila!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113741323862156619?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113741323862156619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113741323862156619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113741323862156619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113741323862156619'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2006/01/current-project-path-via-mel.html' title='Current Project Path via MEL'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113524986590047495</id><published>2005-12-22T11:02:00.000Z</published><updated>2005-12-22T11:11:05.903Z</updated><title type='text'>Under the hood</title><content type='html'>&lt;i&gt;Listening To : 'Sensitive Artist' by King Missile.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;To paraphrase an email from a work colleague..&lt;br /&gt;&lt;br /&gt;Pixel samples have no effect on when and where the shader gets executed.  The shading rate and other dicing settings determine how the geometry is tessellated into micropolygons. Then the shader is executed at each vertex on the micropolygon. The pixel samples then just determine how this pre-shaded micropolygonal geometry is sampled for each pixel. &lt;br /&gt;&lt;br /&gt;Not only do pixel samples have nothing to do with shading, they also have nothing to do with raytracing.  Shooting rays into a cone an angle of 0 will always hit the same spot regardless of samples - the pixar docs appear incorrect about this, based on experimentation. Also, it's not necessary to specify the cone angle at all if using the simpler environment() and trace() routines.  I believe renderman will compute the optimal cone angle automatically based on shading rate and surface derivatives. Although in tests, geometric aliasing still occurred with trace, and only making a coneangle based on the change in incident angle across a micropolygon with gather seemed to remove it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113524986590047495?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113524986590047495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113524986590047495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113524986590047495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113524986590047495'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/12/under-hood.html' title='Under the hood'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113464630676261786</id><published>2005-12-15T11:23:00.000Z</published><updated>2005-12-22T11:12:51.410Z</updated><title type='text'>Watch those param orderings!</title><content type='html'>&lt;i&gt;Listening To : Shooby Taylor, the human horn.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Refract and Faceforward have I and N paramaters specified in different orders! How many times has that caught me out ?!?!?&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;b&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp vector refract( vector I, N; float eta )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp vector faceforward( vector N, I )&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Also clamp and mix/smoothstep have different orderings.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;b&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp type clamp( type a, min, max )&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;vs&lt;br /&gt;&lt;code&gt;&lt;b&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp type mix( type x, y; float alpha )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp type smoothstep( type min, max, value )&lt;br /&gt;&lt;/b&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113464630676261786?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113464630676261786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113464630676261786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113464630676261786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113464630676261786'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/12/watch-those-param-orderings.html' title='Watch those param orderings!'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113112607609324769</id><published>2005-11-05T01:43:00.000Z</published><updated>2005-11-04T17:43:47.656Z</updated><title type='text'>MEL message attributes</title><content type='html'>&lt;span style="font-style:italic;"&gt;Listening To : Bill Bailey , Jimmy Cliff&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;MEL today. &lt;br /&gt;Just found out about message attributes and connecting things together.&lt;br /&gt;connectAttr and listConnections. Neato.&lt;br /&gt;&lt;br /&gt;Also, thought for today is that in Games, the artists always seem obsessed with the characters animation, run cycles etc. and don't really care about lights or cameras too much. In post, lights and cameras are so much more important (duh). Yeah, well, not a fabulous insight - but was just thinking about the differences earlier today.&lt;br /&gt;&lt;br /&gt;DNeg Free beer and pizza tonight, and my contracts just been renewed. Yippee!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113112607609324769?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113112607609324769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113112607609324769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113112607609324769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113112607609324769'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/11/mel-message-attributes.html' title='MEL message attributes'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113092483769469087</id><published>2005-11-02T17:46:00.000Z</published><updated>2005-11-02T09:47:17.723Z</updated><title type='text'>the grids</title><content type='html'>&lt;span style="font-style:italic;"&gt;Listening to: Nothing, i've lost my iPod charger cable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So to wrap up my previous post about the mysterious grid lines..&lt;br /&gt;&lt;br /&gt;It turns out that in multiplying my derivatives used in the texture map lookup in order to blur the map, the usually unnoticeable discontinuities in derivatives around the shading grid boundaries had been magnified (by the multiplication).&lt;br /&gt;&lt;br /&gt;I was doing this:-&lt;br /&gt;&lt;br /&gt;duds * 25 = ...&lt;br /&gt;dvds * 25 = 0.03 // for arguments sake, it's there or thereabouts&lt;br /&gt;dudt * 25 = ...  // similar order of result for the others&lt;br /&gt;dvdt * 25 = ...&lt;br /&gt;&lt;br /&gt;but sometimes the derivatives were very different around shading grid boundaries, so the tiny aliasing that is normally unnoticed, was being amplified and appeared as a grid.&lt;br /&gt;&lt;br /&gt;The solution was to &lt;span style="font-weight:bold;"&gt;add&lt;/span&gt; a number to the derivatives to get roughly the 0.03 I wanted (so not 25, something much smaller instead). That way the aliasing would stay small, but I would still get the blurring I wanted.&lt;br /&gt;&lt;br /&gt;So that's that.&lt;br /&gt;Hurray!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113092483769469087?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113092483769469087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113092483769469087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113092483769469087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113092483769469087'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/11/grids.html' title='the grids'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113084223073657515</id><published>2005-11-01T10:28:00.000Z</published><updated>2005-11-01T10:50:30.743Z</updated><title type='text'>brickmaps, pointclouds.</title><content type='html'>&lt;span style="font-style:italic;"&gt;Listening to : Fiery Furnaces 'EP' and The Crimea's new CD 'Tragedy Rocks'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So it looks like the best thing to do for my st bake is to have "interpolate" set to 1 in bake3d to get micropolygon midpoints (from four sample points) instead of absolute points and also to avoid duplicate points being written out at the boundaries. Then, in texture3d, use "lerp" set to 1 so that it looks up from the two nearest mip levels and interpolates between them.&lt;br /&gt;&lt;br /&gt;Curiously, I found that baking at 1200x1200 shading rate 1 gave one quarter of the points (2million instead of 8million) and was 80Mb instead of 345Mb, but had much much better results and a more consistent point cloud compared with previously at PAL res, same shading rate, when it had been patchy.. &lt;br /&gt;Maybe this was due to adding interpolate==1 as mentioned above ?? If so; way-hey! Interpolate is cooool!&lt;br /&gt;&lt;br /&gt;(Note to the newbies - generally to increase point cloud density you lower the shading rate and/or increase the render res, which is what made this result so odd).&lt;br /&gt;&lt;br /&gt;In the beauty render, I was seeing dark grid lines aligned with what looked like the shading grid. At first I guessed somewhere I made the classic misktake of doing texture lookups or area functions inside a branch instruction that uses a varying variable instead of a uniform one. This is such a common mistake when you're used to writing real-time code with efficiency in mind. However, after fixing these in the shader, it's still there, so it is probably something else..&lt;br /&gt;&lt;br /&gt;Other problems I have at the moment are;&lt;br /&gt;- the baked average ray direction looks grossly incorrect. Not really a problem but would be nice to get to the bottom of the cause.&lt;br /&gt;- i'm getting some squares flickering.&lt;br /&gt;- I still don't know why my brickmap is okay down to level 7, but has mostly black beyond that. It means I have to set maxdepth to 7 before I render the beauty pass... kind of a pain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113084223073657515?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113084223073657515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113084223073657515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113084223073657515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113084223073657515'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/11/brickmaps-pointclouds.html' title='brickmaps, pointclouds.'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113042270597561101</id><published>2005-10-27T23:05:00.000+01:00</published><updated>2005-11-03T17:35:30.320Z</updated><title type='text'>Cheap global illumination</title><content type='html'>&lt;span style="font-style:italic;"&gt;Listening to: Gustavo Santaolalla "Motorcycle Diaries", and MYLO "Destroy Rock N Roll"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So I had this problem, how do you do efficient diffuse lightspill (sometimes referred to as global illumination) when the light source is an area light that's playing an image sequence that updates every frame.&lt;br /&gt;&lt;br /&gt;Baking illuminance or using 'indirectdiffuse' in a lightshader might seem like the way to go, except they are both really slow. What I need is a solution that will be quick to render when it comes to the beauty pass. It doesn't matter so much if the setup is slow (in the same ballpark as occlusion is slow anyway).&lt;br /&gt;&lt;br /&gt;So I settled on a shader that shoots rays from geometry in the scene towards the image sequence light source, and averages the texture coordinates that get hit, then bakes this to a pointcloud (along with a scalar ratio of hits to misses and an average direction vector). This way, so long as the scene is static, we can bake the spatial relationship of geometry wrt the light source and then use these baked texture coordinates as a texture lookup that's cheap to do. We can change our image sequence each frame, and the texture coordinate lookup is still valid.&lt;br /&gt;&lt;br /&gt;They are a bit like shadowmaps though, you need one per light source, and if the scene is non-static, then you need to bake once per frame that's got geometry in a new position. But for a static scene, they are a winner because they are view independent.&lt;br /&gt;&lt;br /&gt;So why didn't they work at first when I used the bake3d and texture3d calls?&lt;br /&gt;&lt;br /&gt;Well, if you have a cloud of points, then you need to know what space they are stored in and what space is used in the retrieval. &lt;br /&gt;&lt;br /&gt;So the answer, and the tip for today, is that bake3d and texture3d by default will transform P and N that you give it into world space before doing the lookup. That means you don't usually have to care about what space the P and N are in that you pass to it. (Not counting Pref etc, of course. But my scene doesn't have any deformations, so no problem).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113042270597561101?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113042270597561101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113042270597561101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113042270597561101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113042270597561101'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/10/cheap-global-illumination.html' title='Cheap global illumination'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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-18308600.post-113032039701800246</id><published>2005-10-26T10:49:00.000+01:00</published><updated>2005-10-26T10:53:17.023+01:00</updated><title type='text'>First post!</title><content type='html'>Listening to : CD of Mighty Boosh radio show.&lt;br /&gt;&lt;br /&gt;Wow, first post! I guess I wanted to set this blog up ages ago. In fact, back in 2003 when I first started using renderman in film vfx for my living, I wanted to keep a log of all the things I had to learn to re-train from being a 3D Programmer in the games industry. That opportunity to chronicle the initial learning curve involved has probably passed, rats, but hey-ho I can still post things as I learn them....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18308600-113032039701800246?l=renderdan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://renderdan.blogspot.com/feeds/113032039701800246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18308600&amp;postID=113032039701800246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113032039701800246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18308600/posts/default/113032039701800246'/><link rel='alternate' type='text/html' href='http://renderdan.blogspot.com/2005/10/first-post.html' title='First post!'/><author><name>renderdan</name><uri>http://www.blogger.com/profile/06796680968068262459</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></feed>
