Hello,
I begin to learn Houdini and, of course, i have some to question to achieve a specified task !
I watched the tornado and sprite shader tutorial from 3dbuzz. I made my own tornado sim and procedural sprite surface shader.
I include parameters to my shader to allow me to change it easely.
And now my question :
I would like the parameters of my shader change regarding the attributes ( not sure if it's the good term) of my particles ( life, velocity etc …)
What is the kind of expression to do that ?
thank for you help
Expression problem
9174 12 2- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- Allegro
- Member
- 696 posts
- Joined: March 2006
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- Allegro
- Member
- 696 posts
- Joined: March 2006
- Offline
pretty sure that was also answered in http://download.sidefx.com/images/stories/tutorials/expressions/12_custom_attributes_within_vops.mov [download.sidefx.com]
but it's because the life attribute contains one index which is the current life, and one index which is the allowed lifespan.
In vops this coresponds to life and age
in sops $LIFE is the equivalent of life/life or life/age
but it's because the life attribute contains one index which is the current life, and one index which is the allowed lifespan.
In vops this coresponds to life and age
in sops $LIFE is the equivalent of life/life or life/age
Stephen Tucker
VFXTD
VFXTD
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
ok
I understand better now but i have still some problems importing attributes in vop shop.
In the file attached ( simple particle emission) I try to make some change in the color of my sprite using attribute like speed or life …
When I connect a parameter node ( with the specific attribute name) nothing is append except for color ( Cd) and alpha (Alpha).
I don't know what I miss …
I understand better now but i have still some problems importing attributes in vop shop.
In the file attached ( simple particle emission) I try to make some change in the color of my sprite using attribute like speed or life …
When I connect a parameter node ( with the specific attribute name) nothing is append except for color ( Cd) and alpha (Alpha).
I don't know what I miss …
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- Allegro
- Member
- 696 posts
- Joined: March 2006
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
You need to add the pscale attribute to your particle points. The Copy SOP uses the pscale attribute on the template points to scale the copied geometry.
You can do this in either POPs or SOPs.
In POPs you need to add a Property POP and find/enable the Uniform Scale parameter. Replace the $PSCALE string with whatever you want. You said life which goes from 0-1 over the lifetime of the particle so use $LIFE.
I like to use $AGE which is the current age of the particle in seconds so something like: smooth($AGE, 0, 2) will give you a scale going from 0-1 when the age goes from 0 to 2 seconds. Then you can modify this:
fit01( smooth($AGE, 0, 2), 0, 0.2) will remap the 0-1 returnedfrom the smooth() function to 0-0.2.
In SOPs add a Point SOP and go to the Particle tab and find the scale parameter and use the same expression above.
Don't forget to turn off the “Transform Cumulative” option on the Copy SOP.
You can do this in either POPs or SOPs.
In POPs you need to add a Property POP and find/enable the Uniform Scale parameter. Replace the $PSCALE string with whatever you want. You said life which goes from 0-1 over the lifetime of the particle so use $LIFE.
I like to use $AGE which is the current age of the particle in seconds so something like: smooth($AGE, 0, 2) will give you a scale going from 0-1 when the age goes from 0 to 2 seconds. Then you can modify this:
fit01( smooth($AGE, 0, 2), 0, 0.2) will remap the 0-1 returnedfrom the smooth() function to 0-0.2.
In SOPs add a Point SOP and go to the Particle tab and find the scale parameter and use the same expression above.
Don't forget to turn off the “Transform Cumulative” option on the Copy SOP.
There's at least one school like the old school!
-
- Quick Links