Modify POP render attributes after simulation

   9146   11   2
User Avatar
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?
User Avatar
Member
141 posts
Joined: July 2005
Offline
You should be able append a point sop to your “baked” particles and under the particle tab, add the the pscale attribute by choosing Add Scale.

/Rick
/Rick
User Avatar
Member
4256 posts
Joined: July 2005
Offline
99.9% of the time you take the output of your Particle sim and bring it into SOPs to do post processing. Particles are nothing more that points with a handful of extra attributes, which means you can modify them like any other type of geometry in SOPs.

Attachments:
velocity.hip (51.2 KB)

if(coffees<2,round(float),float)
User Avatar
Member
158 posts
Joined: July 2005
Offline
That's very cool, I like that. Can I do the same with the color on the SOP level before I use it in a VEX shader's Cd parameter?
Currently I use a color POP. Then I use the particle id to assign a color over the uv coordinates. I would like to do that also in the SOP level.
User Avatar
Member
4256 posts
Joined: July 2005
Offline
Yes, particles are nothing more than points with extra attributes. You can add, modify and remove any attributes you want, including color.
if(coffees<2,round(float),float)
User Avatar
Member
158 posts
Joined: July 2005
Offline
Wolfwood
Yes, particles are nothing more than points with extra attributes. You can add, modify and remove any attributes you want, including color.

But how can I use a COP in a color or vertex SOP as you can do it in a color POP?
User Avatar
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)
User Avatar
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?
User Avatar
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?
User Avatar
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)
User Avatar
Member
311 posts
Joined: July 2005
Offline
sascha
The VOP SOP solution is much faster. Why is that so?

Probably because you are running through COPs. If you need speed, avoid any COPs look ups.

Jerry
User Avatar
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