Where to find 3D model, mesh?

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
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Where to find 3D model, mesh?

Post by wsw1231 »

Hi all.
By trying out the tutorials, assume that I have basic understanding of the syntax of this engine, but all the meshes and models are provided by Irrlicht. So, where to find other meshes? or are there any software for me to generate them on my own?

Thanks.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Google for them or model them on your own with modelling tools like Maya, blender, milkshape.
Working on game: Marrbles (Currently stopped).
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

Thanks for your help.
But where can I find out which kinds of file format the engine support?
I tried *.3ds but nothing is shown
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Look at the main page Features section to find out what irrlicht is capable of.
Also there is irrb - blender scene exporter.
Working on game: Marrbles (Currently stopped).
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

IMesh* mesh = smgr->getMesh("3dm-bar_stool.3DS");
IMeshSceneNode* node = smgr->addMeshSceneNode(mesh);

I used the above code but nothing is shown on the screen.

the model comes from http://www.3dm3.com/modelsbank/model335.htm
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

wsw1231 wrote:IMesh* mesh = smgr->getMesh("3dm-bar_stool.3DS");
IMeshSceneNode* node = smgr->addMeshSceneNode(mesh);

I used the above code but nothing is shown on the screen.

the model comes from http://www.3dm3.com/modelsbank/model335.htm
1. did you disabled lighting for the mesh?
2. did you created a camera?
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

1. I have not modified anything about the mesh. I just use those 2 statements.

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

Actually, I am using the code in Hello World program and replace the animated mesh with the one I use
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Load the model with example 9 (meshviewer) or change the driver type from EDT_SOFTWARE to EDT_OPENGL or EDT_DIRECT3D9 for proper display. Also make sure your model is not too large, maybe your inside the mesh.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

wsw1231 wrote:1. I have not modified anything about the mesh. I just use those 2 statements.
you have to either disable lighting of the model or create a light to the scene otherwise the model will look whole black
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

I think I have figured out the problem.
I use addCameraSceneNodeFPS() then press the arrow keys, the mesh will show up.....

However, I do not know why the FPS is so low after loading this mesh....
Also, I have added a statement which include the light but the mesh does not have any reflection of light.
The statements are as follows:

ILightSceneNode* light1 = smgr->addLightSceneNode( 0, core::vector3df(0,400,-200), video::SColorf(0.3f,0.3f,0.3f), 1.0f, 1 );

IMesh* mesh = smgr->getMesh("3dm-bar_stool.3DS");
IMeshSceneNode* node = smgr->addMeshSceneNode(mesh);
node->setMaterialFlag(EMF_LIGHTING, true);
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If the model has *no* reflection of light, you cannot see it. Since you can, there's definitely reflection of light. Maybe you don't have shininess on it. This depends on proper normals and proper materials settings. Don't know about yours.
The FPS can be low because: You have a slow system, you chose the wrong driver, the mesh is too large. Maybe also other things, but those are the most likely ones.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

When you say "reflection of light", do you mean Specular highlights?
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

I am using the model from http://www.3dm3.com/modelsbank/model335.htm

and the result is as follows:
Image

Why is there just one black object????
How can I adjust the light, such that I can see the object like the one shown in http://www.3dm3.com/modelsbank/model335.htm ?
RuggJack93
Posts: 39
Joined: Mon Sep 06, 2010 5:09 pm
Location: Italy

Post by RuggJack93 »

ILightSceneNode* light1 = smgr->addLightSceneNode( 0, core::vector3df(0,400,-200), video::SColorf(0.3f,0.3f,0.3f), 1.0f, 1 );
Well you should at least increase the radius of the light(unless you are using a directional light). 1.0f isn't very much with the position you set for the light, try with 400.0f.

Also, if you want a bit of shininess, tutorial 13.Render to texture shows how to apply it to the mesh material.

Code: Select all

node->getMaterial(0).Shininess = 20.0f; // set size of specular highlights
How can I adjust the light, such that I can see the object like the one shown in http://www.3dm3.com/modelsbank/model335.htm ?
The screenshot you provided (and also all the other screenshots shown in the site) seems that was rendered with the modeling program used by the author of the model (so its implied the use of some shaders like Per-Pixel Lighting or Normal Mapping).
Post Reply