<?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-4037954350464998026</id><updated>2012-01-30T06:05:12.367-08:00</updated><title type='text'>Julian Johnson's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-1776124538736466356</id><published>2012-01-30T01:46:00.000-08:00</published><updated>2012-01-30T01:50:59.723-08:00</updated><title type='text'>ICE Modeled Camera Grid</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-of0VKT-R6rk/TyZmrZ-qouI/AAAAAAAAAM8/TkbwVuKwdbM/s1600/camplane.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="265" src="http://4.bp.blogspot.com/-of0VKT-R6rk/TyZmrZ-qouI/AAAAAAAAAM8/TkbwVuKwdbM/s400/camplane.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&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;I was way too slow to post this compound to the XSI Mailing list in response to a thread on the creation of a camera plane but here it is anyway! It dynamically creates an ICE modeled grid and places it inside the camera frustum at a specified distance from the camera. At the same time it creates an ICE-based texture projection. Sample scene and compound is &lt;a href="http://www.exch.demon.co.uk/xsi/files/camproj.rar"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-1776124538736466356?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/1776124538736466356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2012/01/ice-modeled-camera-grid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/1776124538736466356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/1776124538736466356'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2012/01/ice-modeled-camera-grid.html' title='ICE Modeled Camera Grid'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/-of0VKT-R6rk/TyZmrZ-qouI/AAAAAAAAAM8/TkbwVuKwdbM/s72-c/camplane.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-6158009016234064675</id><published>2012-01-30T01:36:00.000-08:00</published><updated>2012-01-30T02:32:28.307-08:00</updated><title type='text'>Filtering Arrays</title><content type='html'>Stephen Blair has been posting some great articles on the &lt;a href="http://xsisupport.wordpress.com/"&gt;eX-SI Support Blog&lt;/a&gt; about how to create array patterns i.e ordered sequences like (0,1,2,3,0,1,2,3) or (0,0,0,1,1,1,2,2,2). The creation of this type of sequence can be useful in creating&amp;nbsp; the points of a grid and also for avoiding the use of repeat loops in certain circumstances.&lt;br /&gt;&lt;br /&gt;On the XSI mailing list a few weeks back Dan Yargici posted a &lt;a href="http://groups.google.com/group/xsi_list/msg/6c8d91c1ee15ef55"&gt;question&lt;/a&gt; about how to reconfigure a simple non-regular pattern like (1,1,5,5,5,5,8,9,9,9,10,10) into (1,1,2,2,2,3,4,4,4,5,5). In the resultant thread Martin Chatterjee came back with a brilliant solution without using repeats. Martin's solution touched on some of the inherent functionality in ICE arrays that's worth expanding upon.&lt;br /&gt;&lt;br /&gt;I'm going to try and illustrate some of these with a sample scene that contains an ICE tree that shows several different methods for firstly creating a pattern array and then using that pattern to manipulate an array. If that all sounds abstract it's based on Dan's problem above but with the added wrinkle that the initial pattern is not numerically ascending i.e. it looks something like this: (8,8,2,2,2,14,3,3,1,16,11,11).&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;The first task is to identify the points at which the pattern changes e.g. when the preceding item in the array is &lt;span style="font-family: inherit;"&gt;not the same as the current one. There are a couple of ways of doing this illustrated in the scene, but it's the first method that illustrates our first point.You can create an identical array and use the&lt;span style="color: #bf9000;"&gt; insert in array &lt;/span&gt;node to ad&lt;/span&gt;d zero at index zero. Although the arrays are now of different lengths you can subtract the two arrays. Wherever the resultant value is non-zero you can mark the array with a boolean. So, here's the first key point about ICE arrays:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;ICE arrays do not have to be the same size for operations (e.g. subtraction)&lt;/i&gt; &lt;/li&gt;&lt;/ul&gt;The subtraction calculation will proceed until one of the arrays runs out and the resultant array will be truncated to that length. It seems like an esoteric point in the documentation, but it's genuinely useful.&lt;br /&gt;&lt;br /&gt;You should now have an array consisting of (1,0,1,0,0,1,1,0,1,1,1,0) i.e a series of boolean values. Each 1 represents the starting point of a new digit in the pattern. In this form it's not much use but if you convert the booleans to integers and then multiply by the subindex array you get a list of indices in the original array where the pattern changes - the actual constituent numbers of the pattern. Multiplying subindices by a boolean (converted to integer) is a neat way of isolating the array indices you're interested in.In this case we get (0,0,2,0,0,5,6,0,8,9,10,0).&lt;br /&gt;&lt;br /&gt;It's still not entirely usable, though, since it also contains a lot of zero entries. If we were to run this new list through a &lt;span style="color: #bf9000;"&gt;select in array&lt;/span&gt; node we would be picking the zero index entry multiple times. Which brings us to our second point:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;&amp;nbsp;If you feed an index array into the index port of &lt;span style="color: #bf9000;"&gt;select in array&lt;/span&gt; or &lt;span style="color: #bf9000;"&gt;remove from array&lt;/span&gt; you get an equally sized** array as your output*. This output array can contain multiple duplicates of an index if you require it. &lt;/i&gt;&lt;i&gt;(* The values output of &lt;span style="color: #bf9000;"&gt;remove from array&lt;/span&gt;). &lt;/i&gt;&lt;i&gt;(**Provided all the input indices are valid - more on this below.)&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;What this means is that if you feed (0,0,0,0,0) into the index port of &lt;span style="color: #bf9000;"&gt;select in array&lt;/span&gt; you will get back an equally sized array with each index of the new array containing the value of index zero from the old array.&lt;br /&gt;&lt;br /&gt;We need to either remove the zero entries or,  at least, filter them out in such a way that ICE does not action them. Here's where, I guess, the main trick of this article lies:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;i&gt;ICE has been optimised to ignore invalid index entries for arrays&lt;/i&gt;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;By 'invalid index', I mean any entry for an array index that is either negative or exceeds the array size minus one.  There are three key nodes where this is relevant: &lt;span style="color: #bf9000;"&gt;remove from array&lt;/span&gt;, &lt;span style="color: #bf9000;"&gt;select in array&lt;/span&gt; and &lt;span style="color: #bf9000;"&gt;set in array&lt;/span&gt;. If for example, you feed a remove from array node the indices (-1,-5, 99, 0,1,2,3) and your array size is 10 then only the valid indices will be removed (0,1,2,3). In conventional scripting/programming you would never normally use an invalid index value without risking a serious crash. In ICE there's no need for any repeat loops or detours in the data flow to remove them.&lt;br /&gt;&lt;br /&gt;So, in our case, with an array like (0,0,2,0,0,5,6,0,8,9,10,0) where all we're interested in are the non-zero entries we just need to make the zeros into invalid indices (negatives or values that exceed the array size minus one i.e. (-1,-1,2,-1,-1,5,6,-1,8,9,10,-1). This new array can be fed into a select in array node and will only select the following indices (2,5,6,8,9,10). Effectively, you've filtered the array without a repeat loop.The sample scene shows a couple of different ways of doing this.&lt;br /&gt;&lt;br /&gt;The final point to make is that two of the array nodes - insert in array and set in array - can each take two array inputs. One for the indices to be affected and one for the values to be utilised at those indices. As above, those arrays can be different lengths - the processing will truncate the length of the longest array to the shortest. What's more, any invalid indices will be ignored and thus any parallel value (ie. one at the same index) in the value array will&amp;nbsp; also be ignored.&lt;br /&gt;&lt;br /&gt;It's dry and it's boring but being aware of these kinds of optimisations and behaviours of the ICE array nodes can be very useful as, I think, Martin's solution demonstrated.&lt;br /&gt;&lt;br /&gt;Sample scene is &lt;a href="http://www.exch.demon.co.uk/xsi/files/sort_pattern.rar"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-6158009016234064675?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/6158009016234064675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2012/01/filtering-arrays.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6158009016234064675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6158009016234064675'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2012/01/filtering-arrays.html' title='Filtering Arrays'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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-4037954350464998026.post-6305085988739233609</id><published>2010-07-25T07:30:00.000-07:00</published><updated>2010-07-31T01:30:16.691-07:00</updated><title type='text'>Dart Throwing with Weight Maps</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_elKLql_26B8/TExXEbgWgWI/AAAAAAAAADU/pGJdDWdC3P4/s1600/dt2.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 287px;" src="http://2.bp.blogspot.com/_elKLql_26B8/TExXEbgWgWI/AAAAAAAAADU/pGJdDWdC3P4/s400/dt2.gif" alt="" id="BLOGGER_PHOTO_ID_5497864978727076194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I've just finished a new version of Dart Throwing with weight map control for  spacing (spacing maps) and point deletion (erase maps). It uses it's own internal scheme  for computing the barycentric weights from weight map values at  vertices. Spacing maps allow you to modulate the density of the points  using the weight map as an interpolant between the spacing radius and  max spacing radius. Erase maps have a threshold parameter which lets you  control at what point between 0 and 1 on the weight map the point  should be deleted.&lt;br /&gt;&lt;br /&gt;There's also a new 'Iteration Abort' parameter which specifies the number of tries (as a normalised percentage of the total iterations) the plugin should make before it aborts. This is for scenarios where you set a huge number of iterations but the number of successful darts becomes very low i.e. if you set 1,000,000 iterations and you only get an additional 1 dart added in the last 500,000 'tries' then you can see that aborting after 500,000 might be handy. The message window gets logged with the maximum number of iterations for a single try as a reference.&lt;br /&gt;&lt;br /&gt;Changes in the way multiphase/element generator plugins work in the SDK mean that this version is only available for the very latest version of Autodesk Softimage - 2011 SP1. The Addon has been compiled for both 32 and 64bit Windows.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/dart_throw_v002.rar"&gt;Download Dart Throw v002 Addon&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A Vimeo clip is &lt;a href="http://vimeo.com/13620647"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-6305085988739233609?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/6305085988739233609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2010/07/dart-throwing-with-weight-maps.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6305085988739233609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6305085988739233609'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2010/07/dart-throwing-with-weight-maps.html' title='Dart Throwing with Weight Maps'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/TExXEbgWgWI/AAAAAAAAADU/pGJdDWdC3P4/s72-c/dt2.gif' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-2316000659914389239</id><published>2010-07-17T02:55:00.000-07:00</published><updated>2010-07-18T03:12:21.569-07:00</updated><title type='text'>Context Switching Using Set Nodes and Filter</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_elKLql_26B8/TELOhFpokoI/AAAAAAAAADM/ZtTaTHHEkQ8/s1600/set_filter.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 238px;" src="http://1.bp.blogspot.com/_elKLql_26B8/TELOhFpokoI/AAAAAAAAADM/ZtTaTHHEkQ8/s400/set_filter.gif" alt="" id="BLOGGER_PHOTO_ID_5495181563193234050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the roll object compound below I use the Set nodes to move between point context and object context. Combined with filter, it's a powerful way to access an individual component in a specific context and make it available to all other components in that context.&lt;br /&gt;&lt;br /&gt;On the list &lt;a href="http://groups.google.co.uk/group/xsi_list/browse_thread/thread/fc1a84f1bd9d8486?hl=en#"&gt;here&lt;/a&gt; (and on several occasions before), &lt;a href="http://blog.blackredking.org/"&gt;Ciaran Moloney&lt;/a&gt; has suggested a technique for using Set nodes, Filter and the Repeat node for gathering data in one context and turning it into an object context array.  It's a great technique and one which deserves a closer look.&lt;br /&gt;&lt;br /&gt;Whenever you use a specific context node e.g. point, node, polygon in the branch of an ICE Tree its context takes precedence over any object context nodes in the same branch. As soon as you try and set any data in that branch it will always be in the more granular context. Using the Get Set xx nodes, however, acts as a switch to the context of the branch and turns it back into object context.  Put simply if you start off in 'polygon position' context you can finish the branch with a Get xx in Set node which provides you with a single piece of object context data e.g. maximum in set.&lt;br /&gt;&lt;br /&gt;Ciaran's trick involves using this switching ability to continually iterate over each point, polygon or node and isolate a single item each time - pushing that item onto an object context array.&lt;br /&gt;&lt;br /&gt;In the tree above I construct an object context array of all the node positions. You can see that the tree starts in node context but then each node has a repeat loop iterating over itself matching it's own element index with the list of all node element indexes. When it finds a match the output is a single node&lt;span style="font-style: italic;"&gt; still in node context&lt;/span&gt;. Pumping this into Get Maximum in Set - a filtered set of one - simply switches the output to object context and the node position gets pushed onto an object context array.&lt;br /&gt;&lt;br /&gt;The downside is obviously iteration time as each node has to iterate NbNodes times over itself and with large numbers of nodes, polygons etc. this could be slow. However, it seems like the only surefire way to construct robust object context arrays of node positions, polygon positions etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-2316000659914389239?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/2316000659914389239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2010/07/context-switching-using-set-nodes-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/2316000659914389239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/2316000659914389239'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2010/07/context-switching-using-set-nodes-and.html' title='Context Switching Using Set Nodes and Filter'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/TELOhFpokoI/AAAAAAAAADM/ZtTaTHHEkQ8/s72-c/set_filter.gif' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-6628909888312001292</id><published>2010-07-16T23:25:00.000-07:00</published><updated>2010-07-17T02:19:02.593-07:00</updated><title type='text'>Even Spacing on Curve/Normalised U on Curve</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_elKLql_26B8/TEFYjBeWlhI/AAAAAAAAADE/heVQMfajAbE/s1600/even.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 299px;" src="http://2.bp.blogspot.com/_elKLql_26B8/TEFYjBeWlhI/AAAAAAAAADE/heVQMfajAbE/s400/even.gif" alt="" id="BLOGGER_PHOTO_ID_5494770379083126290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Following on from a post by Brad Gabe on the mailing list it looked like the existing normalised u compounds on The Area didn't seem to take an array of u values as an input so I decided to revisit Even Spacing on Curve and reformulate so that the user could input an array of (or a single) normalised U value. In the process, I fixed some bugs and hopefully cleaned up the trees a bit.  The resulting two compounds are here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/Evenly%20Spaced%20Curve%20Positions.2.0.rar"&gt;http://www.exch.demon.co.uk/xsi/files/Evenly%20Spaced%20Curve%20Positions.2.0.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/Normalised%20U%20to%20Curve%20Position.rar"&gt;http://www.exch.demon.co.uk/xsi/files/Normalised%20U%20to%20Curve%20Position.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For even spacing points on a curve, Helge's Strand Tools provide a much better solution. I don't think there's another compound that accepts an array of normalised U values so the second compound may be useful.&lt;br /&gt;&lt;br /&gt;Let me know if you find any errors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-6628909888312001292?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/6628909888312001292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2010/07/even-spacing-on-curvenormalised-u-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6628909888312001292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6628909888312001292'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2010/07/even-spacing-on-curvenormalised-u-on.html' title='Even Spacing on Curve/Normalised U on Curve'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/TEFYjBeWlhI/AAAAAAAAADE/heVQMfajAbE/s72-c/even.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-3756456962129020944</id><published>2009-09-28T06:07:00.000-07:00</published><updated>2009-09-28T06:14:30.081-07:00</updated><title type='text'>Meshless Deformations in ICE</title><content type='html'>I've just posted a preview of an implementation of meshless deformations in ICE. The system deforms a polygonal mesh using particles and shape matching. It seems like a  fairly efficient way of generating various types of soft body deformations whilst preserving the volume of the original mesh.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vimeo.com/6794261"&gt;http://www.vimeo.com/6794261&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'd love to release the compound soon but the whole area of collision and soft-body/soft-body collision is huge and is definitely going to take some time to implement before it's user friendly!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-3756456962129020944?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/3756456962129020944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/09/meshless-deformations-in-ice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/3756456962129020944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/3756456962129020944'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/09/meshless-deformations-in-ice.html' title='Meshless Deformations in ICE'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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-4037954350464998026.post-5213418482163572025</id><published>2009-09-26T06:20:00.000-07:00</published><updated>2009-09-26T08:57:49.222-07:00</updated><title type='text'>Dart Throw Update</title><content type='html'>I've updated the Dart Throw ICE node to version 0.9b. The new version utilises the new port dirty state features in the SDK to prevent the compound firing when you make changes in the overall tree. I've also added a cancel button and re-wired the evaluation cycle. All in all, this version is more stable and usable. Big thanks to &lt;a href="http://warpedspace.org/"&gt;Amaan Akram&lt;/a&gt;  for help and advice with the code.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/dart_throw_0.9b.rar"&gt;http://www.exch.demon.co.uk/xsi/files/dart_throw_0.9b.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please note that due to limitations in the SDK when you cancel an evaluation in progress, the values in the PPG cannot be reset to their original values. CTRL-Z will restore those values.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_elKLql_26B8/Sr41XbyvC1I/AAAAAAAAAC8/WSr4KrCyaKc/s1600-h/dthrow.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 298px;" src="http://1.bp.blogspot.com/_elKLql_26B8/Sr41XbyvC1I/AAAAAAAAAC8/WSr4KrCyaKc/s400/dthrow.jpg" alt="" id="BLOGGER_PHOTO_ID_5385800881095510866" 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/4037954350464998026-5213418482163572025?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/5213418482163572025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/09/dart-throw-update.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/5213418482163572025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/5213418482163572025'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/09/dart-throw-update.html' title='Dart Throw Update'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/Sr41XbyvC1I/AAAAAAAAAC8/WSr4KrCyaKc/s72-c/dthrow.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-5689280133688806508</id><published>2009-09-08T06:54:00.000-07:00</published><updated>2009-10-01T13:43:19.346-07:00</updated><title type='text'>Dart Throw Custom ICE Node for Softimage 2010</title><content type='html'>I've just finished off a custom ICE node in C++ utilising the new geometry features in the 2010 SDK. The node will let you position random, non-overlapping points on any polygonal geometry. The more iterations you use, the more 'packed' the distribution will be.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vimeo.com/6483842"&gt;&lt;/a&gt;&lt;a href="http://www.vimeo.com/6483842"&gt;http://www.vimeo.com/6483842&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The nodes are packaged in a RAR file as an Addon with a sample scene here:&lt;br /&gt;&lt;br /&gt;0.9b (Latest version)&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/dart_throw_0.9b.rar"&gt;http://www.exch.demon.co.uk/xsi/files/dart_throw_0.9b.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;0.8b&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/dart_throw_0.8b.rar"&gt;http://www.exch.demon.co.uk/xsi/files/dart_throw_0.8b.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's a beta release a the moment, so please let me know if you have any problems/suggestions. Since it uses features only available in Softimage 2010, it won't work in earlier versions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-5689280133688806508?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/5689280133688806508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/09/dart-throw-custom-ice-node-for.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/5689280133688806508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/5689280133688806508'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/09/dart-throw-custom-ice-node-for.html' title='Dart Throw Custom ICE Node for Softimage 2010'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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-4037954350464998026.post-8264986050909947556</id><published>2009-05-19T04:15:00.000-07:00</published><updated>2009-05-19T04:38:38.063-07:00</updated><title type='text'>Roll Object Compound and Sample Scene</title><content type='html'>I've just finished cleaning up and, hopefully, optimising the roll object compound. The new compound removes expensive geometry queries in favour of filter and min/max in set. I think it's quicker on larger datasets although the downside is I've had to use more nodes!&lt;br /&gt;&lt;br /&gt;The lowest point in Y on the object at simulation start becomes the virtual floor. There are many other ways to do this but it seems like a sensible way to keep the compound fairly general. If you want other objects to contact the same floor then their lowest point in Y also needs to be at floor level.&lt;br /&gt;&lt;br /&gt;The Distance to Angle Ratio parameter controls the ratio of angular change to the distance the driving object travels each frame - higher values rotate the object more, lower values slow down the rotation.&lt;br /&gt;&lt;br /&gt;Let me know if you have any suggestions, improvements or performance tweaks or if you find any bugs.&lt;br /&gt;&lt;br /&gt;Scene: &lt;a href="http://www.exch.demon.co.uk/xsi/files/roll_object_scene_v001.rar"&gt;http://www.exch.demon.co.uk/xsi/files/roll_object_scene_v001.rar&lt;/a&gt;&lt;br /&gt;Compound: &lt;a href="http://www.exch.demon.co.uk/xsi/files/roll_object_compound_v001.rar"&gt;http://www.exch.demon.co.uk/xsi/files/roll_object_compound_v001.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks to Helge and Martin Chatterjee for their resources on similar operators:&lt;br /&gt;&lt;a href="http://www.xsi-blog.com/archives/94"&gt;Helge's Roll Tutorial&lt;/a&gt;&lt;br /&gt;&lt;a href="http://groups.google.co.uk/group/xsi_list/browse_thread/thread/5fe5b283793853cd/ec1a228048e1ea35?hl=en&amp;amp;lnk=gst&amp;amp;q=rolling+ball#ec1a228048e1ea35"&gt;Martin's BallRoll SCOP&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-8264986050909947556?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/8264986050909947556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/05/roll-object-compound-and-sample-scene.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/8264986050909947556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/8264986050909947556'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/05/roll-object-compound-and-sample-scene.html' title='Roll Object Compound and Sample Scene'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-6344031362811239374</id><published>2009-05-14T12:23:00.001-07:00</published><updated>2009-05-15T05:56:06.860-07:00</updated><title type='text'>Rolling Cube Rig in ICE</title><content type='html'>Just implemented a rolling cube rig in ICE. The video is here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/4647214"&gt;http://vimeo.com/4647214&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's a deformer rather than a kinematics operator. It also handles irregular shaped objects as this video shows:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vimeo.com/4662525"&gt;http://www.vimeo.com/4662525&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-6344031362811239374?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/6344031362811239374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/05/rolling-cube-rig-in-ice.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6344031362811239374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6344031362811239374'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/05/rolling-cube-rig-in-ice.html' title='Rolling Cube Rig in ICE'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-1763190221252522037</id><published>2009-03-13T10:01:00.001-07:00</published><updated>2009-03-13T10:03:32.822-07:00</updated><title type='text'>Constrain Null To ICE Particle's Transform</title><content type='html'>This script constrains a null's position and rotation to an ICE particle via a SCOP. Tag some points in your point cloud, run the script and each tagged point will now be followed by a Null. Get's very slow  however with multiple Nulls on a cloud.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/ice_track_particle_v1.0.3.rar"&gt;ice_track_particle_v1.0.3.rar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-1763190221252522037?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/1763190221252522037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/constrain-null-to-ice-particles.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/1763190221252522037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/1763190221252522037'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/constrain-null-to-ice-particles.html' title='Constrain Null To ICE Particle&apos;s Transform'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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-4037954350464998026.post-2695715361301267295</id><published>2009-03-13T09:58:00.000-07:00</published><updated>2009-03-13T10:00:25.731-07:00</updated><title type='text'>Plot ICE Particles To Curves</title><content type='html'>This script plots tagged ICE particles to curves. For each point cloud it creates a null at the scene root and places the curves under that null. To use, just tag points and run the script. A dialogue will let you select the frame range and step size.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/ice_particle_plot_v1.0.0.rar"&gt;ice_particle_plot_v1.0.0.rar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-2695715361301267295?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/2695715361301267295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/plot-ice-particles-to-curves.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/2695715361301267295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/2695715361301267295'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/plot-ice-particles-to-curves.html' title='Plot ICE Particles To Curves'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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-4037954350464998026.post-4235578767309084336</id><published>2009-03-05T09:06:00.000-08:00</published><updated>2009-03-08T03:22:07.490-07:00</updated><title type='text'>Neighbour Points Plus 1.6</title><content type='html'>Neighbour Points Plus 1.6 expands on the PointNeighbors attribute that's native to ICE by letting you select 'n' levels of neighbouring points. You can select the number of levels you want, filter the results and/or exclude the original points.&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/nbplus1.5.rar"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/nb_points_plus_1.6.rar"&gt;Neighbour Points Plus 1.6&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Big thanks to Todd Akita for cleaning up the code and resolving an issue with duplicate locations.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_elKLql_26B8/SbAHOIiRYAI/AAAAAAAAAC0/TmJfqjwHT-M/s1600-h/neighbour_points_plus_m55.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 345px;" src="http://4.bp.blogspot.com/_elKLql_26B8/SbAHOIiRYAI/AAAAAAAAAC0/TmJfqjwHT-M/s400/neighbour_points_plus_m55.jpg" alt="" id="BLOGGER_PHOTO_ID_5309751900060606466" 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/4037954350464998026-4235578767309084336?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/4235578767309084336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/neighbour-points-plus-13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/4235578767309084336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/4235578767309084336'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/neighbour-points-plus-13.html' title='Neighbour Points Plus 1.6'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/SbAHOIiRYAI/AAAAAAAAAC0/TmJfqjwHT-M/s72-c/neighbour_points_plus_m55.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-6599932097297443161</id><published>2009-03-05T08:37:00.000-08:00</published><updated>2009-03-26T09:10:20.145-07:00</updated><title type='text'>Deduplicate Array 1.2</title><content type='html'>This compound takes an array as input and removes any duplicates. It's broken out from my Point Neighbours Plus compound as it has some utility in its own right. Works fine with integer, scalar, location and vector arrays. Deduped elements don't have to be sequential - the compound removes any duplicate it finds.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exch.demon.co.uk/xsi/files/Deduplicate%20Array.1.2.rar"&gt;Deduplicate Array 1.2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_elKLql_26B8/SbABe7jXMhI/AAAAAAAAACs/hp4vEbE-SbM/s1600-h/scope_10.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 289px;" src="http://1.bp.blogspot.com/_elKLql_26B8/SbABe7jXMhI/AAAAAAAAACs/hp4vEbE-SbM/s400/scope_10.gif" alt="" id="BLOGGER_PHOTO_ID_5309745591563530770" 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/4037954350464998026-6599932097297443161?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/6599932097297443161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/deduplicate-array-11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6599932097297443161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6599932097297443161'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/deduplicate-array-11.html' title='Deduplicate Array 1.2'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/SbABe7jXMhI/AAAAAAAAACs/hp4vEbE-SbM/s72-c/scope_10.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-5678093697412990921</id><published>2009-03-05T06:42:00.001-08:00</published><updated>2009-03-05T06:51:04.533-08:00</updated><title type='text'>Index to Location</title><content type='html'>Building on the previous posts, it's easy to see how you can implement functionality in ICE that isn't there natively. One example is the limitation of the ID to Location node - it only works for particle IDs and not geometry indices.&lt;br /&gt;&lt;br /&gt;The tree below constructs  &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;context arrays of point locations and their indices. From then on, whatever context you're in you have access to these arrays and can query the location of any other index on the mesh. The only slight twist is that you need to use 'Find in Array' as lists of locations can't be conventionally sorted.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_elKLql_26B8/Sa_lomtYgKI/AAAAAAAAACk/rXBMY2LfAZg/s1600-h/scope_09.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 240px;" src="http://4.bp.blogspot.com/_elKLql_26B8/Sa_lomtYgKI/AAAAAAAAACk/rXBMY2LfAZg/s400/scope_09.gif" alt="" id="BLOGGER_PHOTO_ID_5309714971441528994" 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/4037954350464998026-5678093697412990921?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/5678093697412990921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/index-to-location.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/5678093697412990921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/5678093697412990921'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/index-to-location.html' title='Index to Location'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/Sa_lomtYgKI/AAAAAAAAACk/rXBMY2LfAZg/s72-c/scope_09.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-4352930361801041221</id><published>2009-03-05T02:19:00.000-08:00</published><updated>2009-03-05T02:37:13.210-08:00</updated><title type='text'>Repeat Loops And Redundant Attribute Declaration</title><content type='html'>The Repeat loop in the image below iterates 20 times and creates a column of particles - the counter increments the Y height by 1 unit each time. In Python, I'd normally create the array for the resultant positions and the counter itself outside of the loop and, for a while, this is how I constructed loops in ICE:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_elKLql_26B8/Sa-n8FFhW2I/AAAAAAAAACU/-R_G0oU0lUE/s1600-h/scope_07.gif"&gt;&lt;img style="cursor: pointer; width: 378px; height: 400px;" src="http://3.bp.blogspot.com/_elKLql_26B8/Sa-n8FFhW2I/AAAAAAAAACU/-R_G0oU0lUE/s400/scope_07.gif" alt="" id="BLOGGER_PHOTO_ID_5309647136292428642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It turns out that ICE is much cleverer than that. Put plainly,&lt;span style="font-weight: bold; font-style: italic;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;you can 'Get' an attribute before you 'Set' an attribute&lt;/span&gt;. I know this doesn't sound too earth shattering but it confused me for a while. In a conventional scripting language you can't usually work with a variable/attribute before you've declared it. In ICE, however, you can. If I remove the initial Set Data on both the Counter and the Array in the tree:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_elKLql_26B8/Sa-o9h4SJwI/AAAAAAAAACc/n-1-3F1SuIE/s1600-h/scope_08.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 141px;" src="http://2.bp.blogspot.com/_elKLql_26B8/Sa-o9h4SJwI/AAAAAAAAACc/n-1-3F1SuIE/s400/scope_08.gif" alt="" id="BLOGGER_PHOTO_ID_5309648260713031426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The tree still works even though, ostensibly, for the very first iteration of the loop it looks like you're requesting Counter and Array before you've assigned any value to them. It seems that ICE pre-processes attributes before the tree is evaluated and initialises them to a default value - in this case on the very first iteration of the loop ICE knows that array is an array of 3D vectors and inserts a default vector value of (0,0,0) and Counter is a scalar and inserts 0.&lt;br /&gt;&lt;br /&gt;Saves a lot of unnecessary tree clutter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-4352930361801041221?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/4352930361801041221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/repeat-loops-and-redundant-attribute.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/4352930361801041221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/4352930361801041221'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/repeat-loops-and-redundant-attribute.html' title='Repeat Loops And Redundant Attribute Declaration'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/Sa-n8FFhW2I/AAAAAAAAACU/-R_G0oU0lUE/s72-c/scope_07.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-6819032678845991555</id><published>2009-03-04T08:38:00.000-08:00</published><updated>2009-03-05T01:22:30.203-08:00</updated><title type='text'>Traversing Contexts with Get Element ID and Sort Array With Key</title><content type='html'>In the previous post I looked at how you can create arrays of data in &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;context and then access that data in an &lt;span style="font-style: italic;"&gt;element &lt;/span&gt;context. The trick to doing that is the Get Element ID node. Using Get Element ID you can a) sort the array in &lt;span style="font-style: italic;"&gt;object&lt;/span&gt; context when using Sort Array with Key and b) locate the position of your &lt;span style="font-style: italic;"&gt;element &lt;/span&gt;in the array when you're in &lt;span style="font-style: italic;"&gt;element &lt;/span&gt;context. There are, however, a few tricks.&lt;br /&gt;&lt;br /&gt;As an example, I will construct an array of all point positions in &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;context and then sort that array by Index. Using Raf's &lt;a href="http://community.softimage.com/showpost.php?p=13103&amp;amp;postcount=2"&gt;trick&lt;/a&gt; we know that  Get Closest Points without any Cutoff distance will give us a list of all the point locations on the geometry (unordered).&lt;br /&gt;&lt;br /&gt;It would be great if you could simply pump that array of locations into the Get Element Index node but you can't. XSI returns an array with a single value.  Grahame Fuller at Softimage &lt;a href="http://groups.google.co.uk/group/xsi_list/msg/e6b9283e9a61acbd?hl=en"&gt;pointed out&lt;/a&gt; on the Mailing List that Get Element Index returns the &lt;span&gt;Index associated with the element's context&lt;/span&gt;. Since, in this example, the element is in &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;context it's only going to return a single value.&lt;br /&gt;&lt;br /&gt;You need to 'force' Get Element ID into &lt;span style="font-style: italic;"&gt;per point&lt;/span&gt; context by feeding in a &lt;span style="font-style: italic;"&gt;per point&lt;/span&gt; attribute (e.g. self.PointPositions) and then store that ID on the point as a custom attribute. Once you've done that you can query that custom attribute back  in &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;context (without using Get Element ID and thus bypassing the problem of contexts with Get Element ID). Here's the tree:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_elKLql_26B8/Sa66GVnhkZI/AAAAAAAAACE/bWb_bXJu8L0/s1600-h/scope_05.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 327px;" src="http://3.bp.blogspot.com/_elKLql_26B8/Sa66GVnhkZI/AAAAAAAAACE/bWb_bXJu8L0/s400/scope_05.gif" alt="" id="BLOGGER_PHOTO_ID_5309385628761297298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using Sort Array with key, it's then quite straightforward to pump the index array into the sort and have the Point Positions sorted in Index order. (In the example below the 'extra' sort array is there simply to display the sorted indices).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_elKLql_26B8/Sa-WnAVrTAI/AAAAAAAAACM/1EV2zPA1d5g/s1600-h/scope_06.gif"&gt;&lt;img style="cursor: pointer; width: 350px; height: 400px;" src="http://1.bp.blogspot.com/_elKLql_26B8/Sa-WnAVrTAI/AAAAAAAAACM/1EV2zPA1d5g/s400/scope_06.gif" alt="" id="BLOGGER_PHOTO_ID_5309628082543086594" 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/4037954350464998026-6819032678845991555?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/6819032678845991555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/traversing-contexts-with-get-element-id.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6819032678845991555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/6819032678845991555'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/traversing-contexts-with-get-element-id.html' title='Traversing Contexts with Get Element ID and Sort Array With Key'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/Sa66GVnhkZI/AAAAAAAAACE/bWb_bXJu8L0/s72-c/scope_05.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4037954350464998026.post-492235933570221996</id><published>2009-03-04T06:25:00.000-08:00</published><updated>2009-03-13T05:52:19.428-07:00</updated><title type='text'>Scope and Breaking Down The Walls Between Data</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;In a traditional scripting environment using the Softimage SDK it would be a relatively simple task to peform operations on individual vertices and cross-reference those vertices with others on the geometry. You have full and unimpeded access to the vertex arrays and associated data. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;However deep you burrow into the data there's always a mechanism available to access some completely unrelated data elsewhere. Your data network can be as arbitrarily complex as you like.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;In ICE the situation is different - access to data is carefully marshalled. The more you dig down into the different element contexts (point, edge, sample etc), the less you can see of the rest of the geometry data. If you're in &lt;span style="font-style: italic;"&gt;per point&lt;/span&gt; context, for example, you can't see any information related to non-adjacent points, edges, uvs etc. To get at any data at this level you usually have to use a Geometry Query. This is a huge difference. Effectively, the more you dig down the blinder you become - the only chink of light visible is data at the object level back where you came from. Everything else is invisible.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;Let's illustrate this whole thing with an example. You need to store the lengths to adjacent points on a linear curve's points i.e. you need some mechanism to say: 'at this point the length to the point to my left is x and the length to the point on my right is y' and store those x, y values on each point of the curve for later processing (see image below).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_elKLql_26B8/Sa6bDjvG3XI/AAAAAAAAAB0/qziEZXJtbJo/s1600-h/scope_03.gif"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_elKLql_26B8/Sa6bDjvG3XI/AAAAAAAAAB0/qziEZXJtbJo/s1600/scope_03.gif" alt="" id="BLOGGER_PHOTO_ID_5309351496151129458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;There is no native attribute in ICE for finding the neighbouring points of a curve's individual points when you're in &lt;span style="font-style: italic;"&gt;Per Point&lt;/span&gt; context. It's a great example of how the further you dig down into the granular levels of data in ICE the more 'locked out' you are from other pieces of data. A Geometry Query might give you the two closest points but who's to say these are the closest connected points?&lt;br /&gt;&lt;br /&gt;So, how do you break down these walls? The most elegant way I've seen so far is Ahmidou &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Lyazidi's &lt;span style="font-size:85%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt; &lt;a href="http://community.softimage.com/downloads.php?do=file&amp;amp;id=249"&gt;compound &lt;/a&gt;on the community site.  But his mechanism, which uses the fact that linear curve points have an even distribution of U doesn't really help illustrate our point. So I'll explore another route. In this scenario you need to somehow prepare your data in Object context since it's the only other context visible. And yet, on the surface there's simply no mechanism in ICE to allow you to access the whole array of Point Positions in one go as a single array - to get at point positions you usually need to be in &lt;span style="font-style: italic;"&gt;Per Point&lt;/span&gt; context where you only have access at any one time to the position of the point you're working on. Thanks to a &lt;a href="http://community.softimage.com/showpost.php?p=13103&amp;amp;postcount=2"&gt;trick &lt;/a&gt;by &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Raffaele Fragapane, however, you can get the whole array of Point Locations in one go in an &lt;span style="font-style: italic;"&gt;Object &lt;/span&gt;context - by using the Get Closest Points node.&lt;br /&gt;&lt;br /&gt;Armed with an unordered list of Point Locations corresponding to each point on the curve you can then extract the PointU of each location which is a normalised value between 0 and 1 corresponding to the position along the curve the point sits. A sort of this array will give you an array of all the PointUs on the curve corresponding to each point in index order.&lt;br /&gt;&lt;br /&gt;Because of the  hierarchical nature of the scope in ICE, as you burrow down into data you &lt;span style="font-weight: bold;"&gt;can &lt;/span&gt;still see data back at a higher level e.g. when you're in &lt;span style="font-style: italic;"&gt;per point&lt;/span&gt; context it is still possible to see any data in &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;context. So, in our example, if we now switch to&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;span style="font-style: italic;"&gt;per point&lt;/span&gt;  context and get the PointU for each point we still have access to an array at the object level which can tell us the PointU for the points adjacent to us (the array we've just created using Closest Points). By using Get Element ID as we traverse the PointUs at a &lt;span style="font-style: italic;"&gt;per point&lt;/span&gt; level we can  index into the PointU array at &lt;span style="font-style: italic;"&gt;object &lt;/span&gt;level and can then construct data at a &lt;span style="font-style: italic;"&gt;per point&lt;/span&gt; level which pulls data from outside the scope of the individual point. The image below illustrates the tree for doing just that...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_elKLql_26B8/Sa6i6MlFeFI/AAAAAAAAAB8/eO2jkkAcUsk/s1600-h/scope_04.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 101px;" src="http://2.bp.blogspot.com/_elKLql_26B8/Sa6i6MlFeFI/AAAAAAAAAB8/eO2jkkAcUsk/s400/scope_04.gif" alt="" id="BLOGGER_PHOTO_ID_5309360131409279058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, even though ICE marshalls data very strictly and enforces pre-defined routes for collecting data, it's still possible in some cases to break out of the constraints that the different contexts enforce. In this case, by storing the locations of the 'neighbours'  in a per point context it's possible to get ICE to 'see' data that would not normally be within an individual point's scope.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4037954350464998026-492235933570221996?l=julianjohnsonsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://julianjohnsonsblog.blogspot.com/feeds/492235933570221996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/scope-and-breaking-down-walls-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/492235933570221996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4037954350464998026/posts/default/492235933570221996'/><link rel='alternate' type='text/html' href='http://julianjohnsonsblog.blogspot.com/2009/03/scope-and-breaking-down-walls-between.html' title='Scope and Breaking Down The Walls Between Data'/><author><name>Julian Johnson</name><uri>http://www.blogger.com/profile/04541438042345099926</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/_elKLql_26B8/Sa6bDjvG3XI/AAAAAAAAAB0/qziEZXJtbJo/s72-c/scope_03.gif' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
