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.
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:
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.
[fixed] Collada Texture, Position and Transparency bugs
If you need someone else to test it by all means PM me.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.
1) You currently need to make sure EVERYTHING is textured, that INCLUDES backfaces, otherwise it will not load.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.
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.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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.
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.