<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>How can I load 3d models?</title>
		<link>http://www.allegro.cc/forums/view/383711</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 18 Jul 2004 23:24:13 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t know how can I load 3d models, and if I can make them whith a specific program such as: 3d studio etc....</p><p>tnx a lot at all!<br />and excuse me for my poor English!:&#39;(
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tommy tinpo)</author>
		<pubDate>Thu, 15 Jul 2004 03:21:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Find file format somewhere. Read it and parse into your mesh structure. Where is the problem here? You need to ask a more specific question.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Thu, 15 Jul 2004 03:30:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Right. Just create the data structure to load the data into, then load the file into it, and you&#39;re done.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (23yrold3yrold)</author>
		<pubDate>Thu, 15 Jul 2004 03:33:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I agree with Secretary of State X-G.</p><p>Anyway, for a file format to implement I suggest the Wavefront OBJ format - it&#39;s an ASCII format, and about as simple as a 3d model format can be (at least if you ignore the NURBS stuff). And as a bonus, most decent modelers can export to .obj so you won&#39;t have to write your own converters.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Thu, 15 Jul 2004 03:34:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Grrrr, and I wasted my life on a 3ds importer!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Thu, 15 Jul 2004 03:51:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I understand what you say, but now, can you suggest me some tutorials of allegro opengl or something about 3d programming with allegro?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tommy tinpo)</author>
		<pubDate>Thu, 15 Jul 2004 04:07:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>tutorials about OpenGL: <a href="http://nehe.gamedev.net/">NEHE</a><br />allegrogl version of nehes tutorials: <a href="http://www.allegrodeveloper.org/">http://www.allegrodeveloper.org/</a></p><p>also have a look at the <a href="http://www.gamedev.net/download/redbook.pdf">redbook</a>(programming guide for opengl) and at the <a href="http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/bk02.html">bluebook</a>(reference for opengl)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (FMC)</author>
		<pubDate>Thu, 15 Jul 2004 04:20:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Somebody can suggest me a program to convert 3d models into file to parse into mesh structure. </p><p>thanks a lot at all!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tommy tinpo)</author>
		<pubDate>Thu, 15 Jul 2004 19:23:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
3D models ARE files you can parse into a mesh structure. What do you need?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Thu, 15 Jul 2004 19:24:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm">Game Tutorials</a> scroll down the page, you will find tutorials on how to load some 3d models format in your prog
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (FMC)</author>
		<pubDate>Thu, 15 Jul 2004 19:50:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have another problem... I have a 3d model with 2 animations, how can I use the animations of the model?:P
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tommy tinpo)</author>
		<pubDate>Sat, 17 Jul 2004 01:29:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Load both and display them at the appropriate time, of course.</p><p><i>Ask more specific questions, damn it.</i> <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Sat, 17 Jul 2004 01:29:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Mithrandir I have sent you a private message!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tommy tinpo)</author>
		<pubDate>Sat, 17 Jul 2004 01:52:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Mithrandir I have sent you a private message!
</p></div></div><p>

Ah, the irony...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rampage)</author>
		<pubDate>Sat, 17 Jul 2004 03:41:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ive been trying to load 3D models but I just use someone elses <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />. But the code to load a MD2 format (or MDL or MD3) are like 5 pages long :-\
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 17 Jul 2004 10:59:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So? Start typing! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (deps)</author>
		<pubDate>Sat, 17 Jul 2004 12:17:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I WOULD but, I like stuff to be easy but with control. Thats why I wanna dissect the MD2 Loader and make it a header that I can use in any AllegroGL project... Instead of full on DirectX
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 17 Jul 2004 12:19:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MD2 is actually a pretty easy format to load and display. The downside is that it&#39;s pretty aged and still uses frames and not a skeletal animation system. I hacked up a small MD2 loader last weekend for my game, to see how hard it actually is to load/display them. (see attached file) It uses C++, Allegro and AllegroGL, and it&#39;s not 5 pages long <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /> It could be even shorter by using a single fread to load the data. Anyway, maybe it gets you started.</p><p>Some things to note:<br />- the animation is hard-coded to the single &quot;stand&quot; animation of the model. There&#39;s a list with the different animations and how many frames they use somewhere</p><p>- the animation is a bit bumpy, that&#39;s because only the key frames are displayed, there is no interpolation done</p><p>- it&#39;s my first try at MD2 and 3d models in general, so it&#39;s not perfect <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pantz)</author>
		<pubDate>Sat, 17 Jul 2004 14:08:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hmm, I envy your ability to learn something Im TRYING to learn pantz. I downloaded your MD2 example but I am having problems with Allegro.h for some reason... Never done this before</p><p>--------- EDIT -----------<br />BTW, any other stuff youve integrated into Allegro / AllegroGL that might be useful for me? <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>--------- UPDATE ------------<br />Ok, I fixed the problem by removing the includes to stdio.h and string.h.<br />And it says the FPS is 100 - 130, but I see what you mean by its jumpy. Would you know how to fix it?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 17 Jul 2004 14:45:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do you have vsync on? I get like 1400fps without vsync. To get smooth movement you have to interpolate between the current frame and the next frame. That means computing the vertices of the triangles on your own, depending on the display duration between the single keyframes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pantz)</author>
		<pubDate>Sat, 17 Jul 2004 15:02:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You didnt do that? <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" /></p><p>And NFI whether I do :-\</p><p>--------- EDIT ---------<br />Ok, I think Im having troubles with the fread stuff but thats coz i skipped a chapter in my ironically correct book &quot;Complete Idiots Guide to C++&quot; <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>--------- EDIT 2 ---------<br />Ok, It is starting to make sense as I am using a hex editor + reading the code...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 17 Jul 2004 15:03:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I didn&#39;t implement it because it was just a test and my game will only need few (if any at all) animations, it&#39;s a space shooter <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>But it shouldn&#39;t be that hard to implement it. I think all you have to do is to get the difference between each current vertex and the next vertex, divide this distance by the number of steps (smoothness) and add this number to the current vertex position.</p><p>steps = 10<br />distance = new_x - old_x<br />amount = distance / steps<br />vertex_x = old_x + amount</p><p>for x, y and z. Maybe it&#39;s easier to use vectors though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pantz)</author>
		<pubDate>Sat, 17 Jul 2004 15:38:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Its all making sense now!!! But since I havent read all of MD2.cpp, which function would that go in?<br />Also I dont know what the &#39;status&#39; is of vsync.</p><p>-------- EDIT --------<br />OK, I am getting the hang of this... Are all models loaded like this (but different ways). I mean like they all have structs of vertices, triangles etc and rendered a similar way?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 17 Jul 2004 15:40:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No, some do also feature NURBS and other mathematical surfaces that can either be passed to the GL or transformed into poly&#39;s at run-time.<br />There are also a few games (very few, actually) that use some kind of voxel models, especially for terrain.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Sat, 17 Jul 2004 20:35:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think I mightve hijacked the thread... <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>tommy tinpo: Did you try out pantz&#39;s MD2 (Quake 2 Models) loader?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sun, 18 Jul 2004 03:18:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Have you tried <a href="http://www.levp.de/3d/3ds/intro.html">L3DS</a>?  It&#39;s...a 3ds loading library.  With some type of free-ish license I believe.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jakerohs)</author>
		<pubDate>Sun, 18 Jul 2004 23:24:13 +0000</pubDate>
	</item>
</rss>
