Page 1 of 2

version 1.1 - everything is white

Posted: Wed Aug 16, 2006 4:03 pm
by drarem
I change to the 1.1 version and recompile, everything in my project lacks texture and is now white. Any ideas?

Code: Select all

void Screen::LoadMesh(int n, char *fname) {
	actor[n].mesh = smgr->getMesh(fname);
	actor[n].node = smgr->addAnimatedMeshSceneNode( actor[n].mesh );
    strcpy(objs[n].fname, fname);
    objs[n].n = n;

 if (actor[n].node) {
         actor[n].node->setMaterialFlag(video::EMF_LIGHTING, false);
         actor[n].node->setMaterialTexture( 0, driver->getTexture("data/red.bmp") );
 
		selector = smgr->createOctTreeTriangleSelector(actor[n].mesh->getMesh(0), actor[n].node, 128);
		actor[n].node->setTriangleSelector(selector);
		metaSelector->addTriangleSelector(selector);
		selector->drop();


	 actor[n].anim = smgr->createCollisionResponseAnimator(
		selector, actor[n].node, core::vector3df(1,1,1),
      	core::vector3df(0, 0, 0),  core::vector3df(0, 0, 0), 0.0);
   actor[n].node->addAnimator(actor[n].anim);
  actor[n].anim->drop();


 }

}

Posted: Wed Aug 16, 2006 4:48 pm
by magisterrivus
Hi drarem,

i assume you can load your textures (what does the console output tell?).

From what i can see it's that code

Code: Select all

if (actor[n].node)
that is the problem. Could it be that actor[n].node returns false for some reason ?

Bye

Posted: Wed Aug 16, 2006 6:17 pm
by hybrid
This is ok because it checks for null pointers, however it might be better to check the result of getMesh which might fail more easily. Which file format do you use?

Posted: Wed Aug 16, 2006 9:27 pm
by drarem
file formats are one md2 file and a bunch of 3ds files.

Oops, I cut some of the stuff out by accident, but if it is a md2 object it won't setMaterialTexture() as the texture in the 3ds file is already mapped to the object.

if (n==22) then actor[n].node->setMaterialTexture("red.bmp")...,


Now that I look at it again, the MD2 mapping is working, it is the 3ds objects that have gone white.

I need to examine this more and will do a little later. Any more suggestions would be helpful tho, thanks.

Posted: Wed Aug 16, 2006 10:08 pm
by JP
It's probably not loading the textures then, check the console output to see if it's finding the textures or not, maybe they've mysteriously moved :lol:

Posted: Thu Aug 17, 2006 3:09 am
by drarem
I'm getting this type of message:

Code: Select all

Loaded mesh: data\floor.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 12 polys)
Unknown percentage chunk in 3Ds file.
Loaded mesh: data\redframe.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 64 polys)
Unknown percentage chunk in 3Ds file.
Loaded mesh: data\greenframe.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 64 polys)
Unknown percentage chunk in 3Ds file.

I don't get the message 'Unknown percentage chunk in 3Ds file' in the previous version. I am using Anim8or to export the models with textures to 3ds files, <EDIT> I just tried Blender, it is still white.

Posted: Thu Aug 17, 2006 7:49 am
by hybrid
Yes, there are some 3ds files which seem to fail upon some chunk. I have also one of those here, so I'll have a look.

Posted: Fri Aug 18, 2006 2:51 am
by pricj004
I'm experiencing the same thing - however, it works fine on my home computer - an Athon 2100 running a Geforce 2 MX 400 (try to keep the laughter to minimum) but everything is white (except the shadows) on the computers at my University - a P4 3ghz running Intel onboard graphics.

I didn't modify the code at all between tests (used OpenGL on both).

Actually, I just ran it now to find out what graphics drivers the uni computers use, and its working fine now. However, I'm on different computers to the ones I was using last time, and I think the graphics cards are different in this room.

I'm just using the standard Sydney model and terrain for my test.

problem in Irrlicht.net.dll?

Posted: Fri Aug 18, 2006 5:59 am
by jumpingtank
The same occurs in an precompilled example HelloWorld_CSharp.exe. There can be it a problem in Irrlicht.net.dll?

Posted: Sat Aug 19, 2006 11:44 am
by kh_
Same no textures bug here (in windows). It seems to only be in OGL. I also see a definite slow down in the examples (OGL and DX).You've drastically changed something. Irr 1.0 still works fine. Something that might be related is the titlebar shows OGL ver 1.5 in Irr1.0 and OGLv1.1.2 in Irr 1.1.
drarem wrote:I change to the 1.1 version and recompile, everything in my project lacks texture and is now white. Any ideas?
Do all the pre-compiled OGL examples work perfectly for you?

Posted: Sat Aug 19, 2006 1:30 pm
by hybrid
The title bar showed a fixed string in previous versions, now it uses the actual version thing returned from OpenGL :wink:
All things work pretty well here, both for Windows and Linux and all drivers. I'm constantly checking against version 1.0 binaries and did not encounter any slow-down. And also no white textures with the examples, only for some 3ds files from the net.
Please post your driver versions, gfx card, OS, etc. And also the console output (which usually contains driver versions already). One thing changed for OpenGL is introduction of automatic mipmap generation which requires an extension check and otherwise manually created mipmaps. Maybe try to update your driver to get a better OpenGL version.

Posted: Wed Aug 23, 2006 4:45 am
by drarem
If I save the model as a .X using Lithunwrap, the texture shows up.

No one else is having problems with this?

I have latest nvidia driver 91.33 beta, win xp service pack 2, 3.02Ghz w/HT, my opengl drivers should be up to date.

The console output I get is:
Loaded mesh: data\floor.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 12 polys)
Unknown percentage chunk in 3Ds file.

To make a file with a bad chunk, just load up anim8or or blender, make a mesh and texture it, export it to a folder as .3DS along with the texture file to try to load it.

Posted: Tue Aug 29, 2006 12:30 am
by hybrid
I have fixed a problem with the 3ds loader in one of the latest svn revisions which was differently defined in the 3ds standard, but now works for those models which did not load correctly for me. You might want to give this change a try.
BTW: I'll move this to bug report, replacing your second post.

Posted: Sun Sep 10, 2006 5:28 pm
by rbm
Since Irrlicht 1.1 everything is white for me too, I tested the examples. Same is true for the GUI and 2D examples.

I have 2 pc's both with Win98SE and OpenGL 1.1. Both have this problem. The last svn that worked was r51.

What's causing this?

What I have noticed about versions after r51 :
COpenGLTexture::copyTexture sends glTexImage2D and gluBuild2dMipmaps commands that cause my graphics card to return an error, because the "type" parameter that's being sent (GL_UNSIGNED_SHORT_1_5_5_5_REV) only works on OpenGL1.2 and up according to
http://developer.apple.com/documentatio ... e2D.3.html
and
http://developer.apple.com/documentatio ... aps.3.html

Any ideas? Thanks.

Posted: Sun Sep 10, 2006 7:12 pm
by hybrid
Update your OpenGL driver. Using the older code requires lots of texture conversions and will also prevent other things to work properly. Although Irrlicht is said to require OpenGL 1.5 it shoudl suffice to use versions 1.2 or up.