{"id":1524,"date":"2011-12-12T22:29:48","date_gmt":"2011-12-12T22:29:48","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=1524"},"modified":"2012-02-23T17:32:14","modified_gmt":"2012-02-23T17:32:14","slug":"rope-2d-defrom","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=1524","title":{"rendered":"Rope 2D Deform"},"content":{"rendered":"<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/devbridge.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/devbridge-300x177.jpg\" alt=\"\" title=\"devbridge\" width=\"300\" height=\"177\" class=\"alignright size-medium wp-image-1787 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/devbridge-300x177.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/devbridge-1024x606.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/devbridge-680x403.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/devbridge.jpg 1505w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>This applies 2D rope type physics to a mesh. The modifier will build a system of masses to form a rope type structure with options for extra stiffness constraints. Then a custom 2d physics system will simulate the rope behavior and the mass positions will be used to update a mesh so allowing for cloth like behavior suitable for objects such as ropes, banners, or rope bridges. This modifier is a beta mod so is subject to a little change and improvement.<\/p>\n<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megarope1.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megarope1.jpg\" alt=\"\" title=\"megarope1\" width=\"243\" height=\"631\" class=\"alignright size-full wp-image-1784 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megarope1.jpg 243w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megarope1-115x300.jpg 115w\" sizes=\"(max-width: 243px) 100vw, 243px\" \/><\/a><\/p>\n<h3>Rope Deform Param Description<\/h3>\n<h4><strong>Rebuild<\/strong><\/h4>\n<p>Click this if a fundamental change to the system hasnt been recognised.<\/p>\n<h4><strong>Floor Off<\/strong><\/h4>\n<p>Not currently used.<\/p>\n<h4><strong>Num Masses<\/strong><\/h4>\n<p>How many masses to use in the system. The more used the finer the end result but more CPU power used, again use the lowest value that gives you the results you need.<\/p>\n<h4><strong>Mass<\/strong><\/h4>\n<p>Mass of the system, each mass in the physics will be this divided by the Num Masses.<\/p>\n<h4><strong>Axis<\/strong><\/h4>\n<p>Axis which to deform the mesh on.<\/p>\n<h4><strong>Stiffness Crv<\/strong><\/h4>\n<p>Adjust the stiffness of the system along the length.<\/p>\n<h4><strong>Stiff Spring<\/strong><\/h4>\n<p>Stiffness spring rate.<\/p>\n<h4><strong>Stiff Damp<\/strong><\/h4>\n<p>Stiffness damp rate<\/p>\n<h4><strong>Spring<\/strong><\/h4>\n<p>Spring rate<\/p>\n<h4><strong>Damp<\/strong><\/h4>\n<p>Damping rate<\/p>\n<h4><strong>Off<\/strong><\/h4>\n<p>Offset of springs in the mesh, used to adjust the floor of say a rope bridge to match the physics masses and links.<\/p>\n<h4><strong>Spring Compress<\/strong><\/h4>\n<p>Add some pre compression to the system<\/p>\n<h4><strong>Bend Springs<\/strong><\/h4>\n<p>Add bend spring constraints to the system.<\/p>\n<h4><strong>Constraints<\/strong><\/h4>\n<p>Add length constraints to the system<\/p>\n<h4><strong>Damping Ratio<\/strong><\/h4>\n<p>Damping ratio for the system, use this instead of damp value.<\/p>\n<h4><strong>Left<\/strong><\/h4>\n<p>Left object transform to constrain system to<\/p>\n<h4><strong>Right<\/strong><\/h4>\n<p>Right object transform to constrain system to<\/p>\n<h4><strong>Weight<\/strong><\/h4>\n<p>Simulate a weight on the system of this mass at the position described below<\/p>\n<h4><strong>Weight Pos<\/strong><\/h4>\n<p>Position of weight across the system<\/p>\n<h3>Physics Params<\/h3>\n<h4><strong>Time Step<\/strong><\/h4>\n<p>Physics update rate, the lower the value the more detailed the physics will be but more CPU power used, find the highest value at which the system perfroms nicely.<\/p>\n<h4><strong>Gravity<\/strong><\/h4>\n<p>Value for Gravity<\/p>\n<h4><strong>Air Drag<\/strong><\/h4>\n<p>How much air resistance to movement there is<\/p>\n<h4><strong>Friction<\/strong><\/h4>\n<p>General friction in the system, damping force really.<\/p>\n<h4><strong>Iterations<\/strong><\/h4>\n<p>How many steps to use to solve the constraints, again keep this value at the lowest needed for a nice result. Higher numbers lead to a stiffer system.<\/p>\n<h4><strong>Method<\/strong><\/h4>\n<p>Which method of integration to use, Verlet is probably the best place to start, if you choose another integrator then you may need to adjust your params. Integrators available:<\/p>\n<ul><strong>Euler<\/strong> &#8211; Euler integration, fast and accurate but can be unstable.<\/ul>\n<ul><strong>Verlet<\/strong> &#8211; Verlet integration, fast and stable.<\/ul>\n<ul><strong>VerletTC<\/strong> &#8211; Verlet time corrected integration, fast and stable should be more accurate than Verlet.<\/ul>\n<ul><strong>MidPoint<\/strong> &#8211; Midpoint integration.<\/ul>\n<h4><strong>Apply Constraints<\/strong><\/h4>\n<p>Toggle constraints being applied.<\/p>\n<h3>Debug Info<\/h3>\n<h4><strong>Display Debug<\/strong><\/h4>\n<p>Show debug info<\/p>\n<h4><strong>Draw Steps<\/strong><\/h4>\n<p>How many steps to use in the debug display lines<\/p>\n<h4><strong>Box Size<\/strong><\/h4>\n<p>Size of mass boxes in the debug<\/p>\n<h3>Rope Deform Class<\/h3>\n<p>[cc lang=&#8221;c#&#8221;]public class MegaRopeDeform : MegaModifier<br \/>\n{<br \/>\n\tpublic float\t\t\tfloorOff;<br \/>\n\tpublic int\t\t\t\tNumMasses;<br \/>\n\tpublic MegaSoft2D\t\tsoft;<br \/>\n\tpublic float\t\t\ttimeStep;<br \/>\n\tpublic float\t\t\tMass;<br \/>\n\tpublic MegaAxis\t\t\taxis;<br \/>\n\tpublic AnimationCurve\tstiffnessCrv;<br \/>\n\tpublic float\t\t\tstiffspring;<br \/>\n\tpublic float\t\t\tstiffdamp;<br \/>\n\tpublic float\t\t\tspring;<br \/>\n\tpublic float\t\t\tdamp;<br \/>\n\tpublic float\t\t\toff;<br \/>\n\tpublic bool\t\t\t\tinit;<br \/>\n\tpublic float\t\t\tSpringCompress;<br \/>\n\tpublic bool\t\t\t\tBendSprings;<br \/>\n\tpublic bool\t\t\t\tConstraints;<br \/>\n\tpublic float\t\t\tDampingRatio;<br \/>\n\tpublic bool\t\t\t\tDisplayDebug;<br \/>\n\tpublic int\t\t\t\tdrawsteps;<br \/>\n\tpublic float\t\t\tboxsize;<br \/>\n\tpublic Transform\t\tleft;<br \/>\n\tpublic Transform\t\tright;<br \/>\n\tpublic float\t\t\tweight;<br \/>\n\tpublic float\t\t\tweightPos;<br \/>\n}[\/cc]<\/p>\n<h3>Video of Rope 2D Deform<\/h3>\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=hyHSERddOWQ&#038;hd=1&#038;fs=1&#038;autoplay=1\" class=\"fancybox-youtube\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/ytropebridge.jpg\" alt=\"\" title=\"Rope Deform Video Click to Play\" width=\"680\" height=\"384\" class=\"aligncenter size-full wp-image-1395 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/ytropebridge.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/ytropebridge-300x169.jpg 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This applies 2D rope type physics to a mesh. The modifier will build a system of masses to form a rope type structure with options for extra stiffness constraints. Then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/1524"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1524"}],"version-history":[{"count":19,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/1524\/revisions"}],"predecessor-version":[{"id":1526,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/1524\/revisions\/1526"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}