tious13 Posted September 18, 2015 Share Posted September 18, 2015 Hi, I would like to deform an organic tissue using some force applyed to a specific point. I have some trouble explaining it so if you can take a look to the attached file It might help understand what I'm trying to achieve. On a simple sphere converted to organic tissue I'd like to have a point of the surface pushing toward a rivet placed on the other side of the sphere, thus deforming and pushing the sphere. Being really new to houdini I don't know if such effect is achievable and in what ways. If anybody has a clue on where to begin or maybe direct me to some similar post/tutorial it would help a lot ! Thanks Quote Link to comment Share on other sites More sharing options...
merlino Posted September 19, 2015 Share Posted September 19, 2015 If I understand it right, you should create a solid object with relatively low stiffness. Then wire a sbd pinconstraint in dops, after the finite element solver. In that node you can select the point constrained and animate it. I think is the simplest way. Cheers! Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 19, 2015 Author Share Posted September 19, 2015 (edited) Thanks for you reply, gonna try it right away ! Yes it's definitly what I'm looking for , but this adds more questions: how can I get the position of one point of my sphere and inject it into the sbd pinconstraint position (the idea is to have the sbd pinconstraint doing nothing while being activated) and then have some kind of slider to change between the sphere point position to the rivet position (or simply another point position of the sphere) ? Edited September 20, 2015 by tious13 Quote Link to comment Share on other sites More sharing options...
merlino Posted September 19, 2015 Share Posted September 19, 2015 I think (but I'm not 100% sure about it) you can punt on the point positions the expression point() The syntax is point( surface_node , point_number , attribute , index ) so suppose you found useful your point "354", the expression should be point("TO/SURFACE/NODE", 354, "P", 0) 0 stays for x, as 1 for y and 2 for z as they are the components of the P vector. Also, you can group the point at sop level, transform it there, and reference it with an expression with `pointlist(.......)` (remember to use the ``) where you put the point numbers in the sbd constarint node in dop. Aaaaaalso, you can upload you actual file so and I can help better Quote Link to comment Share on other sites More sharing options...
Jason Posted September 20, 2015 Share Posted September 20, 2015 If you want to do this for more than a single point: You can also use the 'fexternal' point attribute if you want to apply custom forces per point, or the vary the pintoanimation attribute for a hard constraint effect, and use targetstiffness for a soft constraint effect. https://www.sidefx.com/docs/houdini14.0/nodes/dop/finiteelementsolver Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 20, 2015 Author Share Posted September 20, 2015 (edited) thanks guys, it's a lots to take in I'm really new.. I might need waaay more time than it should to understand simple expressions I'm gonna study those options, meanwhile, here is my hip file FEM_force.hip Edited September 20, 2015 by tious13 Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 20, 2015 Author Share Posted September 20, 2015 (edited) trying the point() method, I con't make it work, because referencing the point of my sphere creates a loop that immobilize it completely instead of following the simulation. Gonna take a look to Jason's method, applying a force instead of constraining a position might looks better, but once again I have no idea how to setup things. edit: how should I use it ? in SOP I plug an attributecreate on a group of point called "fexternal". the attribute must be a vector. Once this is done how can I orient my vector toward the centroid of my sphere at each frame ? FEM_force_point.hip Edited September 21, 2015 by tious13 Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 22, 2015 Author Share Posted September 22, 2015 (edited) Could someone explain how to use the fexternal attribute ? or direct me to a link where it is explained ? my google skils have failed me on this one... Why cant I animate this value ? fexternal.hipnc Edited September 22, 2015 by tious13 Quote Link to comment Share on other sites More sharing options...
merlino Posted September 22, 2015 Share Posted September 22, 2015 To use the fexternal attribute you should use a multisolver: plug into the multi solvers input a sop solver and there you can feed the system with the attribute you create and animate in sop. I asked about that a few days ago, look here: http://forums.odforce.net/topic/23758-solid-object-dynamic-map-attribute/ About the pin constraint, in sop you can put a transform node that works just for your point and animate that point there. Then in dop, you can reference that xform node, not the dopimport node. It should works. Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 22, 2015 Author Share Posted September 22, 2015 Thanks a lot Merlino ! I'm gonna take a look at this Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 23, 2015 Author Share Posted September 23, 2015 I've tryed to understand what you did but I still can't, could you take a look to my hip file and see where I did wrong ? Moreover, when looking at your Hip file I don't understand how you animated your stiffness, I kinda got that you made 2 values and switching between them I guess but can't figure out how, can you enlighten me ? Thanks fexternal_sopsolver.hipnc Quote Link to comment Share on other sites More sharing options...
merlino Posted September 23, 2015 Share Posted September 23, 2015 To animate in my example I imported the 2 values, created at sop level, into the sop solver. Then mixed into the attribvop, with the mix node. That way was simple to animate that value. About the fexternal, look here: fexternal_sopsolver_animated_fexternal.hipnc Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 24, 2015 Author Share Posted September 24, 2015 Alright thanks I understand your shapestiffness much better now, whereas for your last file the imput in fexternal +Y changes nothing, 0 - 999999999 + sin(x) gives the same result. Maybe I can't understand properly, anyway I'm gonna keep trying to learn how to do it.. Your help is very valuable, thanks again ! Quote Link to comment Share on other sites More sharing options...
merlino Posted September 24, 2015 Share Posted September 24, 2015 Actually if you look at attribcreate1 > RMB > spreasheet you can see the value changing a lot, the expression is sin(($F-1)*20)*100000 and that's why the ball is bouncing that strange way Cheers! Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 24, 2015 Author Share Posted September 24, 2015 My bad, I was on houdini 14.... so I had the bug where the fexternal weren't used by the FEM solver. it is now working I can animate the value of my fexternal parameter thanks to you. But its at object scale level. Now I need to specify the orientation of the force based on a vector from two points of the surface, ad apply the force to only one point. In VOP I use a parameter node to get some point position, i wish to enter this expression: point("defgeo.bgeo", "P", 3) but I don't know how to sepecify wich component I want. Quote Link to comment Share on other sites More sharing options...
merlino Posted September 24, 2015 Share Posted September 24, 2015 (edited) Matthieu, look at your "point" syntax and look http://forums.odforce.net/topic/23772-applying-force-to-fem-point/#entry139781 for the correct syntax EDIT: I just realized it's in VOP, so you have to promote that parameter to reference it outside the VOP context Edited September 24, 2015 by merlino Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 25, 2015 Author Share Posted September 25, 2015 (edited) I think (but I'm not 100% sure about it) you can punt on the point positions the expression point() The syntax is point( surface_node , point_number , attribute , index ) so suppose you found useful your point "354", the expression should be point("TO/SURFACE/NODE", 354, "P", 0) 0 stays for x, as 1 for y and 2 for z as they are the components of the P vector. Also, you can group the point at sop level, transform it there, and reference it with an expression with `pointlist(.......)` (remember to use the ``) where you put the point numbers in the sbd constarint node in dop. Aaaaaalso, you can upload you actual file so and I can help better Thanks; I can now animate my fexternal at will and have it influence my Dop sym. Sorry but above you explained me how to apply it only to a group but I don't really understand how. you mean, at sop I create a group containing the points I wish to apply fexternal to; and in VOP, using the expression `pointlist(..)` output fexternal to them ? in that case where/how do I use 'pointlist' ? Here is my hip file FEM_fexternal_working.hipnc Edited September 25, 2015 by tious13 Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 28, 2015 Author Share Posted September 28, 2015 Based on the hip file above, how can I export my fexternal from VOP to a specified group on my geo ? Thanks Quote Link to comment Share on other sites More sharing options...
merlino Posted September 28, 2015 Share Posted September 28, 2015 (edited) Well, I think you can create the group at sop level, then, in the sopsolver - attribvop1 specify the group you created. It should works that way. EDIT: looking at your attribvop1, you can allway subtract two (or more vectors) without the need to separate his components. Houdini automatically detect you'r using vector and the operation will be a vector subtraction, or a scalar multiplication enventually. No need to separate the components, just subtract the vectors, in your case Edited September 28, 2015 by merlino Quote Link to comment Share on other sites More sharing options...
tious13 Posted September 29, 2015 Author Share Posted September 29, 2015 You're damn right once angain ! Thanks for your answer and for the tips 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.