Irredit - black meshs = no texture

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
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Irredit - black meshs = no texture

Post by IrrNoob »

I resently got around to looking at example 15 which gives details about
loading .irr files in Irrlicht.

I'm new to IrrEdit and so after loading the example.irr i made a custom .irr file to see what I could do. The scene calls for the default skybox and a terrain mesh i made out of a .3ds file.

However while making the custom .irr file in IrrEdit, I noticed that the terrain mesh wasn't rendering and the console was telling me it was unable to open the terrain.3ds file nor the texture for the mesh.

I then noticed that the file path was wrong as seen in the console, and tried fixing it in IrrEdit, but after correcting the file path the mesh turns black and will not show its texture, even though now the console says that it is finding the file.

Does anyone know what I'm doing wrong?
Last edited by IrrNoob on Fri Jan 02, 2009 11:06 pm, edited 1 time in total.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Did you add a light?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Post by IrrNoob »

Yes, but nothing is different.
ayboangelus
Posts: 9
Joined: Thu Dec 11, 2008 12:02 am

Post by ayboangelus »

Have you disable your light when you have created your character in 3D.

Try with another.
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Post by IrrNoob »

I used Blender 3d to build a small plane of about a hundred polys and exported it as a .x, 3ds, and md2, but none of these worked.

Something i may need to explain is that the mesh becomes black in IrrEdit, no matter the format or light positioning. It becomes black when I point IrrEdit towards the correct paths of my mesh file.

However, before doing this, my custom grass.jpg texture is showing correctly on the terrain mesh.

but i need to correct the default

Code: Select all

../../../lib/irrlicht-1.5/examples/Game/media/Terrain.3ds
problem the file paths are set to when adding the mesh in IrrEdit, so that the .irr file will read the correct

Code: Select all

c:/lib/irrlicht-1.5/examples/Game/media/Terrain.3ds
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Post by IrrNoob »

ayboangelus wrote:Have you disable your light
Ok, I get what your saying. You want want me to disable the light on the mesh in IrrEdit, correct? In any case this does solve the first problem.
Thanks

But how would I create a light to make light and shadows on the mesh?
ayboangelus
Posts: 9
Joined: Thu Dec 11, 2008 12:02 am

Post by ayboangelus »

try with it :
scenegraph->setAmbientLight (video::SColorf(1.0,1.0,1.0,0.0));


^^

for diffuse light:
scenegraph->addLightSceneNode (0, core::vector3df(0,0,0), video::SColorf(0.4f,0.4f,0.6f,0.0f), 100.0f);
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Post by IrrNoob »

ayboangelus wrote:try with it :
scenegraph->setAmbientLight (video::SColorf(1.0,1.0,1.0,0.0));


^^

for diffuse light:
scenegraph->addLightSceneNode (0, core::vector3df(0,0,0), video::SColorf(0.4f,0.4f,0.6f,0.0f), 100.0f);
Thanks, I'm starting to get the hang of IrrEdit.
Velud
Posts: 6
Joined: Thu Jan 01, 2009 8:01 pm

Post by Velud »

when the program loads a scene, it uses pathes that irredit used. so if texutre was in the same folder as irredit the path was from irredit exe file.
when the program loads scene it try to find texures in own folder.
but I amn't coplitely sure in it.
What can change the nature of man?
zillion42
Posts: 324
Joined: Wed Aug 29, 2007 12:32 am
Location: Hamburg, Germany

Post by zillion42 »

I had black models when exporting from maya, it helped a lot to set the vertex color to white before exporting....
Also in irredit you can set a working directory to reflect the same path as your textures...
hope it helps...
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Post by IrrNoob »

Ive since learned abit about using IrrEdit, its quite simple to learn really, and figured out why my terrain model was turning black, as I had placed no lights in the scene and hadn't figured out how to use the light ray caster doohicky.

Now I'm trying to figure out how to do simple collisions with a .irr file.
I'll make another questionary topic about that in a day or two if I can't figure that out. but so far the models load with terrain shadowed nicely, and it took just a little tinkering to find how to set the radius of a light, for example.
Post Reply