Karma and Curves/Hair/Fur

   3297   8   1
User Avatar
Member
918 posts
Joined: March 2014
Offline
Hello,

I have many curves I bring into a stage, they have a pscale attribute to vary width/thickness along the curve. I'd like to control that in my scene graph but can't figure out how. If I apply a basis curve width property I can change the width on the fly, but it's uniform along the curve.

Is there a way to use pscale as basis and multiply from there? Something along a wrangle in my scene graph?
User Avatar
Staff
4435 posts
Joined: July 2005
Offline
There's the Attribute Wrangle LOP... It's the best (only?) way to perform arbitrary edits to array based USD attributes without jumping into SOPs (which gives more flexibility, but is more complicated to manage).
User Avatar
Member
918 posts
Joined: March 2014
Offline
Thanks Mark,

I've looked at the functions and syntax and decide it wasn't a very good fit for our team. Adjusting curve width on a shot by shot basis is a requirement in this case.

Which leads me to the question of how effective the curve file cache is, if we have to change things in a SOP modify for the USD to be rendered. How are the changes handled, in memory or temp cached to disk for Karma to render?

Happy day.
User Avatar
Member
7733 posts
Joined: Sept. 2011
Online
mtucker
There's the Attribute Wrangle LOP... It's the best (only?) way to perform arbitrary edits to array based USD attributes without jumping into SOPs (which gives more flexibility, but is more complicated to manage).

I thought the edit properties and related primitive edit nodes would allow modifying an array property in multiply mode, but it only writes back a single value array.

BTW, I found a bug when testing this. When a mesh has an array primvar with vertex num elements such as display color and using an edit properties node to modify the value to a single value array, the viewport doesn't update to displaying the array values after removing or disabling the modification. Only reloading the mesh results in the viewport updating the display color with the full array of values. Karma displays it correctly, so it's just a gl update issue.
User Avatar
Member
273 posts
Joined: Nov. 2013
Online
Andy_23
I've looked at the functions and syntax and decide it wasn't a very good fit for our team.

Could you wrap the wrangle in an easier-to-use HDA maybe?
User Avatar
Member
918 posts
Joined: March 2014
Offline
Thanks antc I'll look into that.
User Avatar
Member
27 posts
Joined: May 2014
Offline
Andy_23
Hello,

I have many curves I bring into a stage, they have a pscale attribute to vary width/thickness along the curve. I'd like to control that in my scene graph but can't figure out how. If I apply a basis curve width property I can change the width on the fly, but it's uniform along the curve.

Is there a way to use pscale as basis and multiply from there? Something along a wrangle in my scene graph?


Click on geometry and in the scene graph properties tab right click on width attribute and set it to edit. The Edit property node will open, so you can edit it in Solaris.
Edited by Pavini - Jan. 31, 2023 21:23:54
User Avatar
Member
31 posts
Joined: July 2015
Offline
The wrangle method is the best i think. you can do it as the image attached.
Edited by leoYfver - Feb. 1, 2023 04:07:20

Attachments:
hair_multiply.png (1.3 MB)

cg supervisor @goodbyekansas
User Avatar
Member
614 posts
Joined: Aug. 2008
Offline
override an attribute
  • Quick Links