Gabriel_Wolf Posted August 13, 2019 Share Posted August 13, 2019 Hello, Can you help me a little bit? I have an obj file about tetris pieces. I would like to copy randomly one piece to a random point. What is wrong with my setup? Thank you Quote Link to comment Share on other sites More sharing options...
Sepu Posted August 13, 2019 Share Posted August 13, 2019 I can see a couple of things wrong with your setup. Not sure why you have a for each there that you aren't using that is not why isn't working but not needed. Also, your objects that you want to copy they all should be at {0,0,0}. You are using a deprecated technique. I think it will be better if you post .hip Check out MOPs https://www.motionoperators.com/ This as well https://www.toadstorm.com/blog/?p=493 Or have a look at, you are missing some fundamentals Quote Link to comment Share on other sites More sharing options...
Gabriel_Wolf Posted August 14, 2019 Author Share Posted August 14, 2019 Thank you. I will check the video. And I attached my hip file tetris.hiplc Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted August 14, 2019 Share Posted August 14, 2019 (edited) 6 hours ago, Gabriel_Wolf said: Thank you. I will check the video. And I attached my hip file tetris.hiplc Hello, you didn't attach Tetris.obj. This is an example how you can achieve what you want. tetris_01.hipnc Edited August 14, 2019 by vicvvsh Quote Link to comment Share on other sites More sharing options...
Gabriel_Wolf Posted August 14, 2019 Author Share Posted August 14, 2019 First, thank you for your help. And I'm sorry but my hip file was a mess. And this time I attached the tetris obj. The main idea is to copy random pieces of the tetris obj to the points of the cube using the class attribute. tetris.hiplc Tetris.obj Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted August 14, 2019 Share Posted August 14, 2019 29 minutes ago, Gabriel_Wolf said: The main idea is to copy random pieces of the tetris obj to the points of the cube using the class attribute. I've guessed that. What's wrong with my first example? In this new example file I just added transform sop to move pieces to the origin. tetris_02.hipnc Quote Link to comment Share on other sites More sharing options...
Gabriel_Wolf Posted August 14, 2019 Author Share Posted August 14, 2019 It is working. Thank you. Let me ask don't you want to mentoring a couple hours? I pay for it of course. Maybe we could make a skype session or something. It is a really good thing that you showed me how to do that. But my main goal is understand the workflow. And there are some things I don't really undestand in your setup. Mainly the VEX. And my main issue is with the vex. For example I posted another question here where I asked how to add a custom velocity for only particles which are under age 1? And somebody wrote the same solution I've already knew. But I can't write it with vex. Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted August 15, 2019 Share Posted August 15, 2019 16 hours ago, Gabriel_Wolf said: Let me ask don't you want to mentoring a couple hours? I think my level not enough to be a mentor. This forum is the golden mine of knowledge and you can get it for free just should search carefully. 16 hours ago, Gabriel_Wolf said: It is a really good thing that you showed me how to do that. But my main goal is understand the workflow. And there are some things I don't really undestand in your setup. Mainly the VEX. And my main issue is with the vex. For example I posted another question here where I asked how to add a custom velocity for only particles which are under age 1? And somebody wrote the same solution I've already knew. But I can't write it with vex. Workflow of this example is pretty simple. We take points and set randomly attribute i@id, whose value is fit from 0 to quantity of pieces in .obj file. This attribute say “blast2” node if i@class equal to i@id then delete all but not this one. For-loop iterate by points, one point per iteration which number gives us node “meta” from detail attribute i@iteration with expression. detail("../meta", iteration, 0) At each iteration “blast2” with expression `@class=`point("../OUT_pts", detail("../meta", iteration, 0), "id", 0)` takes a point, finds i@id value of the point with number of iteration, and deletes pieces with i@class not equal i@id. Copy to points sop in for-each loop copies that piece to the point which is iterating at this moment. Quote Link to comment Share on other sites More sharing options...
Gabriel_Wolf Posted August 15, 2019 Author Share Posted August 15, 2019 Thank you for the explanation. 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.