09.06.2020, 11:32 fxtd

When writing regular expressions in VEX, use raw strings. Write the character r before the regex line:

string num = re_find(r"(\d+)$", s);

When using groups in the re_replace() function, also use raw strings and \1 syntax to get groups. $1 syntax from the help does not work:

s@material = re_replace(r".(.).*$", r"\1", s@name);


08.06.2020, 23:55 fxtd

Be careful with @TimeInc in VOP before the dynamics: this does not work correctly during dopnet substep simulation. Use custom expressions like 1/@FPS.


04.06.2020, 23:25 fxtd

This is a simple VEX code that allows you to change the size of objects:

matrix3 xform = primintrinsic(0, "transform", @primnum);
scale(xform, chf("scale"));
setprimintrinsic(0, "transform", @primnum, xform);


04.06.2020, 13:35 fxtd

When you sample a VDB SDF outside its bounds, volumesample returns the value of the SDF border, volumegradient returns none.


  • 1
  • 2