stephenl Posted March 17, 2012 Share Posted March 17, 2012 What is a quick way to make an attribute stay the same after it receives a value. I get data from dops on frame 8 and I want the value to stay the same after the collision ends on the next frame. I've tried this in a detail attribute create: if collision happens get data if not be equal to this detail But it erases on the next frame. Thanks. Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted March 17, 2012 Share Posted March 17, 2012 SOP Solver is the way to go, or in Houdini 12 you can take advantage of the Solver SOP. Do a quick search and you will get plenty results on how to handle this! best, Manu Quote Link to comment Share on other sites More sharing options...
stephenl Posted March 17, 2012 Author Share Posted March 17, 2012 (edited) I forgot to mention it is in a SOP solver. I just need an expression that holds a value once it receives one. I'm sure it is something simple I can't think of Edited March 17, 2012 by stephenl Quote Link to comment Share on other sites More sharing options...
SpencerL Posted March 17, 2012 Share Posted March 17, 2012 On 3/17/2012 at 1:30 PM, stephenl said: I forgot to mention it is in a SOP solver. I just need an expression that holds a value once it receives one. I'm sure it is something simple I can't think of Probably would help to see a file, but one thing to make sure is that you are not creating the attribute inside the sop solver before doing the check or else each frame the attribute would get reset. Best to create any attrs before feeding it into the solver. Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted March 17, 2012 Share Posted March 17, 2012 You can try: if ($COLLISION == 1,$DATA,detail(surface_node, attrib_name, attrib_index)) But like Manuel said this will be reseted at the next frame to maintain accumulation of the values you have to use SOP solver. I hope this helps. Cheers! Quote Link to comment Share on other sites More sharing options...
stephenl Posted March 18, 2012 Author Share Posted March 18, 2012 (edited) Edit: I got it to work. Use apply data with empty data going into the data input, and modify data after apply data. In modify data create 3 variables, x,y,z and now the expression works. I was trying to get fields to hold values but I guess you can't and actually need data. if( dopfield($DOPNET, 1, "Impacts", "Impacts", 0, "positionx") != 0, dopfield($DOPNET, 1, "Impacts", "Impacts", 0, "positionx"), dopoption($DOPNET, $OBJID, "hitpos", "x")) where hitpos is the name of the data and x is the name of the subdata Edited March 18, 2012 by stephenl Quote Link to comment Share on other sites More sharing options...
Sifis Posted January 18, 2013 Share Posted January 18, 2013 On 3/18/2012 at 2:36 AM, stephenl said: Edit: I got it to work. Use apply data with empty data going into the data input, and modify data after apply data. In modify data create 3 variables, x,y,z and now the expression works. I was trying to get fields to hold values but I guess you can't and actually need data. Hey Stephen, Can you post a simple hip using this trick? 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.