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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2013-04-16T13:07:24+00:00</updated>

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

		<entry>
		<author><name><![CDATA[pildanovak]]></name></author>
		<updated>2013-04-16T13:07:24+00:00</updated>

		<published>2013-04-16T13:07:24+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30513#p30513</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30513#p30513"/>
		<title type="html"><![CDATA[Re: sweep body test in blender 3d]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30513#p30513"><![CDATA[
I still didn't get any answer here <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>and allraedy have a different question:<br>Can the convex sweep test be faster when searching just for first hit instead of all hits? I didn't find out if and how.<br><br>but - I realized an interesting thing. Convex sweep against a btGimpactMeshShape is actually a bit faster than against  btBvhTriangleMeshShape...<br>and, build time for such shape is many times faster, almost nothing compared to the bvh version...<br><br>all measurments have been done inside of blender, so it may be blender specific, I have to still find what kind of broadphase blender uses.<br><br>I will be glad for ANY answer <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> since It seems to me I am talking to myself on this forum. Maybe I am asking wrong questions?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=34">pildanovak</a> — Tue Apr 16, 2013 1:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pildanovak]]></name></author>
		<updated>2013-04-09T15:13:30+00:00</updated>

		<published>2013-04-09T15:13:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30456#p30456</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30456#p30456"/>
		<title type="html"><![CDATA[Re: sweep body test in blender 3d]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30456#p30456"><![CDATA[
I decided to post the code, maybe someone can help? I am thinking if the fact that I have to create a convex shape from the collision shape can be a problem? I don't know how not to do this.<br>I will be glad for any help...<div class="codebox"><p>Code: </p><pre><code>void RB_body_convex_sweep_test(rbDynamicsWorld *world, rbRigidBody *object, const float loc_start[3], const float loc_end[3], float v_location[3],  float v_hitpoint[3],  float v_normal[3]){btRigidBody *body = object-&gt;body;btCollisionShape *collisionShape = body-&gt;getCollisionShape();if (collisionShape-&gt;isConvex()){btConvexShape* convexShape = (btConvexShape*) collisionShape;btCollisionWorld::ClosestConvexResultCallback result(btVector3(loc_start[0], loc_start[1], loc_start[2]), btVector3(loc_end[0], loc_end[1], loc_end[2]));btQuaternion obRot= body-&gt;getWorldTransform().getRotation();btTransform rayFromTrans;rayFromTrans.setIdentity();rayFromTrans.setRotation(obRot);rayFromTrans.setOrigin(btVector3(loc_start[0], loc_start[1], loc_start[2]));btTransform rayToTrans;rayToTrans.setIdentity();rayToTrans.setRotation(obRot);rayToTrans.setOrigin(btVector3(loc_end[0], loc_end[1], loc_end[2]));world-&gt;dynamicsWorld-&gt;convexSweepTest(convexShape, rayFromTrans, rayToTrans, result);if (result.hasHit()){v_location[0]=result.m_convexFromWorld[0]+(result.m_convexToWorld[0]-result.m_convexFromWorld[0])*result.m_closestHitFraction;v_location[1]=result.m_convexFromWorld[1]+(result.m_convexToWorld[1]-result.m_convexFromWorld[1])*result.m_closestHitFraction;v_location[2]=result.m_convexFromWorld[2]+(result.m_convexToWorld[2]-result.m_convexFromWorld[2])*result.m_closestHitFraction;v_hitpoint[0]=result.m_hitPointWorld[0];v_hitpoint[1]=result.m_hitPointWorld[1];v_hitpoint[2]=result.m_hitPointWorld[2];v_normal[0]=result.m_hitNormalWorld[0];v_normal[1]=result.m_hitNormalWorld[1];v_normal[2]=result.m_hitNormalWorld[2];}}}</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=34">pildanovak</a> — Tue Apr 09, 2013 3:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pildanovak]]></name></author>
		<updated>2013-04-09T08:48:15+00:00</updated>

		<published>2013-04-09T08:48:15+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30449#p30449</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30449#p30449"/>
		<title type="html"><![CDATA[Re: sweep body test in blender 3d]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30449#p30449"><![CDATA[
Good news is I got it working inside blender. <br>Bad news is, for my purpose the performance is not stellar and I am sometimes getting inprecise results.<br><br>My use case is - I am developing a CAM addon, where I need to check a convex primitive(Sphere, Cone, Cylinder, Capsule), against a (sometimes very complex) mesh collider. (Imagine a cutter milling a sculpture, running exactly along it's surface)<br><br>I have two questions:<br>1<br>Is there a way to optimize such case with Bullet ? If I have now e.g. a 60000 faces mesh, and I test it with the primitive, it can now take up to 10 seconds to take 1000 tests. In Unity engine, I can get up to 10000 tests done per second on a similar case. I am quite sure bullet can run much faster, but don't know where to start...I tried to split the mesh in various ways, but so far i didn't find out any way to do it. <br><br>2.<br>what is "optimal" scale for bullet - I noticed that when I run the objects in small sizes (e.g. I test a 3mm primitive against a 40cm mesh), I get imprecisions. I am curious at what sizes I would get best possible precision, which is what interests me.<br><br>Thanks<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=34">pildanovak</a> — Tue Apr 09, 2013 8:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pildanovak]]></name></author>
		<updated>2013-03-25T15:30:52+00:00</updated>

		<published>2013-03-25T15:30:52+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30339#p30339</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30339#p30339"/>
		<title type="html"><![CDATA[sweep body test in blender 3d]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30339#p30339"><![CDATA[
Hello, I am curious if the sweep test can be done for many positions with an efficient way.<br><br> I am using blender to create paths for a cnc machine with a new addon for bleder:<a href="http://blendercam.blogspot.cz/" class="postlink">http://blendercam.blogspot.cz/</a> ,<br>  and I would love to use bullet for collision.<br><br> It would be mainly testing the same primitive against same mesh x thousands to millions of times. So, I would like to have a function to which I would pass an array of all positions to get tested, then get the results, or test them one by one if performance is similar. <br><br>Can anybody hint me how to start? Blender allready uses bullet for rigidbody simulation, and I would like to make this optimally an python API function, so that it is versatile for various uses with blenderCAM.<br><br>Thanks for any answer.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=34">pildanovak</a> — Mon Mar 25, 2013 3:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
