Thank you for the detailled hip, that's very kind of you :)
Makes me feel very humble too, as it obviously will take time to understand
all this. I  do very little steps :)
My knowledge of Vex is very new and poor, that's why I splitted in vex +
vop.

If I'm no wrong, the super clever line might be this one :
int pt1 = min(neighbours(input, pt0));
Min neighbor is what ? the closest neighbour to pt0 ? The neighbor with the
smallest index ?

At a moment,  I was thinking using the Normal (@axis ) to find the P1.
Assuming that @axis position is on P0 and is pointing toward P1. But I'm
unable to translate this.
P0+@axis =P1

The conversion Local to Space is loosing me a bit. Is this an invert matrix
thing (like in ice ) ?



I realise I've been wrong route with the arrays. Yes I end up with array
per points which makes it very confusing.

Thank you a lot for providing this, it's a hell of an effort to understand,
but the exercice in itself is very educative even if I only get portions of
it :)



On Thu, Mar 3, 2016 at 4:40 AM, Christopher Crouzet <
christopher.crou...@gmail.com> wrote:

> 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 <a...@matkovic.com> 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 <facialdel...@gmail.com>
>> *To:* "softimage@listproc.autodesk.com" <softimage@listproc.autodesk.com>
>>
>> *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 softimage-requ...@listproc.autodesk.com
>> with "unsubscribe" in the subject, and reply to confirm.
>>
>>
>> ------
>> Softimage Mailing List.
>> To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com
>> with "unsubscribe" in the subject, and reply to confirm.
>>
>
>
>
> --
> Christopher Crouzet
> *http://christophercrouzet.com* <http://christophercrouzet.com>
>
>
> ------
> Softimage Mailing List.
> To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com
> with "unsubscribe" in the subject, and reply to confirm.
>
------
Softimage Mailing List.
To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to