[Sidefx-houdini-list] lines from point positions

Olivier Jeannel facialdeluxe at gmail.com
Thu Oct 6 13:55:13 EDT 2016


If you take yesterday setup you could insert an attributeVOP and add a
PolyWire

    Line
       |
AttributeVOP                        Grid
                   |                         |
                  Carve       Scatter
                           |       |
                           Copy
                                |
                         PolyWire


In the AttribVOP create a ratio value going from 0 to 1  for each points
along the line

ptnum___ IntegerToFloat
                                        \
                                         Divide -----Fit 0-1
1-0----BindExport (pscale)
                                        /
numpt___ IntergerToFloat




In the PolyWire, Wire Radius @pscale



On Thu, Oct 6, 2016 at 7:17 PM, Ron Schab <ron.schab at gmail.com> wrote:

> Hey Garry,
>
> glad it was what u are after.
>
> The way it works I would describe it as:
> Width is just a point attribute that mantra "automatically" understands as
> a "thickness" value when rendering curves.
> It is set on a per point (on the curve) basis and interpolated in between
> those points.
>
> So, if  for example you give each point on your curve a random "width"
> value the curve should be rendered with varying width along it.
>
> As a quick test and for illustration purposes you could:
> - drop down a line-sop and give it let's say 10points.
> - then drop down a point-vop-sop after that, dive in, plug ptnum into a
> fitrange-vop and set "maximum value in source range" on that fitrange to 10
> (to keep it procedural you could channel reference "Points" from your line
> sop after promoting that parameter)
>
> =>That should give u a funnel like line with a thickness/width starting
> from 0 and going to 1.
>
> In your point-vop-sop you could plug in a ramp-parameter-vop after your
> fit-range-vop, chose spline ramp in order to get an adjustable & visual
> representation of the shape that will be rendered on your point-vop-sop.
>
> With that in mind you should be able to get any desired width-shape for
> your curves.
>
> Hope this clarifies things a bit more :)?
>
>
> cheers
> Ron
>
> Ron Schab
> -----------------------------------------------------------------------
>
> http://www.ronthedon.com
>
>
> On Thu, Oct 6, 2016 at 6:53 PM, Gary Jaeger <gary at corestudio.com> wrote:
>
> > Thanks Ron. That works, but I’m not sure the advantage. But to be clear,
> > I’m sure I’m doing it wrong. That’s pretty my my mantra(!) while learning
> > houdini,
> >
> > So at the end of my network, I put and Attribute Create node. Name is
> > width and I can set it to get my lines. It’s the randomizing part that’s
> > throwing me. Do I then create an Randomize Attribute? Or an wrangle? If I
> > set up a randomize, depending on settings I get something that looks
> like a
> > fuzzy line but I can’t seem to get the widths of various lines to be
> > randomized. I’m not looking for random along length. Yet. But simply to
> set
> > a range like rand(.1,.5) or whatever.
> >
> > thanks again.
> >
> > Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
> > http://corestudio.com <http://corestudio.com/>
> > > On Oct 6, 2016, at 2:14 AM, Ron Schab <ron.schab at gmail.com> wrote:
> > >
> > > Hey Gary,
> > >
> > > not having looked at your scene ....
> > >
> > > I am assuming when you are trying to use pscale for "the weight of the
> > > lines as they render" you are trying to set their width/thickness?
> > >
> > > If so, try using f at width instead for lines :)
> > >
> > > cheers
> > > Ron
> > >
> > >
> > >
> > > Ron Schab
> > > ------------------------------------------------------------
> -----------
> > >
> > > http://www.ronthedon.com <http://www.ronthedon.com/>
> > >
> > >
> > > On Thu, Oct 6, 2016 at 12:44 AM, Gary Jaeger <gary at corestudio.com
> > <mailto:gary at corestudio.com>> wrote:
> > >
> > >> Thanks Neil. This works well, except I couldn’t get it working using
> > >> Custom Discrete. Messing around I got it basically working using
> Uniform
> > >> (Discrete) and fiddling with the random seed. Still seems to favor one
> > of
> > >> the colors, but that might be ok. I’d like to understand why though.
> > >>
> > >> In a similar vein, I’ve been trying to randomize the weight of the
> lines
> > >> as they render. I put an Attribute Create at the end of the chain,
> and I
> > >> can set a value there. Putting an Attribute Randomize after that with
> > >> attribute name set to pscale doesn’t seem to do it. Is it because
> > they’ve
> > >> already been created?
> > >>
> > >> Ha, things are (slowly) sinking in…
> > >>
> > >> in case you’re curious the masterpiece is here
> > https://www.dropbox.com/s/
> > >> ra4walh9qqd99be/1676_FX2_v002.hip?dl=0
> > >>
> > >> Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
> > >> http://corestudio.com <http://corestudio.com/> <
> http://corestudio.com/
> > <http://corestudio.com/>>
> > >>> On Oct 5, 2016, at 10:41 AM, Neil Dickson <ndickson at sidefx.com>
> wrote:
> > >>> For the picking from 3 colours randomly, a way to do it, though
> others
> > >>> probably have better ways for specific situations, is to use
> Attribute
> > >>> Randomize with Attribute Name set to colour_choice, Distribution set
> to
> > >>> Custom Discrete, 3 values, set to 0, 1, and 2, (this just lets you
> > easily
> > >>> adjust the relative proportions of each colour), then in an Attribute
> > >>> Wrangle:
> > >>>
> > >>> if (@colour_choice == 0) {
> > >>>   @Cd = chv("colour0");
> > >>> }
> > >>> else if (@colour_choice == 1) {
> > >>>   @Cd = chv("colour1");
> > >>> }
> > >>> else { // @colour_choice == 2
> > >>>   @Cd = chv("colour2");
> > >>> }
> > >>>
> > >>> You can press the "Create spare parameters..." button next to the
> > >>> VEXpression to create the parameters for the colours and adjust those
> > to
> > >>> set the colours.  To have attributes, including Cd, copied from the
> > >>> template points to the copies, turn on Use Template Point Attributes
> in
> > >> the
> > >>> Attribute tab of the Copy SOP.
> > >>>
> > >>> Cheers,
> > >>> Neil
> > >>
> > >> _______________________________________________
> > >> Sidefx-houdini-list mailing list
> > >> Sidefx-houdini-list at sidefx.com <mailto:Sidefx-houdini-list at sidefx.com
> >
> > >> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list <
> > https://lists.sidefx.com/mailman/listinfo/sidefx-houdini-list>
> > >>
> > > _______________________________________________
> > > Sidefx-houdini-list mailing list
> > > Sidefx-houdini-list at sidefx.com <mailto:Sidefx-houdini-list at sidefx.com>
> > > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list <
> > https://lists.sidefx.com/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