Page 1 of 2

3DS models hotspots

Posted: Wed Jun 23, 2004 3:20 pm
by BRPAZ
I'm having trouble using some 3DS models. They load OK, but they're all in the wrong positions.

e.g. click to download 3ds file. When I load this into the 3rd person camera tutorial

Code: Select all

mesh = smgr->getMesh("omega.3ds");
p1 = smgr->addAnimatedMeshSceneNode(mesh);
p1->setPosition(core::vector3df(0,0,0));
scene::ISceneNode* p1_target = smgr->addEmptySceneNode(p1);
p1_target->setPosition(core::vector3df(1,0,0));
It's not in the middle of the screen, like some of the other models I've tried...

What's wrong here?

(I'm completely new to this, so it may be an easy solution... :lol: )

Thanks!

Posted: Wed Jun 23, 2004 10:14 pm
by RizzleR
maybe try scaling it ,

p1->setScale(vector3df(0.5,0.5,0.5)

or check the origin of the model
that gave me some problems a few times

or something like that

Posted: Thu Jun 24, 2004 4:36 am
by afecelis
I downloaded your model and tried opening it in different modeling packages that supported 3ds. For my surprise, it appears all torn appart in 3dsmax, gmax, unwrap3d, milkshape3d and characterfx, but my surprise was even bigger when I loaded it into AC3d and loaded up perfectly. To be honest, before opening it in AC3d I thought it was a water tank, only then I saw the nice bot you modeled. From AC3d I exported it as an .x file, opened it with DX mview and re-saved it to .x

I definitely think it's incompatibilities in the 3ds file format. Try .x which seems to be the most optimised file format for Irrlicht.

If you need the .x version I converted, you may get it here:
http://www.theshower.nl/cgi-bin/genesis ... /omega.zip

try this one out and let me know. The code to load it is exactly the same as with 3ds files, just change the extension.

cheers

Sorry for the late reply

Posted: Mon Jun 28, 2004 2:56 pm
by BRPAZ
OK, I loaded it up into the engine. It's now on the floor atleast, but it's not infron of the camera, it's on the right corner of the screen..

I have absolutely no idea how to fix this, or what's wrong. Could you help?

Thanks

Posted: Tue Jun 29, 2004 12:41 am
by dingo
screen shot?

Posted: Tue Jun 29, 2004 8:58 am
by bal
Yeah, I would like an explanation too how you can put models in the right place (x,y,z, where do they start ?)

Scrnshot

Posted: Tue Jun 29, 2004 9:25 pm
by BRPAZ
Image

Yeah, that thing on the right is the bot... :lol:

Posted: Tue Jun 29, 2004 9:45 pm
by Tyn
The vector position you give the node to start/move to is the origin (0,0,0) that the model is relative to in your modelling program.

Posted: Wed Jun 30, 2004 1:02 am
by brpaz
Oh, so (0,0,0) is not the centre for the model in my modelling app?

If so, how can I fix this in e.g. AC3D ( I just downloaded, and it's good cuz it can import/export various types)?

Thanks

Posted: Wed Jun 30, 2004 4:04 pm
by thesmileman
brpaz, in your modeling application there will be a "center" of any object. This may not be what you, me or anyone else thinks as the center of the object. It is usually called the pivot point(3DS Max) and should be able to be adjusted. I do nto know how to use AC3D but in Max you can move this pivot point.

Now that does not mean that the model will still be at 0,0,0 when you load it in Irrlicht. In the modeling application you still much set your model to 0,0,0. NOTE: this location is from the pivot point not nessecarly what is thought of as the center of the model(it could be far far from it).

Hope that helps

Posted: Wed Jun 30, 2004 9:50 pm
by MasterD
Be aware of this pivot point!

Irrlicht Version of February didn't use these and I don't know for sure, if it uses them by now. So, take care when modifing Pivot Points, they can mess your model up in Irrlicht.

But I hope, that these will be recognized in future versions of Irrlicht :D , if they are not supported by now, since they help modeling IMHO.

Posted: Wed Jun 30, 2004 10:57 pm
by Tyn
Or you could just move your model to be in the centre of the origin. 0,0,0 is loaded as whatever point you move the model to and every position in MAX is relative to the point that the model is on. I heard somewhere that modelling in the -ve is bad form but never seen an explination as to why this is so it's probably an old wives tale :)

Posted: Thu Jul 01, 2004 1:41 pm
by BRPAZ
Ah, OK. I have a copy of MAX around, so I'll install it (haven't used it much, been using Maya).

I'll see what happens.

Thanks

Posted: Fri Jul 02, 2004 4:50 pm
by BRPAZ
OK, I've loaded up the model in 3DS 6.

Image

However, it seems to be in the centre of the workarea in this pic. But ingame, it's like this:

Image

What's wrong..?

(He's standing in the air...)

Posted: Fri Jul 02, 2004 5:38 pm
by bal
Scale it down?