[Sidefx-houdini-list] grid motion

Gregory Ecker gregory.ecker at gmail.com
Wed May 24 10:42:54 EDT 2017


 I just mocked up a version using findshortestpath.  It was surprisingly
easy.  The network consists of 2 foreachloops.  The first one iterates over
the source points in 'fetch input' mode and 'merge iterations' and
randomizes the point 'cost' attribute differently each time through the
loop,  then creates 1 curve using findshortestpath with the source being
the iteration metadata detail,  and the end being whatever point you want
to end up at.  I also have 'startpt' output attribute ticked on in order to
create a name attribute on the output curves.  The second foreach loop
iterates through the name attribute on the prims,  adds a uv point
attribute based on @ptnum/@numpts followed by a carve which takes a section
of the curve according to how you want to animate it,  followed by a blast
of everything but the first point in that curve.  Works like a charm.
 findshortestpath is very cool.

 -G


On Wed, May 24, 2017 at 2:19 AM, Matt Estela <matt.estela at gmail.com> wrote:

> +1 find shortest path.
>
> any problem that can't be solved with find shortest path is boring and
> shouldn't be discussed. ;)
>
>
>
> On 24 May 2017 at 05:21, Gregory Ecker <gregory.ecker at gmail.com> wrote:
>
> >
> >  You could also try : http://www.sidefx.com/docs/houdini/nodes/sop/
> > findshortestpath
> >
> >  On a grid representing the paths.
> >
> >  -G
> >
> > > On May 23, 2017, at 11:38 PM, François Duchesneau <houdini at trinix.ca>
> > wrote:
> > >
> > > Hi Gary,
> > >
> > > An easy way would be to convert the line on the grid to an sdf. From
> > there it's easy to sim the particles with all the randomness your need
> and
> > constrain them to follow a very tight range within the sdf.
> > >
> > > You can also do the same kind of snapping by using the XYZ Distance and
> > the Get Primitive functions in a vop pop to force your particles to
> always
> > stick to the closest point on the grid lines.
> > >
> > > Either way you may have to recalculate the velocity based on the real
> > displacement of points after the snapping using the pprevious and P. But
> > it's possible that this kind of accumulated velocity gives nice
> randomness
> > in the motion depending on what you're after. Adding a force noise on top
> > of an attraction force to the center may create something interesting as
> > well.
> > >
> > > Good luck
> > >
> > > Francois
> > >
> > >> On 05/23/2017 10:55 PM, Gary Jaeger wrote:
> > >> I have something I’ve been puzzling over and can’t solve. Imagine a
> > grid of points, say on the xz plane. The points are evenly spaced in a
> > grid. The points will all move towards 0,0,0, but they can only move on
> > either the x or z axis at any given time. In other words, they move along
> > the grid lines. Add to that some randomness so they don’t all follow the
> > same or similar paths.
> > >>
> > >> How would you solve this? Thanks for any help.
> > >>
> > >> 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
> > 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
>



More information about the Sidefx-houdini-list mailing list