how to group polygon by its primitive attribute
10588 6 2- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
I have a geometry composed of several polygons, each of them has an attribute called “area” of which the value ranges from 0 to 1.
how can I group the polygons of which the “area” attribute is larger than 0.5?
I've tried according to Peter Quint's video tutorial by using “group geometry” node and the “Group by Expression” option. Howerver, the expression of “$AREA > 0.5” doesn't seem to work.
Thanks!
how can I group the polygons of which the “area” attribute is larger than 0.5?
I've tried according to Peter Quint's video tutorial by using “group geometry” node and the “Group by Expression” option. Howerver, the expression of “$AREA > 0.5” doesn't seem to work.
Thanks!
- Pagefan
- Member
- 519 posts
- Joined:
- Offline
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
thanks, pagefan!
please see the example file as attached:
1. the bgeo file which contains the polygons with various primitive attributes
2. the hip file which import the bgeo file
I'm trying to use the “group geometry” node to group those polygons of which the “SkyEF” attribute is larger than 20, and somehow it didn't work.
Can you kindly help to take a look and tell me what's wrong?
Thanks!
please see the example file as attached:
1. the bgeo file which contains the polygons with various primitive attributes
2. the hip file which import the bgeo file
I'm trying to use the “group geometry” node to group those polygons of which the “SkyEF” attribute is larger than 20, and somehow it didn't work.
Can you kindly help to take a look and tell me what's wrong?
Thanks!
- graham
- Member
- 1908 posts
- Joined: Nov. 2006
- Offline
The problem is that your attribute doesn't have a local variable attached to it, so your expression fails. There's two ways you could fix it:
1. Create a local variable then use it in your expression
2. Use a primitive() expression instead.
Attached is a file with both methods.
1. Create a local variable then use it in your expression
2. Use a primitive() expression instead.
Attached is a file with both methods.
Graham Thompson, Technical Artist @ Rockstar Games
- Pagefan
- Member
- 519 posts
- Joined:
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
Thank you so much, guys!
I've learn at least five ways to deal with the problem.
As Pagefan suggested, I've checked the original hip file where the attributes in the bgeo file are originall created and from which the bgeo file is saved out.
It seems that after the geometry and their attributes are saved out from the original hip file to bgeo file, the “Custom Variable Mappings” for the attributes will be lost and I guess that's the source of the problem posted here.
Thanks again!
I've learn at least five ways to deal with the problem.
As Pagefan suggested, I've checked the original hip file where the attributes in the bgeo file are originall created and from which the bgeo file is saved out.
It seems that after the geometry and their attributes are saved out from the original hip file to bgeo file, the “Custom Variable Mappings” for the attributes will be lost and I guess that's the source of the problem posted here.
Thanks again!
-
- Quick Links