<?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/13238" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-07-15T09:11:51+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Nkp]]></name></author>
		<updated>2021-07-15T09:11:51+00:00</updated>

		<published>2021-07-15T09:11:51+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43493#p43493</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43493#p43493"/>
		<title type="html"><![CDATA[Re: About editing the collision mesh at runtime]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43493#p43493"><![CDATA[
By looking at the SDK and asking questions here, I found it difficult to show or hide parts of the btBvhTriangleMeshShape. <br>I will generate btBvhTriangleMeshShape etc. as many as the number of walls that can be erased and turn it on and off. <br><br>Thank you for the advice!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14034">Nkp</a> — Thu Jul 15, 2021 9:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2021-07-15T01:31:54+00:00</updated>

		<published>2021-07-15T01:31:54+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43492#p43492</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43492#p43492"/>
		<title type="html"><![CDATA[Re: About editing the collision mesh at runtime]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43492#p43492"><![CDATA[
If a known wall should be removable then the the most run-time performative thing to do would be to separate the wall from the rest of the mesh in pre-production and load the scene with two mesh instead of one.   Then you could easily remove (or move) the wall body and leave the rest in place.<br><br>If all walls, or arbitrary parts of a mesh should be deleted on the whim of the player then... you have a different problem and you have to write a much more sophisticated content management system.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Thu Jul 15, 2021 1:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nkp]]></name></author>
		<updated>2021-07-15T00:05:34+00:00</updated>

		<published>2021-07-15T00:05:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43491#p43491</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43491#p43491"/>
		<title type="html"><![CDATA[Re: About editing the collision mesh at runtime]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43491#p43491"><![CDATA[
Thank you for answer.<br>Sorry I didn't write it specifically.  <br>I'm making a game. <br><br>In the game, there will be a wall that disappears (or appear )when Player press the switch. <br>The wall appears and disappears, but doesn't transformation or rotation ,scaling. <br>If it doesn't transform, I wondered if I could use the optimization of BVH of btBvhTriangleMeshShape, so I tried various things.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14034">Nkp</a> — Thu Jul 15, 2021 12:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2021-07-14T18:06:07+00:00</updated>

		<published>2021-07-14T18:06:07+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43490#p43490</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43490#p43490"/>
		<title type="html"><![CDATA[Re: About editing the collision mesh at runtime]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43490#p43490"><![CDATA[
The <strong class="text-strong">btBvhTriangleMeshShape</strong> has an internal <strong class="text-strong">Boundary Volume Hierarchy</strong> (hence the "Bvh" in the name) data structure that is used to optimize queries into the triangle soup.  If you were to dynamically change the triangles in the soup then you'd have to recompute the BVH which is expensive.  As such, the <strong class="text-strong">btBvhTriangleMeshShape</strong> is not a good shape to use for a dynamic mesh... for real-time simulations.<br><br>The <strong class="text-strong">btHeightfieldTerrainShape</strong>, on the other hand, builds its triangles on the fly as needed, so the heightfield values can be dynamic.  The width and height of the heightfield are not dynamic in principle however with care it might be possible to dynamically adjust them... but I can't imagine an inexpensive way to do it.<br><br>A <strong class="text-strong">btCompoundShape</strong> could be used to produce an effectively dynamic concave shape (by moving the convex decomposed parts) however Bullet doesn't support local velocities of sub-shapes and so the collisions against such a dynamic shape would not use the correct velocities in the contacts and the physics would suffer glitches.<br><br>Dynamic concave objects can be done in Bullet using constraints, soft bodies, or multi-body.<br><br>What do you really want to do?  That is, rather than asking about a particular solution (dynamic mesh) maybe you could explain what kind of simulation/game/feature you're trying to achieve.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Jul 14, 2021 6:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nkp]]></name></author>
		<updated>2021-07-11T07:45:06+00:00</updated>

		<published>2021-07-11T07:45:06+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43487#p43487</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43487#p43487"/>
		<title type="html"><![CDATA[About editing the collision mesh at runtime]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43487#p43487"><![CDATA[
I want to edit to a collision mesh at runtime.<br>By watching the tutorial of ConcavePhysicsDemo,<br>I learned that I can move the vertices. <br>But erase or increase the vertices was difficult. <br>I would like to use the edited mesh as a static collision. <br><br>Is there any way? <br>At first, I thought it would be effective to increase or decrease the mesh with btBvhTriangleMeshShape. <br>The btBvhTriangleMeshShape can increase or decrease the mesh at run time.<br>However, I couldn't find a way to increase or decrease the mesh on the already created btBvhTriangleMeshShape and Rigid Body.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14034">Nkp</a> — Sun Jul 11, 2021 7:45 am</p><hr />
]]></content>
	</entry>
	</feed>
