You can think of each geometry attribute as an array which length equals the number of points (if dealing with points). VOPs simply iterate over these points and process the graph for each of them. Since each attribute is an array, at any time you can pick the value of any element with `Get Attribute` provided you know the point number. This is so straightforward that you can even do this outside of VOP/VEX, with the `point` expression for example.
Sometimes it can be useful to define attributes that can themselves hold arrays, for example a list of neighbours, to then pass these down to other nodes for further processing. That's why they added that feature in H14, but otherwise there's no real need to directly create arrays yourself. Shamefully, I haven't used Fabric Engine yet but from what you're saying maybe they're just presenting the data differently by providing you with the whole points data as an array instead of letting you directly work on a per-point context? In any case, there's plently of good reasons to use Fabric Engine but this definitely isn't one of them—just wrap your head around how Houdini works instead, everything will eventually start to make sense :) Olivier, assuming that two poins are neighbour based on their point number is quite a risky bet. Instead, there is a `Neighbour VOP` node for that so you can pick P1 as being the first neighbour of P0. But then, to reflect the sorting order of your points, it'd be better to retrieve the array of all the neighbours and retrieve only the neighbour with the smallest point number. I've made an example scene for you—everything is happening in the node named `rotate_each_prim`, where you'll find an `angle` parameter to play with. I tried to keep the code as simple as possible and documented every line to help you understanding it. An issue is that the `Sort SOP` node fails when for example sorting the points of the grid along the X axis since many points in that grid share the same position in X, leaving no hint for the `Sort SOP` node to prioritize one point over the other. In fact, sorting points by an axis might be troublesome even on more organic geometries, so basing this effect on the `Sort SOP` alone won't be enough to have predictible results, and you'll end up with primitives rotating in a different direction than their neighbours. On 3 March 2016 at 05:43, Anto Matkovic <[email protected]> wrote: > Nope. I think the only way to create an array directly in VOP, is pcfind > (pcopen that returns array), or array version of point neighbors. Or, to > stack the 'append' node several times :). There are examples how to loop > over arrays of indices, later in network, here: > > https://www.sidefx.com/index.php?option=com_content&task=view&id=3148&Itemid=412 > By the way, had to do some pretty interesting networks :) for Kristinka > Hair for H - while everything worked at the end of day, anyway. > > If you're around arrays and nodes, Fabric is waiting for You.... > > > ------------------------------ > *From:* Olivier Jeannel <[email protected]> > *To:* "[email protected]" <[email protected]> > *Sent:* Wednesday, March 2, 2016 1:29 PM > *Subject:* OT Houdini build Array VOP question (and a bit of rant) > > Hello serious list :) > > I'm a bit confused with houdini vop array. > While I managed to do it in vex, I would like to make a build array (like > build array from set) of the pointposition (P) in VOP. > > I understand you need to for-loop on each Ptnum and probably append the P > values and this will buid an array of P. > But you know what ? Well I can't manage to make it work. > > I found no example on the net (sideFX, odforce). > The doc is just words, no schemes, no graphics. > The examples hips are bizarre, not so simple, and use the old loop node. > > So I'm wondering if someone from here could provide a screen shot of how > that should be connected ? > > Thank you :) > > > ------ > Softimage Mailing List. > To unsubscribe, send a mail to [email protected] > with "unsubscribe" in the subject, and reply to confirm. > > > ------ > Softimage Mailing List. > To unsubscribe, send a mail to [email protected] > with "unsubscribe" in the subject, and reply to confirm. > -- Christopher Crouzet *http://christophercrouzet.com* <http://christophercrouzet.com>
mystic.hipnc
Description: Binary data
------ Softimage Mailing List. To unsubscribe, send a mail to [email protected] with "unsubscribe" in the subject, and reply to confirm.

