VEX Group Velocity expression (syntax error)

   3564   4   0
User Avatar
Member
45 posts
Joined: Dec. 2016
Offline
Hello,

I'm try to group all point with a velocity length bigger than 0.5.

I want to do that with this expression in a group node : length({@v.x,@v.y,@v.z})>0.5
But I have an error where the text is bold. I don't know the right way to write that. Can you help me ?

Waiting i did a wrangle node :
vector VEL;

VEL = 0;
@vel = 0;

VEL[0] = @v.x;
VEL[1] = @v.y;
VEL[2] = @v.z;
VEL = length(VEL);
    
@vel = VEL;

And after that i put a group node with this expression and it work !
@vel>0.5

Thank in advance,
Jeremy Gurdal
VFX Artrist
User Avatar
Member
27 posts
Joined: Feb. 2017
Offline
You are doing strange things. Your @vel is equal to @v.

For Point Wrangle:

if (length(@v) > 0.5) {
    i@group_group1 = 1;
}

For Group Expression Node:

length(@v) > 0.5
Edited by anvdev - Nov. 14, 2017 17:08:05
English is not my native language, sorry in advance for any misunderstanding
User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
The curly brace is only for literals, not variables. Regardless, it is redundant here.

In your group expression node, put into the VEXpression:

length(@v)>0.5

oops, you beat me to it
Edited by jsmack - Nov. 14, 2017 17:09:59
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
In a group expression node you only need to write
length(@vel) < 0.5
in the VEXpression field and set the group type to point, to group the points with length longer than 0.5

-b

And you beat me
Edited by bonsak - Nov. 14, 2017 17:14:56
http://www.racecar.no [www.racecar.no]
User Avatar
Member
45 posts
Joined: Dec. 2016
Offline
Thank you very much

 length(@v)>0.5
Don't work with a group node but it's work on a group expression node.
My bad i have tried this before but i haven't seen they add a group expression node in Houdini 16.


if (length(@v) > 0.5) {
    i@group_group1 = 1;
}
Works very well.
Edited by Efi - Nov. 15, 2017 07:17:27
Jeremy Gurdal
VFX Artrist
  • Quick Links