Some noobie questions 'bout maps and character :D

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
NoobieMan
Posts: 14
Joined: Fri Feb 02, 2007 12:31 pm

Some noobie questions 'bout maps and character :D

Post by NoobieMan »

Im very new to Irrlicht, i guess you can see that :D Well anyway i would like to ask about files called .max. I use 3D Studio Max to model everything and now that i have made the first tutorial for Irrlicht (which was pretty easy 8)), i would like to know is it possible to load .max files with Irrlicht? If it aint possible, is it then possible to change .max format to something that Irrlicht supports? Yeah im noob with Irrlicht and yeah im not english, so sorry if you dont understand what im saying, which i hope you do :D

Well, thanks for all replies :)
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Inside 3D Studio MAX IDE you should use not "Save As..." but "Export..." -- there select 3DS file format.

3DS file can be loaded in irrlicht.

p.s.: 3DS file format is partially supported by irrlicht's importer.
NoobieMan
Posts: 14
Joined: Fri Feb 02, 2007 12:31 pm

Post by NoobieMan »

Thanks greenya. Now i faced a new problem. This is not animated mesh so i tried to do this almost same way than 01.Hello World tutorial, but change it a bit. Im hopeless noob... :cry: Well heres the code:

Code: Select all

#include "C:/irrlicht/include/irrlicht.h"

using namespace irr;

using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "C:/irrlicht/lib/Win32-visualstudio/Irrlicht.lib")

int main()
{

	IrrlichtDevice *device =
					createDevice(EDT_OPENGL, dimension2d<s32>(800, 600), 32,
							false, false, false, 0);

	device->setWindowCaption(L"Hello World!");

	IVideoDriver* driver = device->getVideoDriver();
	ISceneManager* smgr = device->getSceneManager();
	IGUIEnvironment* guienv = device->getGUIEnvironment();

	guienv->addStaticText(L"Hello World!",
			rect<int>(10,10,200,22), true);

	IMesh* mesh = smgr->getMesh("C:/cpp/3DTraining1/3DTraining1/obj.3ds");
	IMeshSceneNode* node = smgr->addMeshSceneNode(mesh);

	if (node)
	{
		node->setMaterialFlag(EMF_LIGHTING,false);
	}

	smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));

	while(device->run())
	{

		driver->beginScene(true, true, SColor(0,200,200,200));

		smgr->drawAll();
		guienv->drawAll();

		driver->endScene();
	}

		device->drop();
	return 0;
}
And heres the error: cannot convert from irr::scene::IAnimatedMesh * to irr::scene::IMesh *
Types pointed to are unrelated; conversion requires reinterpret_cast C-style cast or function-style cast.[/code]
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

getMesh returns an IAnimatedMesh* not IMesh*

Then you can use the IAnimatedMesh function:
getMesh (s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)=0

to get an IMesh*

e.g.

IMesh* mesh = smgr->getMesh("C:/cpp/3DTraining1/3DTraining1/obj.3ds")->getMesh(0,255);

I think.
NoobieMan
Posts: 14
Joined: Fri Feb 02, 2007 12:31 pm

Post by NoobieMan »

Thanks alot! Working now properly. Maybe i should add textures to make it look better...
NoobieMan
Posts: 14
Joined: Fri Feb 02, 2007 12:31 pm

Post by NoobieMan »

Sry for double post :( I got a NEW problem. The problem is that my character is not "full". Let the picture speak for itself:

http://img240.imageshack.us/my.php?image=picgk0.jpg

The left arm is missing and boots are missing too. What could be wrong? I have no clue, noob i am.
Athlon_Jedi
Posts: 156
Joined: Wed Jul 21, 2004 4:29 am
Location: Mishawaka, In

check your grouping

Post by Athlon_Jedi »

check to insure all your parts are in the same group in your modeler .

btw which modeling program are you using?
Post Reply