ICE Topo grow polygon array

314 views
Skip to first unread message

Chris Marshall

unread,
Jul 30, 2012, 7:50:19 AM7/30/12
to soft...@listproc.autodesk.com

Hello,
I'm extruding some polygons in ICE, I have an array of the polygon indices being extruded, but how can I find the neighbouring polygon indices for the ones in my array? A bit like growing the selection.
Thanks
Chris

Vincent Ullmann

unread,
Jul 30, 2012, 7:58:31 AM7/30/12
to soft...@listproc.autodesk.com
Did something like this some time ago.

You should try something with some of these nodes:

GetData(Polygon_to_Vertecies)
GetData(VertexIndex)
Find in Array
Get Element Index

GetData(Vertex to Polygons)



But there are lots of Context-Issues....
Got no much time to have a lock now.... maybe i could check this this evening

Chris Marshall

unread,
Jul 30, 2012, 8:21:02 AM7/30/12
to soft...@listproc.autodesk.com
Yes I can't get this to work so far, because of the context issues. I'll keep playing.
Thanks

Chris Marshall

unread,
Jul 30, 2012, 10:00:58 AM7/30/12
to soft...@listproc.autodesk.com
Well, you can't say I didn't try! But I suddenly realised I was going around in circles, with no solution. It must be in there somewhere...
ice-nightmare-grab-1.jpg

Chris Marshall

unread,
Jul 30, 2012, 11:23:23 AM7/30/12
to soft...@listproc.autodesk.com
OK I've managed to get something working, at last! Honestly, what a nightmare.

Vincent Ullmann

unread,
Jul 30, 2012, 11:30:44 AM7/30/12
to soft...@listproc.autodesk.com
... and how did you did it?

Saw your prev Screenshot and rememberd how i bother with these problems.
Any Repeat-Nodes?

Chris Marshall

unread,
Jul 30, 2012, 11:49:34 AM7/30/12
to soft...@listproc.autodesk.com
Errr, well Repeat nodes don't work (See previous post), but actually While nodes do. So you can use them in the same way as Repeat nodes.
For this problem, neither were needed. The context issue was solved by using a Build Array from Set node. Everything worked after that.
Now I have duplicate values in the array, so somehow need to remove the duplicates.
ice-grow-poly-index-array.jpg

Alok

unread,
Jul 30, 2012, 11:59:20 AM7/30/12
to soft...@listproc.autodesk.com
"so somehow need to remove the duplicates."

You can you my compiled node to do that:
http://bit.ly/QrtFA2


Alok.

Chris Marshall

unread,
Jul 30, 2012, 12:02:47 PM7/30/12
to soft...@listproc.autodesk.com
Hey thanks, will try in the morning. Is that an ICE tree?

alok.gandhi

unread,
Jul 30, 2012, 12:12:49 PM7/30/12
to soft...@listproc.autodesk.com
It is a self-installing c++ ice node. There is a performance advantage as you don't have to loop using repeat nodes. 

Chris Marshall

unread,
Jul 30, 2012, 12:37:10 PM7/30/12
to soft...@listproc.autodesk.com
Ok thanks. I'll give it a go.
Cheers
--

Chris Marshall
Mint Motion Limited
029 2002 5762
07730 533 115


Sam Cuttriss

unread,
Jul 30, 2012, 1:21:18 PM7/30/12
to soft...@listproc.autodesk.com
alok are you making c++ ice nodes with functioning polymorphism?
i had some success but stalled out when softimage crashed if i swapped an array of booleans to an array of integers per point.
that was using the pass though example that ships with soft.

it would be great if that was solved.

_sam

Peter Agg

unread,
Jul 30, 2012, 1:26:57 PM7/30/12
to soft...@listproc.autodesk.com
Ok, I think I have something here!

Hopefully the screenshots are self explained, but in the result image, the 'True' points in green are the ones from the initial array, the blue 'True' ones beneath are the ones in the extended array. I'm basically using the fact that we know for sure that there's only 2 values in an Edge Vertex array, then working from there. It's probably not the fastest thing in the world, but it was the only way I could work out.


To be honest, this would be 10x easier if there was a 'is a value in this array also in that one' node. But there isn't, alas. :)
grow_selection_result.png
grow_selection_tree.png

Alok

unread,
Jul 30, 2012, 1:44:41 PM7/30/12
to soft...@listproc.autodesk.com
I did not write a polymorphic one. But will do so soon and post the result.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5164 - Release Date: 07/30/12


Sam Cuttriss

unread,
Jul 30, 2012, 1:58:01 PM7/30/12
to soft...@listproc.autodesk.com
not specific to this tool alok,
i was just interested in your experiences.
if it works for you i would love some insight.

(sorry to interrupt the thread)

_sam

Alok

unread,
Jul 30, 2012, 5:51:45 PM7/30/12
to soft...@listproc.autodesk.com
Not sure but maybe the threading model change to XSI::siICENodeSingleThreading might do the trick. Anyways, I will try to check this as soon as I get some time.

alok

Chris Marshall

unread,
Jul 31, 2012, 9:32:33 AM7/31/12
to soft...@listproc.autodesk.com
Thanks a lot for sending that through. Worked a treat. Only thing was I was working with integers, so needed to convert to scalar and back again either side, but that's fine. Attached are some examples of what I came up with. Took lots of head scratching!! With this kind of stuff you never quite know what the result will be, and this ended up looking more organic than I thought it would.

