version 1.1 - everything is white

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
drarem
Posts: 81
Joined: Mon Mar 06, 2006 4:40 am
Contact:

version 1.1 - everything is white

Post 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();


 }

}
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post 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
under construction
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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?
drarem
Posts: 81
Joined: Mon Mar 06, 2006 4:40 am
Contact:

Post 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.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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:
Image Image Image
drarem
Posts: 81
Joined: Mon Mar 06, 2006 4:40 am
Contact:

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
pricj004
Posts: 9
Joined: Fri Jul 28, 2006 6:52 am

Post 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.
jumpingtank
Posts: 1
Joined: Fri Aug 18, 2006 5:49 am

problem in Irrlicht.net.dll?

Post by jumpingtank »

The same occurs in an precompilled example HelloWorld_CSharp.exe. There can be it a problem in Irrlicht.net.dll?
kh_
Posts: 78
Joined: Fri May 19, 2006 4:29 pm

Post 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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
drarem
Posts: 81
Joined: Mon Mar 06, 2006 4:40 am
Contact:

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
rbm
Posts: 3
Joined: Sun Sep 10, 2006 4:59 pm

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply