arjanM Posted October 27, 2013 Share Posted October 27, 2013 Hi, I am new to this forum and very new to houdini. I have a question about creating an expression for the point node in houdini. I am trying to recreate something I made in maya with the soup nodes. In the soup version of the point node in maya, you can create a variable in the start block, so that I can store values to it for every point. So I can for example create the variable X in the start block and have an expression on the weight parameter like this; if lvar("TX")>2: X=0 X=X+1 So this way the X varable will start counting from 0 when the point went above the value of 2. Is there a way to do this with the point node in houdini? I hope this makes any sense and somebody can help me with this. thanks Arjan Quote Link to comment Share on other sites More sharing options...
tmdag Posted October 27, 2013 Share Posted October 27, 2013 (edited) could you provide some example usage of that expression? what you want to do with that counting variable X ? If you are adding variable per frame, you could use for e.g. sop solver Edited October 27, 2013 by tmdag Quote Link to comment Share on other sites More sharing options...
arjanM Posted October 28, 2013 Author Share Posted October 28, 2013 Hi Albert, I am trying to create a simple building generator. It is something for a personal project of mine, but also a way to learn the program. So it will probably be really inefficient. I want to distribute building parts over a curve. I have an inner corner, outer corner, 3 unit long windows part and a 1 unit long part. I am using the copy node with the stamp function to drive a switch node, where all the building parts are connected with. The weight attribute of the points on the curve drive the switch. Now the outer and inner corners have a different weight value. But between the corners I want to distribute the 3 unit long part as much as will fit and fill the rest with 1 unit long parts. So that is why I want to count the points from every corner so I can divide the counter with the total length between the corners, so I know how many 1 and 3 unit long parts to place. I hope this makes a bit sense to you. Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted October 28, 2013 Share Posted October 28, 2013 (edited) Can't you just separate corners and do separate operation on them? just group corners in one group and rest of the points in another and work with this instead. Edited October 28, 2013 by mantragora Quote Link to comment Share on other sites More sharing options...
arjanM Posted October 28, 2013 Author Share Posted October 28, 2013 I do have a group for all the corners and a group for the inner and outer corners and use them to set the weight value. But to simplify my question, lets say I have 1 line with a variable amount of points. And I want to distribute 2 different objects on this line. 1 object is 3 units long and the other is 1 unit long. So for instance when my line has 10 points, I want to copy the 3 unit long object to point number 1, 4 and 7 and the 1 unit long object on point 10. What would be a simple approach to achieve this? Quote Link to comment Share on other sites More sharing options...
arjanM Posted October 30, 2013 Author Share Posted October 30, 2013 Could it be, that it is not possible in Houdini, to store a value on a point attribute and access that value for the next point? Would that be because everything in Houdini is multithreaded and the point are not calculated sequential? Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted October 31, 2013 Share Posted October 31, 2013 This is perfectly doable but not with just one node. Probably mix of Vops and Sops. Maybe some of the guys sitting in procedural modeling have some ready solution for this problem. Do you want to copy all those elements in a random order or do you plan to copy them in some specific way later? Quote Link to comment Share on other sites More sharing options...
arjanM Posted October 31, 2013 Author Share Posted October 31, 2013 I just need to count the points between one corner till the next. Maybe I try my question in the modelling forum. thanks for the help so far. grtz Arjan 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.