Cheers
Chris
ice-repeat-extrude-1.jpg

olivier jeannel

unread,
Jul 31, 2012, 11:33:12 AM7/31/12
to soft...@listproc.autodesk.com
Looks super, hope to see some animations on vimeo soon :)

Chris Marshall

unread,
Jul 31, 2012, 11:41:46 AM7/31/12
to soft...@listproc.autodesk.com
you might 

Rob Chapman

unread,
Jul 31, 2012, 12:27:09 PM7/31/12
to soft...@listproc.autodesk.com
Nice one Chris, sort of following cluelessly and trying to rebuild something similar - quick question - what are the Test nodes testing mode?   Is Element, Integer Array or Comparison?  

Cheers

Rob

Chris Marshall

unread,
Aug 1, 2012, 6:28:04 AM8/1/12
to soft...@listproc.autodesk.com
Hi Rob,
The Test Polygon Index and Test Vertex Index nodes are both set to Integer Array.
I added a Filter node after the second IF and ran the Test Vertex Index result into that, which removes everything set to -1, but then realised this could all be simplified anyway, see the attached. And a sample output of how running the result through some extrude nodes, in a loop, can give an interesting result.
Chris



ice-grow-poly-index-array-2.jpg
ice-repeat-extrude-2.jpg

Chris Marshall

unread,
Aug 1, 2012, 10:03:32 AM8/1/12
to soft...@listproc.autodesk.com
Here's the video! :-)

Rob Chapman

unread,
Aug 1, 2012, 11:35:06 AM8/1/12
to soft...@listproc.autodesk.com
Thanks Chris

kind of looks like a hedge made out of eels :)  so Got it working my end (sort of) on a simple example Ice Modelling tree that randomly selects a percentage of polygons and then extrudes them., If I use the above technique on my random selection indices it selects the surrounding polygons as described, adds them to the 'array' but it extrudes each polygon independently.   I wonder if its possible, for each initial random polygon, to grow the selection but merge the growth into one polygon and make a new array out of these merged polygons for the extrusion? 

 Im getting context problems when trying to connect my array of integers into the polygon index (this is how my setup worked for the apply extrusion)  so in essence I need to repeat, for each polygon in my first array to feed the 'Apply merge polygon' with an integer array of the surrounding polygons and make a new array out of these to feed to the repeat extrusion...    this is not so easy to do is it when trying to grasp the idea of selection arrays inside of ICE modelling, I kind of know what I want to do but have no way of achieving it yet without a lot more practice, further painful trial and error and hopefully some more Ice modelling hints ;)

cheers

Rob

Chris Marshall

unread,
Aug 1, 2012, 11:48:15 AM8/1/12
to soft...@listproc.autodesk.com
Hi Rob,
I was having the opposite problem with extruding polygons, wanted individual ones to extrude but it was always merging them. Are you using Apply Extrude Polygon Along Axis? If so it might be worth trying the Extrude Polygon Island compound.

Rob Chapman

unread,
Aug 1, 2012, 12:12:26 PM8/1/12
to soft...@listproc.autodesk.com
Chris,

extrude polygon island is inside the compound of apply extrude polygon along axis :)   I tried it anyways from your suggestion by bypassing the merge polygons and plugging directly into integer array - it sort of works with low numbers of random selection but breaks dramatically with higher numbers, thanks for the pointer though!

best

Rob

Chris Marshall

unread,
Aug 1, 2012, 12:28:24 PM8/1/12
to soft...@listproc.autodesk.com
ok, no worries. I just wish there were a few more examples that could be taken apart and put back together, just to see how these things work. It's so hard to know what'll work when there are so few examples available.

Rob Chapman

unread,
Aug 1, 2012, 12:32:22 PM8/1/12
to soft...@listproc.autodesk.com
and here is where I got to with this - kind of a kung fu practice dummy :)   am going to try and apply Stephen Blair's tutorial 'make points into a circle'   http://xsisupport.com/2012/02/06/using-vector-subtraction-to-move-a-point-onto-a-circle/  before extruding.  

Also doing it this way does not need Alok's C++ compound to delete duplicates from selection - it just extrudes the lot anyways :)

cheers

Rob





On 1 August 2012 17:12, Rob Chapman <tekan...@gmail.com> wrote:
wooden_dummy.jpg

Chris Marshall

unread,
Aug 1, 2012, 12:37:32 PM8/1/12
to soft...@listproc.autodesk.com
Cool!!

Guillaume Laforge

unread,
Aug 1, 2012, 10:46:58 PM8/1/12
to soft...@listproc.autodesk.com

Chris Marshall

unread,
Aug 2, 2012, 7:53:18 AM8/2/12
to soft...@listproc.autodesk.com
thanks will take a look

Chris Marshall

unread,
Aug 3, 2012, 7:44:28 AM8/3/12
to soft...@listproc.autodesk.com
Sorry, last post on this, this was more the kind of thing I was attempting to do with this. Added some more control to fine tune each iteration:-


There we are, as you were....

Reply all
Reply to author
Forward
0 new messages