Heightfields: Understanding the best way to interact with layers in a HF wrangle

   2356   3   1
User Avatar
Member
14 posts
Joined: Jan. 2014
Offline
Hi,

I am trying to modify layer values in a heightfield, but do not know the layer names up front. I get the names via the @name prim attribute. I would love to be able to use the @ syntax to set values in the layers from a derived layer name.

Setting @Derived_string_for_Layer = value obviously does not work. Is there a syntax I am unaware of to make this work?

Secondly using setpointattrib() which would allow me to work with derived attrib names in an attribute wrangle, does not work with HF from what I can see. Maybe I am just not using it correctly in HF wrangle. Could someone post an example that does work in HF wrangle? Or suggest best method to approach this type of issue when working with HF's. I would like to avoid OpenCL based kernel solution if possible.

Thanks,
R.
User Avatar
Member
7761 posts
Joined: Sept. 2011
Offline
does this work for you?
@mask = foo;
@height += bar;

As for setpointattrib(), although volume vop evaluates in same cvex context as attrib vop, functions that modify geometry will only work in an attrib vop, as the volume vop is exclusively for binding to volumes.
User Avatar
Member
14 posts
Joined: Jan. 2014
Offline
@jsmack - thx for the reply

I am trying to do this essentially

//bool for operation 
int success = 0;
string layerName = primattrib(0, "name", index, success);
@layerName = doSomeThingFancy();

A colleague suggested using the HF wrangle bindings tab, to autobind the @name values inadvance.
I will pursue that approach for the time being.

Would be nice to get equivalent of setpointattrib() for HeightFields.

Thanks,
R.
Edited by skara - July 6, 2018 16:20:56
User Avatar
Member
1007 posts
Joined: April 2017
Offline
Do you have an example of this? I started using volume wrangle for heightfields and I'm lost. I can play around with @mask and @height but I can't create my own @myHeight. Would the binding tab solve this? …if so, how do I use it? I'm clueless…

Thanks.

-Olivier
  • Quick Links