Modify POP render attributes after simulation
9157 11 2- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
How can I modify the particle render attributes like color, size and blur after I simulated the POP graph already? At the moment I'm baking the information into the cache (memory or disk) but I cannot re-simulate the POP network again and again just to modify the particle size. So how can I do that after the simulation is cached?
- RickW
- Member
- 141 posts
- Joined: July 2005
- Offline
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
sascha
But how can I use a COP in a color or vertex SOP as you can do it in a color POP?
Use the Point SOP, add a Color Attribute (Cd), and use the pic() expression to lookup the color from the COP.
Or you could use a VOP SOP solution. Look at this thread for an example.
How to get UVs into a Vex Geometry Vop?
[sidefx.com]
if(coffees<2,round(float),float)
- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
Wolfwood
Use the Point SOP, add a Color Attribute (Cd), and use the pic() expression to lookup the color from the COP.
It works. But why is the pic expression so slow? It takes over 30 seconds to colorize 20.000 particles.
pic(“/img/img1/hsv1”, rand($ID), rand($ID), D_CR)
If I do it with the color POP it's nearly for free. How can I speed it up in the SOP level?
- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
Wolfwood
Or you could use a VOP SOP solution. Look at this thread for an example.
How to get UVs into a Vex Geometry Vop?
[sidefx.com]
The VOP SOP solution is much faster. Why is that so?
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
VEX operators run in a SIMD [en.wikipedia.org] environment. (Like shaders when rendering.) Converting the multiple Point OPs into single VEX operators is a great way to make your networks cook faster.
if(coffees<2,round(float),float)
- jesta
- Member
- 311 posts
- Joined: July 2005
- Offline
- Ondrej
- Staff
- 1072 posts
- Joined: July 2005
- Offline
sascha
The VOP SOP solution is much faster. Why is that so?
The use of the pic() expression function introduces a fixed overhead each time it is evaluated, per point in this case. This overhead, including things such as finding the COP in question and finding the raster in the cache, even if already cooked, can add up pretty quickly.
-
- Quick Links