mirHadi Posted September 22, 2015 Share Posted September 22, 2015 (edited) hello I can use point sop to add color to y bounding box of an an object using $BBY. but there are complains about point sop functionality and how It is better to use Attribute wrangler or vop sop to do what point sop can do. but I'm not aware of all of it. for example I don't how to add color ( ramp or not) to $BBY of an object using Att W, or Att vop sop. because A W doesn't accept local variables and every variable should be defined first. in general how can replicated the point sop functionality in Att W and Att vop sop.( like color, edge direction.... ) thank you for your time. Edited September 22, 2015 by haaranoos Quote Link to comment Share on other sites More sharing options...
iamyog Posted September 22, 2015 Share Posted September 22, 2015 In an attribWrangle set to point mode: vector _pos = relbbox(@P); // _pos is a local variable to this attributeWrangler @Cd = _pos; // @Cd is an attribute on your geometry. @Cd is a vector attribute so you would normally have to declare it as so by prefixing the @ with the type: v@Cd but since Cd is a known attribute, the type casting is automatically done for you by H The list of know attributes and the character to prefix your attributes with depending on your needs here: (scroll down to Accessing Geometry Attributes) http://www.sidefx.com/docs/houdini14.0/vex/snippets 1 Quote Link to comment Share on other sites More sharing options...
mirHadi Posted September 22, 2015 Author Share Posted September 22, 2015 thank you very much Iamyog! very helpful. I began to read more about it . Quote Link to comment Share on other sites More sharing options...
old school Posted September 22, 2015 Share Posted September 22, 2015 (edited) The Attribute Wrangle SOP is a good replacement of the Point SOP as you can quickly write any attribute relationship simply and it will evaluate much faster with larger datasets. To expand on iamyog's response and exactly answer your question, you can set BBY to say the green color by doing: @Cd = set(0, relbbox(@P).y, 0); or a longer form like vector pos = relbbox(@P); @Cd.y = pos.y; Edited September 22, 2015 by old school 1 Quote Link to comment Share on other sites More sharing options...
mirHadi Posted September 22, 2015 Author Share Posted September 22, 2015 old school , thank you. always helpful. yes that was exactly what I wanted to ask. so you recommend doing this in A W or A vop sop rather than Point sop yes? In fact I red a post that most of the Houdini users are shifting completely to use Attribute wrangler or Attribute vop sop instead of Point sop. I suppose there are technical terms for that and seems logical. but there is no clear reference to replicated all of the point sop functionality into A W or A vop sop. is there any reference to do like particle forces and point edge direction .. etc in A W or A vop sop or I (as a beginner) need to do a lot of reading and try and error to get there? Quote Link to comment Share on other sites More sharing options...
Diego A Grimaldi Posted September 22, 2015 Share Posted September 22, 2015 haaranoos, to put it in simple words, yes Wrangles are faster and slowly replacing the functions of many nodes. Main reason being that vex is a multi-threaded language so on high points/poly/ect count it evaluates faster than anything else. For a quick intro on transitioning I'd suggest you watching this video Ruben made recently Good Luck! Quote Link to comment Share on other sites More sharing options...
mirHadi Posted September 23, 2015 Author Share Posted September 23, 2015 sweet!! thank you Diego! watching right away. Quote Link to comment Share on other sites More sharing options...
mirHadi Posted September 23, 2015 Author Share Posted September 23, 2015 I watched the video and something's strange to me... around 15:00 , He adds a new solver sop to replicated the other sop , he uses the Prev_Frame output to the second input of Attribute wrangler. , and plugs the input 1 output to the first input of Att wrangler , which doesn't exist!!. I'm a little confused and I don't understand what he says no matter how many times I listen to him... why is this connected this way ? please help me out. Quote Link to comment Share on other sites More sharing options...
anim Posted September 23, 2015 Share Posted September 23, 2015 first input is live geometry coming to Solver setups like that are common to get updating geometry from upstream SOPs, just update some attributes from Prev_Frame to keep the history of whatever Solver is solving Quote Link to comment Share on other sites More sharing options...
mirHadi Posted September 23, 2015 Author Share Posted September 23, 2015 thank you anim! so is it common? so I missed something along the way, may be I didn't see any tutorial about it. please tell me if there is a tutorial about this kind of setup...... Quote Link to comment Share on other sites More sharing options...
Diego A Grimaldi Posted September 23, 2015 Share Posted September 23, 2015 Inside the Solver Sop you have the 4 object merge from top (the ones you plug onto the Solver Sop) and the Prev Frame node. Those Object Merge are basically just reading whatever it's plugged on top. Put down a Solver Sop and check it out, it's quite simple. Quote Link to comment Share on other sites More sharing options...
mirHadi Posted September 23, 2015 Author Share Posted September 23, 2015 (edited) yes ... sorry. I've mistaken it with something else .. It works as It should. thank you Edited September 23, 2015 by haaranoos 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.