Hi
I'm trying to sort some random point attribute values (“curveu”) and map them back to the points in a sorted fashion. Not sorting points, only attribute values. So in an Attribute Wrangle (Detail) i have this code:
int num_points = npoints(0);
float pt_att;
float list;
float list_two;
for (int i=0; i<num_points;i++){
list = point(0, “curveu”, i); // Filling the array
}
printf(“Array: %g\n”,list);
printf(“Sort: %g\n”,sort(list));
for (int n=0; n<num_points;n++){
//setpointattrib(0, “curveu”, n, (float)list, “set”); // Set attribute again
setattrib(0, “point”, “curveu”, n, n, list, “set”); // Set attribute with other method
list_two = point(0, “curveu”, n); // Filling the other array
}
printf(“New array: %g\n”,list_two);
The last print statement “New array” should print the attribute “curveu” in a sorted fashion but it doesn't. Why does the last print statement print the initial order of the attribute values?
Any help appreciated.
-b
Found 444 posts.
Search results Show results as topic list.
Technical Discussion » Q: Sort attributes
- bonsak
- 459 posts
- Offline
Houdini Indie and Apprentice » ForEach and Rop Output Driver Problem
- bonsak
- 459 posts
- Offline
Ok. I see how the if tests are evaluated if i use printf instead
As to your other problems, i don't know.
-b
As to your other problems, i don't know.
-b
Houdini Indie and Apprentice » ForEach and Rop Output Driver Problem
- bonsak
- 459 posts
- Offline
Hi
I'm not sure if your supposed to be able to pass point attributes into a Fluid Source directly like that. Correct me if i'm wrong.
This might have to do with resolution but your attribute wranglers #1 an #2 are not catching anything:
if (@xxxxxxxx > .23) {
i@tooslow = 1;
s@_debug = “too_slow”;
}
else {
s@_debug = “pass”;
}
if ( @tooslow == 1) {
removepoint (0, @ptnum) ;
s@_debug = “remove”;
}
I tried this code and “s@_debug” is always set to “pass” for all points.
-b
I'm not sure if your supposed to be able to pass point attributes into a Fluid Source directly like that. Correct me if i'm wrong.
This might have to do with resolution but your attribute wranglers #1 an #2 are not catching anything:
if (@xxxxxxxx > .23) {
i@tooslow = 1;
s@_debug = “too_slow”;
}
else {
s@_debug = “pass”;
}
if ( @tooslow == 1) {
removepoint (0, @ptnum) ;
s@_debug = “remove”;
}
I tried this code and “s@_debug” is always set to “pass” for all points.
-b
Technical Discussion » VEX concatenate @group_ + chs()
- bonsak
- 459 posts
- Offline
Thanks a lot! Big aha moment with the bindings tab.
- Added one groupbinding with “Group Name” set to `chs(“grpname”)` (the userfield)
- and VEX Parameter set to “group”
- Then in the code: @group = 1;
Thanks.
-b
- Added one groupbinding with “Group Name” set to `chs(“grpname”)` (the userfield)
- and VEX Parameter set to “group”
- Then in the code: @group = 1;
Thanks.
-b
Technical Discussion » VEX concatenate @group_ + chs()
- bonsak
- 459 posts
- Offline
Thanks.s@my_group = itoa(@group) + “_” + chs(“groupname”);
results in an attribute called “my_group” where the value is set to “0_mygroup” (from the chs())
I think i might have to rethink naming the group like this.
-b
results in an attribute called “my_group” where the value is set to “0_mygroup” (from the chs())
I think i might have to rethink naming the group like this.
-b
Technical Discussion » Cinema 4D Houdini Plugin Not Detecting Houdini
- bonsak
- 459 posts
- Offline
Take a look in this thread:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=42310 [sidefx.com]
-b
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=42310 [sidefx.com]
-b
Technical Discussion » VEX concatenate @group_ + chs()
- bonsak
- 459 posts
- Offline
Thanks. I've tried that as well. @group is not a string so it errors with:
Call to undefined binary operator ‘string = float + string’
It's kind of un logical that @group_groupname is a float. I expected it would be an int.
I've also tried with:
s@my_group = “@group” + “_” + chs(“groupname”);
But that results in an attribute called my_group with the value set to “_bound_group_mygroup”
So it's not as easy as it seems.
-b
Call to undefined binary operator ‘string = float + string’
It's kind of un logical that @group_groupname is a float. I expected it would be an int.
I've also tried with:
s@my_group = “@group” + “_” + chs(“groupname”);
But that results in an attribute called my_group with the value set to “_bound_group_mygroup”
So it's not as easy as it seems.
-b
Technical Discussion » VEX concatenate @group_ + chs()
- bonsak
- 459 posts
- Offline
Thanks. The problem with addprimattrib is that it doesn't add a group (at least not in the attributewrangle), it just add an attribute with the name “group_mygroup”
If i use the virtual variable @group_mygroup = 1; i get an attribute(group) with the name of group:mygroup listed in the spreadsheet.
-b
EDIT:
substituting the underscore with a colon makes it work:
int index = 1;
string result = concat(“group:”, chs(“groupname”));
addprimattrib(geoself(), result, index, “set”);
EDIT2:
I was wrong. Doesn't work with colon.
If i use the virtual variable @group_mygroup = 1; i get an attribute(group) with the name of group:mygroup listed in the spreadsheet.
-b
EDIT:
substituting the underscore with a colon makes it work:
int index = 1;
string result = concat(“group:”, chs(“groupname”));
addprimattrib(geoself(), result, index, “set”);
EDIT2:
I was wrong. Doesn't work with colon.
Technical Discussion » VEX concatenate @group_ + chs()
- bonsak
- 459 posts
- Offline
Hi
I have an attributewrangle:
if (@primnum < 15) {
concat(“@group_”, chs(“groupname”));
}
This doesn't work and produces no group.
How can i concatenate “@group_” with the user input chs(“groupname”) ?
Is it possible to build @group_groupname programatically?
-b
I have an attributewrangle:
if (@primnum < 15) {
concat(“@group_”, chs(“groupname”));
}
This doesn't work and produces no group.
How can i concatenate “@group_” with the user input chs(“groupname”) ?
Is it possible to build @group_groupname programatically?
-b
3rd Party » qLib - an open source asset library for Houdini
- bonsak
- 459 posts
- Offline
3rd Party » qLib - an open source asset library for Houdini
- bonsak
- 459 posts
- Offline
rivieraOps didn't read the wiki. Thanks.
- yes, place it in the experimental folder (but the process is described in the wiki)
rivieraPull request
- what's PR?
-b
Houdini Indie and Apprentice » Any way to keep Point Vops sync ?
- bonsak
- 459 posts
- Offline
3rd Party » qLib - an open source asset library for Houdini
- bonsak
- 459 posts
- Offline
Hi.
Great initiative!
If i want to contribute, i fork the dev branch and:
- If i make a new otl do i place it in the experimental folder? Or how do you want this organised?
- Do you want PR's in the dev branch or in separate pr issue branches?
-b
Great initiative!
If i want to contribute, i fork the dev branch and:
- If i make a new otl do i place it in the experimental folder? Or how do you want this organised?
- Do you want PR's in the dev branch or in separate pr issue branches?
-b
Houdini Indie and Apprentice » C4D Alembic Into Houdini
- bonsak
- 459 posts
- Offline
Houdini Indie and Apprentice » C4D Alembic Into Houdini
- bonsak
- 459 posts
- Offline
One level deeper:
/obj/alembicarchive1/Camera_Bake_Smooth/Camera_Bake_SmoothShape
Go to the view tab and then delete the keyframe on the Far Clipping channel.
-b
/obj/alembicarchive1/Camera_Bake_Smooth/Camera_Bake_SmoothShape
Go to the view tab and then delete the keyframe on the Far Clipping channel.
-b
Houdini Indie and Apprentice » C4D Alembic Into Houdini
- bonsak
- 459 posts
- Offline
As for scale, i'm using cm in c4d and set export scale in the alembic export options window to o,o1cm when saving abc. That way i don't have to do any scaling in Houdini.
A 100cm from c4d then matches a 1 unit cube in Houdini. 1 unit in Houdini is 1 meter.
-b
A 100cm from c4d then matches a 1 unit cube in Houdini. 1 unit in Houdini is 1 meter.
-b
Houdini Indie and Apprentice » C4D Alembic Into Houdini
- bonsak
- 459 posts
- Offline
- Go to the “Camera_Bake_SmoothShape” node inside the alembic hierarchy
- Be on frame 1
- Ctrl+LMB to delete the keyframe for Far Clipping Plane on the view tab, and add a 0 so you get 1000000
> Then i can see the cube and the BG_PLANE
Does that work?
-b
EDIT: Added “Far Clipping Plane on the view tab,” on line 3
- Be on frame 1
- Ctrl+LMB to delete the keyframe for Far Clipping Plane on the view tab, and add a 0 so you get 1000000
> Then i can see the cube and the BG_PLANE
Does that work?
-b
EDIT: Added “Far Clipping Plane on the view tab,” on line 3
Edited by - Dec. 10, 2015 17:48:49
Houdini Indie and Apprentice » C4D Alembic Into Houdini
- bonsak
- 459 posts
- Offline
Does it look ok when you see through it in houdini?
I seem to remember that this used to be a problem but i thought it was solved by maxon i think. What versions are you using?
Mind sharing the abc file? With just the camera maybe?
-b
I seem to remember that this used to be a problem but i thought it was solved by maxon i think. What versions are you using?
Mind sharing the abc file? With just the camera maybe?
-b
Technical Discussion » Attribute Wrangle: Get node name from @OpInput2?
- bonsak
- 459 posts
- Offline
Technical Discussion » Attribute Wrangle: Get node name from @OpInput2?
- bonsak
- 459 posts
- Offline
Thanks, Did you mean like this?:
s@debug = opname(opinputpath(“.”, 1));
If i use that in an attribute wrangle i get “Call to undefined function opname”. Does that mean it doesn't work in the wrangle context?
-b
s@debug = opname(opinputpath(“.”, 1));
If i use that in an attribute wrangle i get “Call to undefined function opname”. Does that mean it doesn't work in the wrangle context?
-b
-
- Quick Links