{"id":745,"date":"2023-12-05T09:13:04","date_gmt":"2023-12-05T17:13:04","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=745"},"modified":"2023-12-05T09:18:50","modified_gmt":"2023-12-05T17:18:50","slug":"archived-post-by-toadstorm-26","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2023\/12\/05\/archived-post-by-toadstorm-26\/","title":{"rendered":"Archived post by toadstorm"},"content":{"rendered":"<div class=\"postie-post\">\n<p class=\"\">there&#8217;s some local space fuckery involved with where you put constraint points and what orientation they&#8217;re in. they have to be generated in the rest space of the rbd objects, even if the rbd objects aren&#8217;t in rest space when the constraint is made<\/p>\n<p class=\"\">i built a tool for this in MOPs+, it generates constraints on the fly from collisions. it works roughly like this: &#8220;` \/\/ get position, orientation, and rest xform of impact prims vector P1 = point(1, &#8220;P&#8221;, <a href=\"mailto:i@impactprimnum\" >i@impactprimnum<\/a>); vector P2 = point(1, &#8220;P&#8221;, <a href=\"mailto:i@parentprimnum\" >i@parentprimnum<\/a>); vector rest1 = point(1, &#8220;rest&#8221;, <a href=\"mailto:i@impactprimnum\" >i@impactprimnum<\/a>); vector rest2 = point(1, &#8220;rest&#8221;, <a href=\"mailto:i@parentprimnum\" >i@parentprimnum<\/a>); vector4 orient1 = point(1, &#8220;orient&#8221;, <a href=\"mailto:i@impactprimnum\" >i@impactprimnum<\/a>); vector4 orient2 = point(1, &#8220;orient&#8221;, <a href=\"mailto:i@parentprimnum\" >i@parentprimnum<\/a>);<br \/>\nvector deltaP1 = @P &#8211; P1; vector deltaP2 = @P &#8211; P2;<br \/>\n\/\/ rotate these vectors into the local space of the impacting objects. deltaP1 = qrotate(qinvert(orient1), deltaP1); deltaP2 = qrotate(qinvert(orient2), deltaP2);<br \/>\n\/\/ shift by rest position. these are the local space constraint points. P1 = rest1 + deltaP1; P2 = rest2 + deltaP2;<br \/>\n\/\/ generate a polyline from P1 and P2 and set name attributes to match the two RBD objects being constrained&#8230; &#8220;`<\/p>\n<p class=\"\">the attributes will be different if you&#8217;re not generating stuff from collision points, but the math should be similar<\/p>\n<p>Attachments in this post: <br \/><a href=\"http:\/\/fx-td.com\/houdiniandchill\/wp-content\/uploads\/discord\/20231312\/05\/23\/rbd_runtime_constraints.gif\">http:\/\/fx-td.com\/houdiniandchill\/wp-content\/uploads\/discord\/20231312\/05\/23\/rbd_runtime_constraints.gif<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>there&#8217;s some local space fuckery involved with where you put constraint points and what orientation they&#8217;re in. they have to be generated in the rest space of the rbd objects, even if the rbd objects aren&#8217;t in rest space when the constraint is made i built a tool for this in MOPs+, it generates constraints &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2023\/12\/05\/archived-post-by-toadstorm-26\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by toadstorm<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/745"}],"collection":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/comments?post=745"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/745\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}