Page 1 of 1

Where to find 3D model, mesh?

Posted: Mon Oct 04, 2010 3:16 pm
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.

Posted: Mon Oct 04, 2010 3:23 pm
by serengeor
Google for them or model them on your own with modelling tools like Maya, blender, milkshape.

Posted: Mon Oct 04, 2010 3:45 pm
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

Posted: Mon Oct 04, 2010 3:51 pm
by serengeor
Look at the main page Features section to find out what irrlicht is capable of.
Also there is irrb - blender scene exporter.

Posted: Mon Oct 04, 2010 3:59 pm
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

Posted: Mon Oct 04, 2010 4:24 pm
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?

Posted: Mon Oct 04, 2010 4:53 pm
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

Posted: Mon Oct 04, 2010 9:06 pm
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.

Posted: Tue Oct 05, 2010 5:55 am
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

Posted: Tue Oct 05, 2010 12:46 pm
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);

Posted: Tue Oct 05, 2010 1:25 pm
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.

Posted: Tue Oct 05, 2010 1:29 pm
by slavik262
When you say "reflection of light", do you mean Specular highlights?

Posted: Tue Oct 05, 2010 1:38 pm
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 ?

Posted: Tue Oct 05, 2010 2:19 pm
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).