<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Bones in OBJ file</title>
		<link>http://www.allegro.cc/forums/view/614718</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 17 Oct 2014 01:03:27 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The Wavefront OBJ 3D file format is remarkably easy to parse, but doesn&#39;t have &quot;bones&quot; (animation matrices).  If I wanted character poses, I&#39;d just have a multitude of meshes from the keyframes (hey, memory is cheap now), but for mechanical movement I&#39;d like something a little smoother.</p><p>The best hack I&#39;ve come up with so far is to create a plane mesh, give it a name with a specific substring such as xxxAXISnn, and the loader would recognize by the name that this isn&#39;t something to render, but specifies a rotation vector.</p><p>The simplest way I can think of is to add a plane, move one vertex to where the rotation takes place, the opposing vertex to where the rotation vector lies, and move the other two vertices to be very near the first vertex is.  The loader would get the distances between the four vertices, and the most distant pair are the axis, with the one having the closest neighbors as the origin, so to speak.</p><p>Maybe this makes it clearer.</p><p><span class="remote-thumbnail"><span class="json">{"name":"608956","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/6\/c6f9c1e83c8392876c43410c3fe0a033.png","w":1166,"h":509,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/6\/c6f9c1e83c8392876c43410c3fe0a033"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/c/6/c6f9c1e83c8392876c43410c3fe0a033-240.jpg" alt="608956" width="240" height="104" /></span></p><p>Anyone have better ideas?  Cookies await.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Tue, 14 Oct 2014 16:20:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think I would leave the plane undistorted and would use its&#39; center position and unified surface normal as the rotation axis.</p><p><span class="remote-thumbnail"><span class="json">{"name":"608957","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/5\/6556af8a218e2eff70b826f7cbd8f9b3.png","w":800,"h":500,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/5\/6556af8a218e2eff70b826f7cbd8f9b3"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/6/5/6556af8a218e2eff70b826f7cbd8f9b3-240.jpg" alt="608957" width="240" height="150" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dennis)</author>
		<pubDate>Thu, 16 Oct 2014 00:11:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;d have a harder time adjusting it to exactly where I want.</p><p>I was hoping that someone would know, for example, how to get Blender to output a line segment, which OBJ does understand, although I don&#39;t know if Blender would support that, either.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 16 Oct 2014 01:05:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/614718/1006087#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>I&#39;d have a harder time adjusting it to exactly where I want.</p></div></div><p>Maybe I do not fully understand what you are trying to do but how is it harder to define just one position and a plane orientation than to define four different positions individually.</p><p>In your example, you already know the position of the center of the wheel, so you could just align the plane position to that.</p><p>But again, maybe I do not fully understand what you want to do.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dennis)</author>
		<pubDate>Thu, 16 Oct 2014 17:13:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/614718/1006100#target">Dennis</a> said:</div><div class="quote"><p> define four different positions individually.</p></div></div><p>I can grab the &quot;home&quot; vertex in Blender and set the position with the transform input widget, and do the same for the vector vertex.  The other two vertices need only be obviously closer to the home vertex.</p><p><span class="remote-thumbnail"><span class="json">{"name":"608960","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/8\/5883ef1d39db6259e4511dac9a116bb0.png","w":635,"h":338,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/8\/5883ef1d39db6259e4511dac9a116bb0"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/5/8/5883ef1d39db6259e4511dac9a116bb0-240.jpg" alt="608960" width="240" height="127" /></span></p><p>[EDIT]</p><p>In other words, the two extra vertices are used to place the &quot;home&quot; (what else would I call it?) vertex.  The loader simply finds which vertex is farthest from the other three, and sets that to the end of the rotation vector, and the vertex that&#39;s farthest from the vector vertex is the home vertex.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 16 Oct 2014 18:15:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes, but... you could set the position and rotation of the plane just as easily in object mode. The position is your &quot;home&quot; and the surface normal of the plane standing on that &quot;home&quot; is the rotation axis.</p><p>If the OBJ format does not contain the plane position and only contains its vertices, you can calculate the plane position by going halfway across the diagonal between the first and the third vertex or second and fourth.<br /><span class="remote-thumbnail"><span class="json">{"name":"608961","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/f\/0f0323ff27b240c20581f93fcf211223.png","w":824,"h":733,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/f\/0f0323ff27b240c20581f93fcf211223"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/0/f/0f0323ff27b240c20581f93fcf211223-240.jpg" alt="608961" width="240" height="213" /></span></p><p>edit:<br />Another word for &quot;home&quot; for the purpose here might be &quot;pivot point&quot; or just &quot;pivot&quot;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dennis)</author>
		<pubDate>Fri, 17 Oct 2014 00:11:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I suppose it looks neater.  Thanks!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Fri, 17 Oct 2014 01:03:27 +0000</pubDate>
	</item>
</rss>
