VEX Group Velocity expression (syntax error)
3563
4
0
Efi
Member
45 posts
Joined: Dec. 2016
Offline
Nov. 14, 2017 4:45 p.m.
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
anvdev
Member
27 posts
Joined: Feb. 2017
Offline
Nov. 14, 2017 5:06 p.m.
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:
Edited by anvdev - Nov. 14, 2017 17:08:05
English is not my native language, sorry in advance for any misunderstanding
jsmack
Member
7801 posts
Joined: Sept. 2011
Online
Nov. 14, 2017 5:09 p.m.
The curly brace is only for literals, not variables. Regardless, it is redundant here.
In your group expression node, put into the VEXpression:
oops, you beat me to it
Edited by jsmack - Nov. 14, 2017 17:09:59
bonsak
Member
459 posts
Joined: Oct. 2011
Offline
Nov. 14, 2017 5:09 p.m.
In a group expression node you only need to write
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
Efi
Member
45 posts
Joined: Dec. 2016
Offline
Nov. 14, 2017 5:21 p.m.
Thank you very much
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