Varaya Posted February 4, 2022 Share Posted February 4, 2022 Is it possible to access primintrinsics in dops? I have Geometry wich is transformed by a sim. For the second rbd sim i want to make the geometry look at a particular direction. For example to its original direction. So I deleted all Attributes from the first sim to prevent side effects and connected it in to the second sim. To make it look to a direction i want to use the poplookat node (target is direction) in dops. I enabled VEXpression. This is my VEXpression setup: target = {1,0,0}; refdir = v@xdir; up = {0,1,0}; refup = v@ydir; Now i need the original X direction and the Y direction from my Geo. I could convert the primintrinsic "transform" matrix to the directions, but somehow it is not possible to do that in dops. is there any solution? Quote Link to comment Share on other sites More sharing options...
Follyx Posted February 5, 2022 Share Posted February 5, 2022 one solution is using a SOPGEO, in some cases a sopsolver also would help. Quote Link to comment Share on other sites More sharing options...
Librarian Posted February 5, 2022 Share Posted February 5, 2022 21 hours ago, Varaya said: Is it possible to access primintrinsics in dops? @Varaya Packed geometry already give you primintrinsics ... in dops using particles you can access those ..Please post your file and some one with more experiences can help you .. //geometry wranG popforce f@age += @TimeInc; int i = chi('activate'); if (i == 1) { //measure distance between point and rest vector p1 = point(0,"P", @ptnum); vector p2 = point(1,"P", @ptnum); vector pivot = primintrinsic(1,"pivot", @primnum); setprimintrinsic(0, "pivot", @primnum, pivot, "set"); float dist = distance(p1,p2); if (dist < (1+@age/3)) { //set mix value float mix = .1; f@mix += mix; // blend transformation matrix matrix m1 = getpackedtransform(0, @primnum); matrix m2 = getpackedtransform(1, @primnum); matrix m3 = slerp(m1,m2,mix); setpackedtransform(0,@primnum, m3); //deactivate stuff if (dist < .3) @active = 0; if (@mix > 5) @group_ignore = 1; } } Quote Link to comment Share on other sites More sharing options...
Varaya Posted February 5, 2022 Author Share Posted February 5, 2022 @Librarian thx for your visual reply. I created a scene file, wich is representing and explaining the situation. example_scene.hipnc Quote Link to comment Share on other sites More sharing options...
Varaya Posted February 6, 2022 Author Share Posted February 6, 2022 @Librarian your code is pretty helpful i think. But can you share your node setup, so i can view the code in context? Im not experienced enough to get it work. Thank you Quote Link to comment Share on other sites More sharing options...
Librarian Posted February 6, 2022 Share Posted February 6, 2022 @Varaya Have Fun. Quote Link to comment Share on other sites More sharing options...
Varaya Posted February 6, 2022 Author Share Posted February 6, 2022 @Librarian I will. Thank you very much! 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.