Particle Age help

   9855   16   1
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Im trying todo something that seems realy easy, but I seem to miss some fundemental knowledge here.

Im putting out a Emitter from the shelf, i jump down in the gemotry node.
Create a sphere, and with a copy node link the popnet and sphere togeather.

So fine, now I have a Sphere on each emitted particle.

But how do I go about to scale these spheres based on the particle age? or is the whole concept of using a copy node to put spheres on the emittor wrong ?

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
You are missing a ‘secret ingredient’. $PSCALE.

This attribute can be created by using a point sop->particle tab->scale attribute. you can try putting $LIFE in that pscale field.

You can also create a ‘pscale’ attribute using an attribcreate sop.

You can also create a ‘pscale’ attribute using a vopsop.

Either way, it all comes down to the connection between the ‘pscale’ attribute and the copy sop.

G
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Thanks Keyframe !

The point sop hides everything i've been wanting todo it seems !

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
Yeah, the point sop is gold.

One thing to keep in mind as your scenes becomes heavier – is that the point sop is not multithreaded, while the vopsop (in fact, all of VEX, in every context) is.

you won't notice it with thousands of particles, but you definitely will when you are working with hundreds of thousands of particles.

G
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Yes I know a little about the VEX and it's amazing power and I've used it do displace things before, but only positions.

But in reality im pretty new to VEX, since I dont know how to make it affect such a thing as scale, I was kinda hoping for a scale input in the output node but life aint that easy

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
actually, you are almost right. It's not as difficult as people choose to believe it is.

in a vop sop:

(1) create a addattribute vop.
(2) give your attribute a name.
(3) pipe the appropriate data type into the input.
(4) look up and watch Maya users still type pages and pages of MEL code to achieve the same thing :wink:

G

ps: step 4 is optional
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
I named my new attribute to “myScale” and was heading on to step 4 when I suddenly realised I have no idea how to use this new attribute. Where the point sop sorta took care of that for me.

I must say your answers are great, you'r solving things and showing new ones, all just the ones i've been looking for.

/M

Edit: unless im supposed to use my new attribute in a point sop because that seems to work but is it right?
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
Try pscale instead of myscale. I don't know if you are aware, but MMB on a sop, will list all the existing attributes, and you can examine them using the spreadsheet (RMB, spreadsheet).

pscale is a bit of a special case because it's designed specifically for this purpose. To scale intances, particles, sprites, and copies.

Over time you will learn what ‘builtin’ variables each sop understands. I admit it's still (sadly) a bit of a black magic situation.

As it stands, your ‘myScale’ attribute exists, but it isn't connected to anything.
you should be able to (for example) put $MYSCALE in the scale field of your point sop.

G
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Just to make sure here, by putting $myScale in the point SOP which works fine, I do still get the multi threading power from VEX ? Because then it's awesome and easy!

And manny thanks again, I spend all afternoon looking on how to scale my particles, and not only did I get the answer but also a better and powerfull way of doing it !

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
well, yes and no.

You are going to get multithreading in the evaluation of the attribute. If you have a complex noise function that sets myscale, it'll multithread, but as soon as you hit the point sop (for the actual assignment of the attribute to pscale) it'll be single threaded.

To get around this, simply addattribute an attribute named “pscale” instead of ‘myscale’, and simply bypass the point sop. It might be a built-in, but it doesn't mean that you can't stomp on it whenever you want.

Same for other built-ins, like P, N, or UV for that matter…

G

edit: The key here is that so long as an attribute named ‘pscale’ exists upstream (however it gets created- whether by an attribcreate sop, a vopsop, or a point sop), it'll get used correctly by the copy sop. In your case, the point sop is doing nothing more then creating this ‘pscale’ attribute, and setting it's value.
Edited by - May 3, 2009 15:06:19
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Ah thats fantastic, didnt know you could stomp on pscale like that.

goodbye to the point SOP

Turns out everythings was actually rather easy, I just couldn't find the welth of information you've provided in a couple of answers.

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
heh, yeah someone should really write a houdini book…

:wink:

G
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Haha.. well if you already aren't you got my vote

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
Thanks for the vote of confidence - maybe one day…

In the meantime, keep posting to the forums. There is a great group of really helpful and experienced users here.

G
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
in that case, here's another question I know I can MMB on the nodes to see my particle count, but is there any other way ? getting maybe a live update in the 3d view?
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
I don't believe such a thing exists by default. I'll be honest with you though, in my opinion, Houdini's way of ‘working’ often makes such statistics meaningless. The whole point is to build setups flexible enough where these numbers are very likely to change.

Why does it matter if you have 12,234 or 53,203 particles? it shouldn't…

Having said that, you can easily dive into the camera object, create a font sop inside, and stick an expression in the text field to report on the number of points in a particular sop.

look into the npoints expression. “exhelp npoints” in the textport.

G
User Avatar
Staff
181 posts
Joined: July 2005
Offline
If you click on the “i” icon in your parameters window, you will get the same info you get when you MMB on a node
  • Quick Links