<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13061" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-08-31T03:09:31+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13061</id>

		<entry>
		<author><name><![CDATA[RorschachGames]]></name></author>
		<updated>2020-08-31T03:09:31+00:00</updated>

		<published>2020-08-31T03:09:31+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43091#p43091</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43091#p43091"/>
		<title type="html"><![CDATA[Re: Soft Body Cloth Simulation Stretching Problem]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43091#p43091"><![CDATA[
I finally brought myself to downloading and building the Bullet Physics project examples. Would have saved me a whole lot of time if I did that from the beginning.  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br>I was using CreateFromTriMesh, when I should have been using CreatePatch. <br>That not only works, but it is also a whole lot easier to implement too. The nodes are in order and easy to set to OpenGL vertices.<br>The only plus to all the time I spent on this was that I learned a lot. So I guess it was not all a waste.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13758">RorschachGames</a> — Mon Aug 31, 2020 3:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[RorschachGames]]></name></author>
		<updated>2020-08-29T13:23:36+00:00</updated>

		<published>2020-08-29T13:23:36+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43089#p43089</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43089#p43089"/>
		<title type="html"><![CDATA[Soft Body Cloth Simulation Stretching Problem]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43089#p43089"><![CDATA[
I have a simple flat mesh made up of many triangles to simulate a curtain. Each vertex is a node. I am able to set up physics and it behaves as you would expect for the most part. When ran, it collapses and appears to be cloth (for the most part).<br>When I take the top row of vertices and set their mass to 0.0f they do not move as one would expect. However, the rest of the vertices in the mesh continue to fall, stretching the curtain.<br><br>Do I need to link each node of the curtain to each other so the nodes don't continue to fall?<br>(Parts of the code below is cut and pasted from various sources as I was looking for any combination that could possibly work.)<br><div class="codebox"><p>Code: </p><pre><code>btSoftBody * psb = btSoftBodyHelpers::CreateFromTriMesh(*worldInfo,&amp;fVerts[0],&amp;iMeshIndices[0],msh-&gt;iFaceCount);btSoftBody::Material* pm = psb-&gt;appendMaterial();psb-&gt;m_cfg.kDP = 0.0;psb-&gt;m_cfg.kDF = 0.0;psb-&gt;m_cfg.kMT = 0.0;psb-&gt;m_cfg.kCHR = 0.0;psb-&gt;m_cfg.kKHR = 0.0;psb-&gt;m_cfg.kSHR = 0.0;psb-&gt;m_cfg.collisions = btSoftBody::fCollision::SDF_RS + btSoftBody::fCollision::CL_SS + btSoftBody::fCollision::CL_SELF;psb-&gt;m_cfg.piterations = 1;psb-&gt;m_materials[0]-&gt;m_kLST = 0.1;psb-&gt;m_materials[0]-&gt;m_kAST = 0.1;psb-&gt;m_materials[0]-&gt;m_kVST = 0.1;psb-&gt;setPose(true, true);psb-&gt;generateBendingConstraints(2);psb-&gt;randomizeConstraints();psb-&gt;getCollisionShape()-&gt;setMargin(0.5);((btSoftRigidDynamicsWorld*)world)-&gt;addSoftBody(psb);</code></pre></div>Here is an example of what I mean:<br><img src="https://static.wixstatic.com/media/b44d2a_5042178c3b5243de84c55ab069ff93ea~mv2.png" class="postimage" alt="Image"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13758">RorschachGames</a> — Sat Aug 29, 2020 1:23 pm</p><hr />
]]></content>
	</entry>
	</feed>
