<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>importing 3d</title>
		<link>http://www.allegro.cc/forums/view/592452</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 26 Jul 2007 09:47:06 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I understand that allefro.cc has thae abilety to suport 3d games but does aneone know if you can inport 3d object files sutch as .3ds files and so on I couldent find any info on it sorry if this is a stupid question.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (flosy1234)</author>
		<pubDate>Wed, 25 Jul 2007 03:42:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s not really a stupid question, but it&#39;s horribly written(since you want to program maybe you should try to write properly or at least try(like I&#39;m doing ^^)).</p><p>And loading &quot;3d objects&quot; is all about knowing or be able to handle the file format. and i know i shouldn&#39;t answer this question since i don&#39;t really have much of a clue but no, there is no function within allegro that allows you to import 3ds files. Find out how to make such an function or use an already written one.</p><p>One more thing, if you&#39;re into 3d, pure allegro is not what you want.<br />Try out AllegroGL. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Albin Engström)</author>
		<pubDate>Wed, 25 Jul 2007 04:30:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I understand that allefro.cc has thablablablablabla
</p></div></div><p>

Allefro, the perfect name for the allegro mascot!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 25 Jul 2007 04:54:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Allefro, the perfect name for the allegro mascot!
</p></div></div><p>
 <br /> <img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/f/0/f06bbb37b75818987c3fb005eb643d9c.png" alt="allefro.png" width="96" height="120" /> ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Wed, 25 Jul 2007 05:02:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>to load a 3D model you will need to <br />a) find already done code to load it (i.e a engine such as Ogre provides this)<br />b) code yourself the loader, I have found that .obj files are the easier to load (for me)</p><p>Allegro does not provide model loading functionality.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kronoman)</author>
		<pubDate>Wed, 25 Jul 2007 05:10:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>But obj provides no animation, correct? Which means you&#39;d need a separate obj file for each frame of the animation, which would waste a lot of space and resources.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elverion)</author>
		<pubDate>Wed, 25 Jul 2007 07:15:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But obj provides no animation, correct? Which means you&#39;d need a separate obj file for each frame of the animation, which would waste a lot of space and resources.
</p></div></div><p>

I think things don&#39;t work like that. I know nothing about 3d game programming, but I can imagine that the animation is done moving the object&#39;s vertices/vertexes using keyframes to interpolate them. I could be mistaken of course.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 25 Jul 2007 07:43:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Way off-topic, but gnolam&#39;s post have just made my day ! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Wed, 25 Jul 2007 10:52:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MD2 is nice and simple, no bones <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (monkeyCode)</author>
		<pubDate>Wed, 25 Jul 2007 12:31:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
since you want to program maybe you should try to write properly or at least try(like I&#39;m doing ^^)
</p></div></div><p>

Maybe if you try a little harder, you&#39;ll hit the shift key every time you press the &quot;I&quot; key. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Wed, 25 Jul 2007 18:22:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
find already done code to load it (i.e a engine such as Ogre provides this)
</p></div></div><p>
I would highly suggest <a href="http://irrlicht.sourceforge.net/">Irrlicht</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GameCreator)</author>
		<pubDate>Wed, 25 Jul 2007 21:59:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The reason that there are no Allegro-specific importers is because Allegro does not have internal data representations for meshes.  It is too low-level for that.   Any importer needs to be customised to the in-memory format.</p><p>I have my own internal format, and code to render this to both Allegro software 3d and OpenGL, but it isn&#39;t flexible enough (yet) to be considered a universal solution.  For example, at the moment I use arrays of V3D_f to store vertices, which were designed for Allegro&#39;s old (and nearly deprecated) 3d routines, and contain c,u&amp;v values for each vertex.  This is not ideal for most models, which have the u,v values stored for each vertex in a face, not once for each vertex in the mesh.</p><p>My plan is to expand my current MESH types from the following</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">typedef</span> <span class="k1">struct</span> MESH_TYPE <span class="k2">{</span>
   <span class="k1">int</span> flags<span class="k2">;</span>
   <span class="k1">int</span> n_verts<span class="k2">;</span>  VERTEX_TYPE <span class="k3">*</span> verts<span class="k2">;</span>
   <span class="k1">int</span> n_edges<span class="k2">;</span>  EDGE_TYPE <span class="k3">*</span> edges<span class="k2">;</span>
   <span class="k1">int</span> n_tris<span class="k2">;</span>  FACE_TYPE <span class="k3">*</span> tris<span class="k2">;</span>
  
<span class="k2">}</span> MESH_TYPE<span class="k2">;</span>
</pre></div></div><p>

and replace them with a universal type
</p><div class="source-code snippet"><div class="inner"><pre>
<span class="k1">typedef</span> <span class="k1">struct</span> MESH_TYPE <span class="k2">{</span>
   <span class="k1">int</span> flags<span class="k2">;</span>
   MESH_VTABLE <span class="k3">*</span> vtable<span class="k2">;</span>   
   <span class="k1">int</span> n_verts<span class="k2">;</span>  <span class="k1">void</span> <span class="k3">*</span> verts<span class="k2">;</span>
   <span class="k1">int</span> n_edges<span class="k2">;</span>  <span class="k1">void</span> <span class="k3">*</span> edges<span class="k2">;</span>
   <span class="k1">int</span> n_faces<span class="k2">;</span>  <span class="k1">void</span> <span class="k3">*</span> faces<span class="k2">;</span>
  
<span class="k2">}</span> MESH_TYPE<span class="k2">;</span>
</pre></div></div><p>

which can be used as the in-memory format for nearly all uses.  If this catches on, it could make it possible to develop universal importers, that do not tie you to external engines like Ogre, irrlicht, etc.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matt Smith)</author>
		<pubDate>Wed, 25 Jul 2007 23:42:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Maybe if you try a little harder, you&#39;ll hit the shift key every time you press the &quot;I&quot; key. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div></div><p>
That doesn&#39;t seem rIght...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonny Cook)</author>
		<pubDate>Thu, 26 Jul 2007 00:11:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">LennyLen said:</div><div class="quote"><p>
Maybe if you try a little harder, you&#39;ll hit the shift key every time you press the &quot;I&quot; key. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div></div><p> I don&#39;t get it... <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Albin Engström)</author>
		<pubDate>Thu, 26 Jul 2007 02:07:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And loading &quot;3d objects&quot; is all about knowing or be able to handle the file format. and <b>i</b> know <b>i</b> shouldn&#39;t answer this question since <b>i</b> don&#39;t really have much of a clue but no, there is no function within allegro that allows you to import 3ds files.
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Thu, 26 Jul 2007 02:29:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ah...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Albin Engström)</author>
		<pubDate>Thu, 26 Jul 2007 03:09:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I understand that allefro.cc has thae abilety to suport 3d games
</p></div></div><p>
Allegro itself? Don&#39;t use its current 3D routines. Use AllegroGL instead.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
does aneone know if you can inport 3d object files sutch as .3ds files and so on
</p></div></div><p>
You can <i>inport</i> simply by loading a file with the stdio library, then read the metadata, then read the vertex/normal/texture information and store it in memory for OpenGL to use.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Thu, 26 Jul 2007 09:47:06 +0000</pubDate>
	</item>
</rss>
