Cal3D Scene Node Devel Thread

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
maldoror
Posts: 5
Joined: Tue Oct 05, 2004 10:51 pm

Cal3D Scene Node Devel Thread

Post by maldoror »

i'm starting this thread to contain all the discussions for development of the cal3d scene node integration.

Design considerations:

* is true to the cal3d design and true to the irrlicht design
* make as easy to integrate into irrlicht as the existing nodes are
* maintain a "frozen" version of the cal3d library to work against (and make it available separate from the cal3d project in case the cal3d project goes away), but attempt to integrate with newer versions of cal3d as well

Action List:
* (maldoror) read up on the irrlicht framework's design. figure this out from the api docu.
* (maldoror) create base node for cal3d instance classes
* (maldoror) figure if necessary to provide framework for cal3d core entities
* (maldoror) setup quick website for this sub project.
* (maldoror) write up requirements for a simple demo showcasing all capabilities of cal3d with irrlicht
* (maldoror) get peops to help

if anyone wants to help and has some experience with irrlicht, in particular with its design philosophy with respect to asset management, please let me know. i'll have a ton of questions.

/r
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

Fire at will with those questions you have and I'll try to answer them. :D

PS. I'm considering writing my own Cal3D node anyway as a sought of learning experience... Hopefully we'll be able to produce something good because Cal3D is a VERY cool animation library and it works well with my collection of UT2003/UT2004 models :twisted:
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

I just tried 32 (!) or so different coordinate tests to see why the heck my model isn't working right. So far I haven't found a combo that works, which is irritating. The model is exported straight from Max 6 using the Cal exporters yet I can't seem to get it to face the right directions in Irrlicht. In max it all looks fine, ie. the front of the model faces forward, but when I try it in Irrlicht it's screwed.
I tried your system and it didn't entirely work. That's why I tried 32 different combinations. Btw, the texture coordianate stuff was useless for me because the model shows up fine using the default TCord settings.
Unfortunately I have no webspace otherwise I'd put up my code. It's Cal3D integrated with the 3rd person camera code. So close...

PS. The model is Gorge from UT2K3 and if you want I can post the coordinate systems I tried.
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

Fook... I got no idea what's up with Irrlicht's coordinate system but this thing refuses to work :?

Code: Select all

tmp.Pos.set(meshVertices[i][0],meshVertices[i][2],meshVertices[i][1]);

tmp.Pos.set(-meshVertices[i][0],meshVertices[i][2],meshVertices[i][1]);
They're the 2 coordinate systems that are the closest. My test app is simple, it has a Cal model and a normal MD2 model running next to each other using a FlyStraight animator. The idea is that when the models are looking the same way then the coordinates are right. However, none of the 32 or so combinations I've tried have worked :?

Code: Select all

	scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
	scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

	scene::ISceneNodeAnimator* anim;

	if (node)
	{
		anim = smgr->createFlyStraightAnimator(core::vector3df(-100,24,25), 
			core::vector3df(100,24,25),10000,true);
		node->addAnimator(anim);
		anim->drop();

		node->setPosition(core::vector3df(10,24,10));
		node->setMaterialFlag(video::EMF_LIGHTING, false);
		node->setFrameLoop(320, 360);
		node->setAnimationSpeed(30);
		node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
	}
	
	myNode = new CCal3DSceneNode("./cal/jugg.cfg",smgr->getRootSceneNode(),smgr,123);

	if (myNode)
	{
		anim = smgr->createFlyStraightAnimator(core::vector3df(-100,24,50), 
			core::vector3df(100,24,50),10000,true);
		myNode->addAnimator(anim);
		anim->drop();

		myNode->setPosition(core::vector3df(0,24,0));
		myNode->init();
		myNode->drop();
	}
That's the main chunk of code from the app, the cal scene node is basically unchanged except for the coordinate changes.

Hope some of this helps :D Very close to getting it right now...
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
maldoror
Posts: 5
Joined: Tue Oct 05, 2004 10:51 pm

Post by maldoror »

is it possible to post an image?

i also read somewhere on the cal3d list (can't find reference right now) about having to do something special when exporting from max.

do a lookup on the cal3d mailing list for "backward texture", "reversed texture" or "upsidedown texture". that's how i found the posting about the textures coming out screwed up when exporting from max
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

The problem isn't with the textures ;) They're fine! Atm, the problem is with the orientation of the model itself! Which is the bug that I want to fix. Textures have always worked fine for me, atleast with the models I'm using. I'd post a pic but you can't post em on this forum :cry:
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

speak to Jox, he made already a flip for axes in the x exporter, may he help a bit...

Imho, it's good to have TWO ways to export bones and weights from blender to irrlicht...

while for me x works perfect already.

the more formats working well (like jox's) the better.
Finally making games again!
http://www.konekogames.com
zola
Posts: 52
Joined: Thu Jul 15, 2004 2:31 pm
Location: switzerland
Contact:

Post by zola »

Is there any progress with this project?
Post Reply