[Sidefx-houdini-list] particles

Chip Collier photex at gmail.com
Sun May 13 23:58:05 EDT 2007


Just from an off-the-wall kinda "if I were coding this" point of view:
Have another attribute, when W gets changed also set this attribute to
reflect this. Always test this other attribute before getting to if
statement that will change the texture.

So in pseudo land:

if(was_once_changed == false)
{
    if(w_is_ready_to_rock_for_whatever_reason)
    {
        was_once_changed = true
     }
}

I setup a test of this theory, but your mileage may vary.
I have a sphere, and a grid copied to the points on the sphere. I'm creating
an attribute: has_changed ($HC) and it's 3 floats big. In the copy I'm
stamping "change" if($F<50, 0, 1).
Now, I'm using a point sop to give the grids some color. R is set to $HC and
B,G are set to 0.
I ended up having to setup a function for my idea to work but its:
float new_w(float cond, float trigger)
{
   if(cond == trigger)
  {
      run("opparm /obj/geo1/attribcreate1 value[1] 1");
      return cond;
   }
   return 0;
}

Once cond == trigger value2 in attribcreate1 is set to 1 so that this
function won't be called again. It's stupid and hardcoded but it works as a
proof of concept.
Now back at our friend attribcreate1 value1 is set to the expression:
if(ch("value2") == 0, new_w(stamp("../copy1", "change", 0), 1),
ch("value3"))
value3 is set to 1 for this test.
So once $F >= 50 the grids turn red and will never go back regardless of the
frame.

And now that I've just read PeterR's reply maybe this idea seems even
dumber. :)

_chip


On 5/13/07, jason lam <j.lam81 at gmail.com> wrote:
>
> much appreciate your interest and help
>
> its quite simple, its just particle sop feeding into a copy sop which
> copies a plain old grid.  it copy stamps a W coordinate per grid.
> then that all goes into sort sop which orders particles based on
> proximity to an animated point
>
> then i've got another point sop which i'm using to change the W
> coordinate for all point numbers within an arbitary value (75
> currently) which means that the 75 closest particles to the animated
> point changes texture.
>
> This is all great, however i want it so that once it changes texture,
> it doesn't change back.
> the prob is with the if expression i'm using
> if($PT<75, 3, $VARW)
> that once the point moves away, the texture changes back
> i can't work out how to either set a flag so that once it changes it
> can't go back.
>
> Jais
>
> On 5/14/07, jtalbain at singnet.com.sg < jtalbain at singnet.com.sg> wrote:
> > Jason, could you give more details about the initial conditions about
> the
> > particles, and how they are generated etc.? I'm also trying it out here,
> but
> > not getting much luck.
> >
> > Regards,
> > Alvin
> >
> > --- jason lam <j.lam81 at gmail.com> wrote:
> >
> > > nah  doesn't work, at least the way i'm doing it... cause once the
> > > obj moves
> > > away again, the condition is no longer true and it gets turfed out
> > > of the
> > > group.
> > >
> > > must be missing something silly....
> > >
> > > Jason
> > >
> > > On 5/12/07, Peter Robbinson <probbins at sympatico.ca> wrote:
> > > >
> > > > I would think that if you stuff your selected points into a group,
> > > that
> > > > would do.
> > > >
> > > > PeterR
> > > >
> > > >
> > > > On Sat, 2007-05-12 at 15:58 +0930, jason lam wrote:
> > > > > Hi guys looking for some ideas
> > > > > again working on Touch so no POPs only particle SOP
> > > > >
> > > > > so i ahve a bunch of particles, and i run a sortsop through it,
> > > and
> > > > based on
> > > > > proximity to a point, i want to change the particles texture.
> > > Which is
> > > > > fine. i use an if statement that goes if($PT<100), 3, $MAPW in
> > > the point
> > > > > sop.
> > > > >
> > > > > however once the object moves, then the particles change back to
> > > their
> > > > > original $MAPW, obviously
> > > > >
> > > > > so how do i make it so that once $MAPW is changed to 3 then it
> > > doesn't
> > > > ever
> > > > > change back?
> > > > >
> > > > > ideas much appreciated
> > > > >
> > > > > cheers
> > > > >
> > > > > Jais
> > > > > _______________________________________________
> > > > > Sidefx-houdini-list mailing list
> > > > > Sidefx-houdini-list at sidefx.com
> > > > >
> > > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > > > --
> > > > "gravity is not a force, it is a boundary layer"
> > > > "everything is coincident"
> > > > "Love: the state of suspended anticipation"
> > > > "To get any appreciable distance from the Earth in
> > > > a sensible amount of time, you must lie."
> > > >
> > > >
> > > > _______________________________________________
> > > > 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