Eyteneyer Posted September 25, 2019 Share Posted September 25, 2019 Hello Forum , i have a question. In project i need to put object on extruded face to move them together. I've done this with just main "dist parameter(float)" myself just add simple expression to "transform Sop" in translate Y It's work with little expression : bbox("../polyextrude ", -D_YMAX)-$YMAX+0.5 --- or --- ch("../polyextrude4/dist") But i go next level with this method and face to Wall of problem.. I try to extrude faces with distance scale "zscale" i've create attrib with "attrib wrangle" and simple expression "f@zscale = fit01(rand(@ptnum), chf('min'), chf('max'));" This works well, this expression move extruded faces randomly by Distance scale - ptnum, but i need to put object on extruded face to move them together. I try cople of methods but they didnt works. Please Help. Extrude_sop_zscale_dist_scale.mov Quote Link to comment Share on other sites More sharing options...
Eyteneyer Posted September 25, 2019 Author Share Posted September 25, 2019 zscale_question.hip Quote Link to comment Share on other sites More sharing options...
Eyteneyer Posted September 25, 2019 Author Share Posted September 25, 2019 I just wont all figures permanently stay on they scuare and control this behaviour with "extrude sop" "distant scale". Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted September 25, 2019 Share Posted September 25, 2019 6 hours ago, Eyteneyer said: I just wont all figures permanently stay on they scuare and control this behaviour with "extrude sop" "distant scale". Hello, maybe is it worth to go the other way? I would made points at the center of each top primitive of the checkerboard after extrusion, and used copy to point sop. This way all figures will be always on top. 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted September 25, 2019 Share Posted September 25, 2019 51 minutes ago, vicvvsh said: I would made points at the center of each top primitive of the checkerboard after extrusion Good idea. Here is an example using point instancing for better performance. chess.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Eyteneyer Posted September 25, 2019 Author Share Posted September 25, 2019 Wow!! Thanks a lot konstantin magnus!! If i do some tutorial for my youtube channel i put your name in discription! Good picture with tests!))) Quote Link to comment Share on other sites More sharing options...
Eyteneyer Posted September 26, 2019 Author Share Posted September 26, 2019 Hello konstantin magnus! Is the any way to copy chess figures on points? Quote Link to comment Share on other sites More sharing options...
Eyteneyer Posted September 26, 2019 Author Share Posted September 26, 2019 (edited) I've done this with "rivet" but its crazy))) May someone know easy way to do such effect? Edited September 26, 2019 by Eyteneyer Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted September 29, 2019 Share Posted September 29, 2019 (edited) Hi Ilya, the instance geometry node offers a more usable approach : https://www.sidefx.com/docs/houdini/nodes/sop/instance.html Assign an arbitrary number of objects in a multiparm block. Then apply random choices to s@instancepath for random distribution. int seed = chi('seed'); int inst_total = chi('instances'); int inst_num = int(rand(@ptnum + seed) * inst_total) + 1; s@instancepath = 'op:' + chs('object_instance' + itoa(inst_num)); f@pscale = chf('scale' + itoa(inst_num)); chess_instancing.hipnc You can read more about instancing here: https://www.toadstorm.com/blog/?p=493 Edited September 29, 2019 by konstantin magnus Quote Link to comment Share on other sites More sharing options...
Eyteneyer Posted September 30, 2019 Author Share Posted September 30, 2019 Thank you again konstantin magnus but this randomise here, i need just a Spanish Opening in chess where figures on their squares should stay ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.