Jump to content

Expression madness


Recommended Posts

Hi there, actually I'm trying to group edges by point positions. This isn't working so far at all. But as a first step I'm trying to group points by expressions.

 

While @P.x>0.1 works, (@P.x+@P.z)>0.1 doesn't. A - ha?!?!

 

@length{@P.x,@P.y,@P.z}>0.1

@length(@P.x,@P.y,@P.z)>0.1

@length{@P}>0.1

@length(@P)>0.1 work neither.

 

Well, don't quite get it and Google doesn't find anything either. Anyone who can shed some light? If there's a way to select edges like this directly I'd be also glad to get some info.

 

Only found this thread and wonder whether this is still state of the art. http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=19493 Cheers Tom

Edited by Pancho
Link to comment
Share on other sites

Remember, you can not use variables inside of braces, only constants. Try using the VEX function set instead.

 

It also seem like you are trying to use VEX code in an hScript field of the Group node.

They are different languages and are not compatible.

Edited by Atom
Link to comment
Share on other sites

Woooooooo - ooooooooow!

 

Thanks sooooo much! That's really a lot of useful information I can pull out of this scene!

 

In ten minutes I'll know whether I can solve all the problems I got in my scene!

 

Very generous!

 

Cheers

Tom

Link to comment
Share on other sites

Hello Pancho,

just to add another way. If you prefer to use nodes, you can use method decribed here . in post  by mawi.

Or just use bind export in attribute vop to export some attribute, which you'll use later in 'combine' tab of Group SOP. If you have some complex criteria, expression probably isn't the best way....

Edited by amm
Link to comment
Share on other sites

Hi Anto,

thanks for the tip. Seems like you aren't struggling as much as me. : )

Some things over here seem to be over complicated, while the procedural modeling looks much smoother and sooo much faster than ICE topology. Miss those simple "Get closest location" nodes .....

Cheers

Tom

Link to comment
Share on other sites

Functionality of Softimage ICE "Get closest location" is described by conjunction of 'XYZ distance' and 'Primitive Attribute'. Let's say that XYZ distance' is 'get' part, while 'Primitive Attribute' is similar to ICE 'UV to location', while 'Primitive Attribute' works on meshes, too - 'uv' is defined by borders of each polygon, in case of mesh. If these two are querying different objects, then there's ICE 'reinterpret location to new geometry' functionality. 'XYZ distance' also tells you from which primitive is 'getting'.

Link to comment
Share on other sites

Ahhh, cool trick! I knew you could get group membership in vex with @group_mygroupname, I didn't know you could set it that way too. Eg, group all points with ptnum greater than a slider threshold:

 

if (@ptnum>chi('threshold')) {
 i@group_mygroup=1;
}

 

To get visual feedback, hit '9' in the viewport (or click the 'display group and attribute list' button on the right toolbar of the viewport, towards the bottom), and make sure its in a mode that matches your wrangle mode.

 

Animated gif (click to play)

 

post-7292-0-95500200-1438732205_thumb.gi

 

 

Edited by mestela
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...