Meshes/Textures aren't showing up! Help!

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
DoritoX
Posts: 16
Joined: Fri Mar 11, 2011 2:16 pm
Location: 144

Meshes/Textures aren't showing up! Help!

Post by DoritoX »

Hey there,

I downloaded a pack of meshes from the internet (with textures) but for some reason, these won't load correctly.
I loaded thousands of other meshes who most of the time load their textures respectively through the .mtl file.

the code i use is:

Code: Select all

IAnimatedMesh *mesh = smgr->getMesh("location/model.?");
IAnimatedMeshSceneNode *node = smgr->addAnimatedMeshSceneNode(mesh);
However, this time i got a few .3DS files (with TARGA textures) and they load up fine in 3DS Max and Blender, however if i load them inside Irrlicht, nothing will show up, even though the debugger says everything is loaded.
With some other models i got in the same package, i get the message: "Found no matching material for Group in 3ds file".

I tried converting them to .OBJ format, it ends up loading the mesh but not the textures (even though the .MTL has them assigned)

Then i tried converting it to .X, and i got the same results as with .OBJ
the confusing part is that everything (with textures) looks perfectly in 3DS Max or Blender so it's kinda weird.

Also I tried rescaling everything but it didnt matter, so that's not the problem.
and in the console window it does say "Texture.....loaded!" and "Mesh....loaded!".

I hope you can help me!

Thanks ALOT!
Last edited by DoritoX on Sat Apr 23, 2011 12:06 pm, edited 3 times in total.
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

what are the settings do you have in blender when exporting?
ent1ty wrote: success is a matter of concentration and desire
Butler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
at a cost measure in computer resources ;)
DoritoX
Posts: 16
Joined: Fri Mar 11, 2011 2:16 pm
Location: 144

Post by DoritoX »

Exporting Options:
for .OBJ ->

Code: Select all

Context = Selection Only
Output Options = RotateX90
Export = Edges, Materials, UV's,Nurbs
Blender Objects as OBJ = keep vert order
for .X ->

Code: Select all

Anim = off
Flop Norm = off
Swap zy = off
Flip z = on
Speed = off

Export All

BI.normals = on
recalc.no = off
no smooth = off
CuteAlien
Admin
Posts: 9720
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Does it also fail when you load it in the Irrlicht meshviewer?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: [NOT SOLVED YET] Meshes/Textures aren't showing up! Help

Post by randomMesh »

I guess you forgot to setup a proper lighting and/or camera. Please show the entire code.
"Whoops..."
DoritoX
Posts: 16
Joined: Fri Mar 11, 2011 2:16 pm
Location: 144

Post by DoritoX »

Entire code is about 500 lines so it's a bit hard to show just like that.
plus the camera must be setup right because it does show other meshes, on top of that, i also tried with a first person camera.
And i left the default lighting, i don't know if that matters

Also in the Irrlicht meshviewer, the model appears WITH texture but it's like.....extremely transparent (if i set the material to solid it shows perfectly, but how do i do that in my gamecode?)

EDIT: by adding the following line of code, i can make the .3DS files appear without needing any conversion, however, the textures still don't show up!!
(note: it's also way bigger this way, in the .OBJ model i had to call "->setScale(vector3df(10,10,10)); to make it look normal size.
now it already looks alot bigger without scaling it

Code: Select all

model->setMaterialType(EMT_NORMAL_MAP_SOLID);
xirtamatrix
Posts: 219
Joined: Fri Feb 19, 2010 4:03 pm
Location: Estonia

Re: [NOT SOLVED YET]Meshes/Textures aren't showing up! Help!

Post by xirtamatrix »

DoritoX wrote:I downloaded a pack of meshes from the internet
If you're just playing around, then its ok. If you're planning to develope some serious game/application, then forget about downloading from internet. Its NEVER a good idea. I strongly suggest creating your own meshes as required by your game/app. When you get into that, you'd be forced to work-out a complete content creation pipe-line, learn about WHY there are multiple formats in the first place and what a format should or should not have that you need or need not. :)

To get you started, start by learning more on Irrlicht materials types.
http://irrlicht.sourceforge.net/docu/cl ... erial.html
to live, is natural; to die, is not!
CuteAlien
Admin
Posts: 9720
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

When the irrlicht meshviewer shows the textures, then there is some problem in your code. And hard to help unless we see what you do. Maybe reduce your code to just the model-loading (but a complete program that compiles).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply