place model in terrain at specific location

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
sunnygraphy
Posts: 44
Joined: Mon Dec 05, 2005 8:15 am

place model in terrain at specific location

Post by sunnygraphy »

Hi..

I am having difficulty in placing my models in Terrain at a predefined locations.

When I use 3ds or .x for scene, I do not have to worry about placing.

But in Terrain, I do not know how to place models there.

Any Comment is big help..


thanks
Elfloard2
Posts: 20
Joined: Sun Jan 22, 2006 4:45 am

Post by Elfloard2 »

For your models, if your using Animated Mesh Scene nodes, then you could do something close to this

IAnimatedMeshSceneNode*Model=smgr->addMeshSceneNode("Fill in Parameters")

then to set the position you would do
Model->setPosition(vector3df("Fill in X,Y,Z chords")


Don’t copy the code i posted, its just a reference.

If I did not answer your question exactly, then please restate the problem because you were not too clear.
sunnygraphy
Posts: 44
Joined: Mon Dec 05, 2005 8:15 am

Post by sunnygraphy »

Hi..

My question was not that one.

When I created my scene using 3ds, I could put all my models on the scene from Max programng.

But When I create scene using CTerrainSceneNode, I was just loading pixels(512 X 512).

So I could not place models at the place I want.


Thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

That's because a TerrainSceneNode just creates the surface to walk on or fly by, not a complete scene with entities and such. Scene loading is available for .irr and collada files, and with an extension also with anim8or files. Otherwise you have to place objects manually/with your own file format.
Last edited by hybrid on Mon Aug 21, 2006 12:43 pm, edited 1 time in total.
sunnygraphy
Posts: 44
Joined: Mon Dec 05, 2005 8:15 am

Post by sunnygraphy »

hybrid wrote:That's because a TerrainSceneNode just creates the surface to walk on or fly by, not a complete scene with entities and such. Scene loading is available for .ii and collada files, and with an extension also with anim8or files. Otherwise you have to place objects manually/with your own file format.


I will save terrain as wrl format then load it from Max and place my model on it . Then load my models in irrlicht.


Thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, that's possible with .irr and Collada files. Otherwise (e.g. with .3ds) you won't get different meshes, but the complete scene is one large object. Probably not what you want.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Or you could look into FreeWorld3D or PnP Terrain Creator.
Image
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Also, I've made a post for a quicker method to get the height on the terrain at a given x and z position.

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14874
Image
sunnygraphy
Posts: 44
Joined: Mon Dec 05, 2005 8:15 am

Post by sunnygraphy »

Spintz wrote:Also, I've made a post for a quicker method to get the height on the terrain at a given x and z position.

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14874

I finally added code for exporting terrain to VRML(wrl) format.
So now I could place my models on the terrain.


thanks
Post Reply