Point Wrangle not using Keyframed Parameters

   1622   2   1
User Avatar
Member
6 posts
Joined: Feb. 2017
Offline
I am trying to manipulate the height of primitives by running a sphere over them. The closer the primitives are to the center of the sphere, the taller they become. Everything works fine when I manipulate the sphere manually, but when I keyframe the sphere's position, only the sphere's center position on the first frame is used for the calculations. I've been using wrangles/VEX for this.

I am using this line in a point wrangle to access the center of the sphere:

vector center = {`chs(“../../control_sphere/tx”)`, `chs(“../../control_sphere/ty”)`, `chs(“../../control_sphere/tz”)`};

Any ideas on why it's not updating every frame like I'm expecting?
User Avatar
Member
1743 posts
Joined: March 2012
Offline
I'd recommend using:

vector center = chv("../../control_sphere/t");

Using backtick expressions in VEX code means that the VEX has to be recompiled every single time the expression value changes. Using the VEX functions chi, chf, chu, chv, chp, ch2, ch3, ch4, or chs, instead of the HScript functions ch or chs, means that it'll only have to compile the VEX code one time.

Also, double-check that the node path is correct. ".."is the network containing the Point Wrangle. "../../control_sphere"is a sibling of the network containing the Point Wrangle, (i.e. two levels up, then a node in that network).

Hopefully that helps you get it working. If it doesn't, please post a HIP file so that people can try to figure out what's wrong.
Edited by neil_math_comp - Aug. 13, 2017 11:35:32
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
6 posts
Joined: Feb. 2017
Offline
This worked perfectly! Thank you so much!
  • Quick Links