[Sidefx-houdini-list] lines from point positions
gdanzo at gmail.com
Wed Oct 5 07:02:40 EDT 2016
For growing lines, one interesting approach is to set an id attribute on
the growth-points, which can simply be the point number in the source
geometry, (say 'id'/Integer/$PT in an Attribute Create), then accumulate a
series of states of it changing, into a single geometry.
If, in each iteration, the positions deform further along the Y dimension,
then you could generate lines that go in that direction (to answer your
question before I've finished answering it!).
To accumulate the states you could use (amongst other options) the Trail
Sop (if the points evolve over time), the Solver Sop (do whatever you
want), or Copy Sop (probably with stamping of some sort).
Once accumulated you can add primitives to the points,
one-polyline-per-original-point, using the Add Sop. Set it, on the
'Polygons' tab, and on the 'By Group' tab, to Add: 'By Attribute', this
will allow you to specify the id attribute (that you previously added) as
what to use to connect the polygons (or 'polylines' in this case).
The points still need to be in-order in their own id-groups I believe, but
that works both with batches-of-same-id and interleaved-id point orderings.
The Sort Sop can occasionally come in handy for restoring a known point
ordering, but should be used carefully, for example a misplaced random
point sort can destroy later use of 'Add', if you don't store an attribute
that records what to sort them by to get them back in order later on).
Now, all of that aside, this whole thing is a lot trickier to do if each
initial point is also going to branch!! The Add Sop part particularly, if
the branches simply inherit the parent id (ie copy 'id' without modifying)
then the points in the line going through child branches will be
interleaved, a line that zig-zaggs back and forth is generally not what you
want - instead a separate line for each child branch would be nice :).
I believe it would be possible to figure out a way to have branch-id's that
are tracked so that each line, even child lines, has its own unique id, and
such that point ordering is also correct and that a single Add-Sop could
create it all.
That said, these days there's also potentially faster ways to do this type
of thing using Vops and Vex Wrangles ;D.but I digress...
Hope that helps :) have a good one!
On Wed, Oct 5, 2016 at 5:24 PM, Rasmus Brinkløv <pingo1 at mac.com> wrote:
> Connect adjacent pieces sop, set to points
> > On 5 Oct 2016, at 08.03, Olivier Jeannel <facialdeluxe at gmail.com> wrote:
> > simpler way and slower too, would be to Copy a Line with a Carve on each
> > point
> > Then Stamp the carve values
> >> On Wed, Oct 5, 2016 at 7:51 AM, Gary Jaeger <gary at corestudio.com>
> >> More noob questions. This all is relation to finding a way to get our
> >> l-system look without using l-systems. though we’re going down that
> >> as well.
> >> Another thought was that if we could scatter some points on a grid, then
> >> grow lines from those points we could then just bend the lines where we
> >> wanted. Or have them follow some other geo. But can’t figure out a way
> >> get lines growing from the scattered points. For instance if I have 15
> >> points scattered on a zx grid, and I want lines to grow from those point
> >> positions in +y, an suggestions on how to do that?
> >> thanks again
> >> Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
> >> http://corestudio.com <http://corestudio.com/>
> >> _______________________________________________
> >> Sidefx-houdini-list mailing list
> >> Sidefx-houdini-list at sidefx.com
> >> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list