[fixed] Collada Texture, Position and Transparency bugs

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.
Post Reply
Marine
Posts: 5
Joined: Thu Aug 28, 2008 8:01 pm

[fixed] Collada Texture, Position and Transparency bugs

Post by Marine »

I have been trying to load a Google Sketchup KMZ (version 4) into Irrlicht.

So far I add the KMZ as a zip archive to the filesystem, and then load the actual model (Specified in models/KMZFilename.dae).

The bugs are as follows:

1) Major bug: The transparency doesnt work. I had to add _BREAK_ to the string literals in lines 1263 and 1264 to get the model to even display.

2) The model is flipped on the X and Y axis's (Y being upright) as seen in the following screenshot.

Image

3) The model has no textures (They are placed in the kmz archive by google sketchup in the images folder, and then referenced in the dae in the correct folder).

It should look like this:

Image

Code here:

CColladaFileLoader.cpp - http://pb.luahelp.net/1324
Game.cpp - http://pb.luahelp.net/1323


So at the moment i'm currently stuck with no textures. If you want the model / kmz / sketchup file feel free to say.
Marine
Posts: 5
Joined: Thu Aug 28, 2008 8:01 pm

Post by Marine »

-snip-

Didn't work....
Last edited by Marine on Wed Nov 05, 2008 1:57 am, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

So I assume you're using SVN/trunk with the Collada 1.4 loader? The z-axis up patch is far more demanding than what you already did, I have it already almost done. Will commit once I find some time for testing or at least removing the debug code from the loader.
Marine
Posts: 5
Joined: Thu Aug 28, 2008 8:01 pm

Post by Marine »

hybrid wrote:So I assume you're using SVN/trunk with the Collada 1.4 loader? The z-axis up patch is far more demanding than what you already did, I have it already almost done. Will commit once I find some time for testing or at least removing the debug code from the loader.
If you need someone else to test it by all means PM me.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you can use SVN again I can send you the patch.
Troggy
Posts: 1
Joined: Mon Nov 10, 2008 12:00 pm

Post by Troggy »

I'm struggling with similar problems, trying to display Collada exports from Sketchup using irrlicht from SVN. Only it's a bit worse...

ImageImage

It's supposed to look like this:

ImageImage

The screenshot was made with an SVN snapshot of irrlicht I checked out ~30 minutes ago.
Marine
Posts: 5
Joined: Thu Aug 28, 2008 8:01 pm

Post by Marine »

Troggy wrote:I'm struggling with similar problems, trying to display Collada exports from Sketchup using irrlicht from SVN. Only it's a bit worse...

It's supposed to look like this:

The screenshot was made with an SVN snapshot of irrlicht I checked out ~30 minutes ago.
1) You currently need to make sure EVERYTHING is textured, that INCLUDES backfaces, otherwise it will not load.

2) You need to add lighting to get textures to work.

I have a patch here to fix the rotation, but not sure if the author has finished his yet or not.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I've updated the collada loader yesterday, with pretty much fixed already. But I'm open for any suggestion or patch.
Lighting is always enabled in Irrlicht, but you can disable lighting as with all other meshes. The same holds for backfaces. Google Earth models have backface culling disabled usually, but it should not be necessary for all meshes. Textures are also not necessary, we also support vertex colors for uniformly colored faces.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, texture coords are now also fixed.
Post Reply