<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — Loading .x models with the irrlicht mod]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=319&amp;type=atom" />
	<updated>2008-04-15T00:59:07Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=319</id>
		<entry>
			<title type="html"><![CDATA[Re: Loading .x models with the irrlicht mod]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1255#p1255" />
			<content type="html"><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; unfortunately im nowhere near knowledgable on models but i took a look and feel that there is an issue somewhere with the .x.&nbsp; i tried the meshviewer tool that comes with the Irrlicht distribution and it couldnt view it.&nbsp; i also tried to load the file in Ultimate Unwrap and it failed with an error.&nbsp; </p><p>for the FPS camera you can use addCameraSceneNodeFPS() instead of addCameraSceneNode().</p><p>to load models in iB3D you would use something like the following:</p><p>Local syd:MESH=ib3d_LoadAnimMesh(&quot;sydney.md2&quot;)<br />Local tex:TEXTURE=ib3d_LoadTexture(&quot;sydney.bmp&quot;)<br />ib3d_EntityTexture(syd,tex)</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2008-04-15T00:59:07Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1255#p1255</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Loading .x models with the irrlicht mod]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1254#p1254" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>node.setMaterialFlag(EMF_LIGHTING, False)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[master20]]></name>
				<uri>https://gprogs.com/profile.php?id=49</uri>
			</author>
			<updated>2008-04-14T01:27:38Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1254#p1254</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Loading .x models with the irrlicht mod]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1253#p1253" />
			<content type="html"><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; the code looks correct.&nbsp; i would wonder about camera positioning and size of the .x mesh (ie too small to see from the current camera angle).&nbsp; i would first try to add a FPS camera instead and look around to see if you can find the model.&nbsp; also, try adding a lightscenenode to see if lighting could be an issue.&nbsp; if all else fails and you dont mind, zip up an example BMX with the .x file and i will take a look.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2008-04-13T21:48:21Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1253#p1253</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Loading .x models with the irrlicht mod]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1252#p1252" />
			<content type="html"><![CDATA[<p>Hello all,</p><p>&nbsp; I am new to both Irrlicht and Blitzmax.&nbsp; I want to thank Gman for this wonderful mod.&nbsp; </p><p>&nbsp; Recently, I tried to modify the Hello World example to load a .X (DirectX) animated model.&nbsp; However, even though the program compiles and runs, the mesh is not displayed.&nbsp; Here&#039;s the code I used.</p><div class="codebox"><pre><code>Local driver:IVideoDriver = device.getVideoDriver()
Local smgr:ISceneManager = device.getSceneManager()
Local guienv:IGUIEnvironment = device.getGUIEnvironment()
 
Local mesh:IAnimatedMesh = smgr.getMesh(&quot;characteranimation3.x&quot;)

If (mesh)
  Print &quot;Mesh loaded succesfully.&quot;
EndIf  



Local node:IAnimatedMeshSceneNode = smgr.addAnimatedMeshSceneNode( mesh )

If (node)
Print&quot;The animated scene node exists!&quot;

EndIf


smgr.addCameraSceneNode(Null, _VECTOR3DF(0,30,-40), _VECTOR3DF(0,5,0))



While(device.run())
    driver.beginScene(True, True, _SCOLOR(255,100,101,140))

    smgr.drawAll()
    guienv.drawAll()

    driver.endScene()
Wend</code></pre></div><p>Both IF commands execute, which means I should be seeing my model.... but I can&#039;t.&nbsp; Can anyone explain this?&nbsp; Any help will be greatly appreciated.</p>]]></content>
			<author>
				<name><![CDATA[master20]]></name>
				<uri>https://gprogs.com/profile.php?id=49</uri>
			</author>
			<updated>2008-04-13T18:04:22Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1252#p1252</id>
		</entry>
</feed>
