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
Particle Age help
9794 16 1- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- keyframe
- 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
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
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- keyframe
- 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
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
- MagnusL3D
- 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
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
- keyframe
- 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
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
- MagnusL3D
- 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?
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?
- keyframe
- 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
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
- MagnusL3D
- 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
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
- keyframe
- 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.
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
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- keyframe
- Member
- 1529 posts
- Joined: July 2005
- Offline
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- keyframe
- Member
- 1529 posts
- Joined: July 2005
- Offline
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- keyframe
- 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
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
- silvina
- Staff
- 181 posts
- Joined: July 2005
- Offline
-
- Quick Links