eistan Posted December 17, 2017 Share Posted December 17, 2017 (edited) Im looking for function or code how to add points on surface by vex or python, if it possible, like the Stroke node do! Or at least expand this node and see how it works (its locked). Actually Im trying to create basic hand scatter (that exist in most 3d soft) where you can pick on surface and create point, only one, by each clicking left mouse, and when you hold it, you can move this point on surface, but this is the next level, and even create a orient for this point =) Btw I created this with Stroke node and vex, but Stroke node is too slow with much points and create too much extra attributes Ps I know about Spray Paint, and its not exactly what i need, i want to create one point at time and move it on surface or change orient, thats it, Spray create only a bunch of points with random position and orientation. If somebody want this asset let me know, ill upload it here, but u can create it yourself, on GIF only 2 nodes you need, stroke and wrangle with this code int points[] = primpoints(0, @primnum); @up = point(0, "P", points[0])-point(0, "P", points[-1]); foreach(int x; points[1:len(points)]) removepoint(0, x); Edited December 17, 2017 by eistan Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted December 18, 2017 Share Posted December 18, 2017 AFAIK the stroke node is your way to interact with brushes of any kind unless you want to go down to HDK. Also, is it really slow? For a point by point operation? Upload your file, that's interesting Quote Link to comment Share on other sites More sharing options...
eistan Posted December 18, 2017 Author Share Posted December 18, 2017 its not so slow but quit enough to see it, anyway in my case i didnt do anything complex in my project, about 10-20 points, but when it would be about 50-100 its a problem i think here is the link https://drive.google.com/file/d/1VabGmzkV_afqQdAteFuXwlEMVL2HMIwB/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted December 18, 2017 Share Posted December 18, 2017 (edited) I couldn't make yours work , but here's a different take on it. I can't really see how this can be slow orient_with_stroke_odf.hip If the stroke node gets too big, you can use the Stash SOP to save your current state to it and start over, in fact, you probably want to do something like that anyway Edited December 18, 2017 by vtrvtr Quote Link to comment Share on other sites More sharing options...
eistan Posted December 18, 2017 Author Share Posted December 18, 2017 (edited) in your example i have delay after click mouse, about 1 sec or less, its not even close to interactive method =) if u download my hda asset u see only 2-3 node inside and without foreach cuz its too slow, better dont use it if it possible. Stash SOP do the same thing as lock Null node, and its not interactive, im trying to make a system where u dont have to paint big curve line by hand with so many attributes and points, but just 2 points, first one to create the main point and the second one to pick direction and holding it to see where your object look at I actually found great function selectPositions this is what i need! and made some Python code with it, but this code not interactive too, u cant see where the objects look when u create a direction by second point, i dont know how to make it interactive and how use it inside Python node maybe, if it possible Here is the new version hda https://drive.google.com/file/d/15Cy5Q3wnLnLC5aDBfdyufH3RT01nHoXz/view?usp=sharing the Python code on hda node in Type Parameter Click on Scatter button every time you need new object, and this is the second problem im trying to solve, the first one to make it interactive to see where the objects look while holding and moving second point direction Edited December 18, 2017 by eistan Quote Link to comment Share on other sites More sharing options...
eistan Posted December 18, 2017 Author Share Posted December 18, 2017 edited previous post by adding working simple and useful hda asset instead of just Python code Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted December 18, 2017 Share Posted December 18, 2017 The delay is because I didn't make an asset, so you need to display the curves while cooking. If you make an asset, no delay at all. I got tired of clicking before it got any speed difference. stroke_ori_todelete.hda 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.