FIXED: Vertex Lightmapping problem in Irrlicht?
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
FIXED: Vertex Lightmapping problem in Irrlicht?
Hi, I've decided to render some of my small geometry in my level as a VertexMap in Gile[s]. I've saved the object as a B3D but when I reload the object in IRREdit the mesh is corrupted totally.
I never had problem with Pixel Light map. Is Irrlicht able to interpret theses informations or is the B3B loader that can't read those Vertices Lightmap correctly?
I never had problem with Pixel Light map. Is Irrlicht able to interpret theses informations or is the B3B loader that can't read those Vertices Lightmap correctly?
Last edited by christianclavet on Fri Sep 09, 2011 4:07 pm, edited 2 times in total.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Here are some screen to show what is happening.
Here the scene is fully lit with Lightmaps:
Here is the scene is lit with some object with vertex light maps
(chairs)
All the objects were saved as a .B3D file. It load back correctly in Gile[s]. But the vertices are completely mixed up when loading back in IRRedit (Will surely do the same in IRRlicht)
I wanted to use Vertex Ligthmaps for some detailed objects and only keep the Lightmaps for big surfaces (floor, walls, ceiling). Can this be a problem with the .B3D loader? (If this technique is not supported, the information should be discarded, but its messing the vertices)
Here the scene is fully lit with Lightmaps:
Here is the scene is lit with some object with vertex light maps
(chairs)
All the objects were saved as a .B3D file. It load back correctly in Gile[s]. But the vertices are completely mixed up when loading back in IRRedit (Will surely do the same in IRRlicht)
I wanted to use Vertex Ligthmaps for some detailed objects and only keep the Lightmaps for big surfaces (floor, walls, ceiling). Can this be a problem with the .B3D loader? (If this technique is not supported, the information should be discarded, but its messing the vertices)
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi. Thanks.
Here is the model, the lightmaps, and the textures used.
It was rendered with Gile[s] 1.36 then exported as a B3D file.
Each object that that had part that were vertex shaded got corrupted like the picture I've provided.
Here is the link to the file: http://www.clavet.org/IntTerminus.zip 2.23Mb
Here is the model, the lightmaps, and the textures used.
It was rendered with Gile[s] 1.36 then exported as a B3D file.
Each object that that had part that were vertex shaded got corrupted like the picture I've provided.
Here is the link to the file: http://www.clavet.org/IntTerminus.zip 2.23Mb
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
You mean the mesh is working and displaying correctly?
Why is that mesh is corrupted here with IRRedit and IRRLich 1.3.1
I'm using Windows XP and I have an Nvidia Card (7600GS)
Tried in both OpenGl and DirectX
A driver problem from the windows side?
I'm happy to know that this is not affecting the Linux side.
You see some shading on the chairs?
Why is that mesh is corrupted here with IRRedit and IRRLich 1.3.1
I'm using Windows XP and I have an Nvidia Card (7600GS)
Tried in both OpenGl and DirectX
A driver problem from the windows side?
I'm happy to know that this is not affecting the Linux side.
You see some shading on the chairs?
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
What could cause that? It's doing that in both IRREdit and Irrlicht.
For the moment, to continue my work, I've rendered all under Lightmaps. (Created very small lightmaps that I discarded then worked in IRREdit with "light" on the surface .
I really don't understand how could the mesh is loading ok on both.
For the moment, to continue my work, I've rendered all under Lightmaps. (Created very small lightmaps that I discarded then worked in IRREdit with "light" on the surface .
I really don't understand how could the mesh is loading ok on both.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi. Tested with Burning Video driver. All is ok?
Here is the picture:
I was thinking it will not work. Then after I'd tried to load it in DirectX in the model viewer. It worked too!
I tough I made a mistake and sent you the correct mesh. I loaded the mesh in IRRedit and my Level. It was not ok there.
I really don't know what to think:
- IRRedit and my level: Not OK.
- Model viewer: OK!!!
What code there could be in the model viewer that permit a correct display and not in IRREDIT and my code!? Your IrrEdit is a Linux version or Windows?
EDIT: Checked the source code and the program (Mesh viewer) is loading the mesh as an Animated Mesh. I'm using that mesh as an OCCTREE.
Please try to use it as an OCCTREE. This is the result I have (mesh corruption). If the mesh is composed of only Lightmaps, the representation is ok. This is only happenning if I use Vertex shading on some part of the mesh. Also found out that if some part of the mesh are not defined under a LIGHTMAP the problem occur there also.
So Mesh loading seem to be fine. It's only a "bug" that cause all Mesh converted to OCCTREE to be distorded (What I thing it is now)
Could you load the mesh in IRRedit as OCCTREE and confirm?
Here is the picture:
I was thinking it will not work. Then after I'd tried to load it in DirectX in the model viewer. It worked too!
I tough I made a mistake and sent you the correct mesh. I loaded the mesh in IRRedit and my Level. It was not ok there.
I really don't know what to think:
- IRRedit and my level: Not OK.
- Model viewer: OK!!!
What code there could be in the model viewer that permit a correct display and not in IRREDIT and my code!? Your IrrEdit is a Linux version or Windows?
EDIT: Checked the source code and the program (Mesh viewer) is loading the mesh as an Animated Mesh. I'm using that mesh as an OCCTREE.
Please try to use it as an OCCTREE. This is the result I have (mesh corruption). If the mesh is composed of only Lightmaps, the representation is ok. This is only happenning if I use Vertex shading on some part of the mesh. Also found out that if some part of the mesh are not defined under a LIGHTMAP the problem occur there also.
So Mesh loading seem to be fine. It's only a "bug" that cause all Mesh converted to OCCTREE to be distorded (What I thing it is now)
Could you load the mesh in IRRedit as OCCTREE and confirm?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Vertex Lightmapping supported in Irrlicht? PROBLEM FOUND
This problem should be fixed now - finally. Auria found the bug in the octree creation, which corrupted the vertex structure in case of mixed (i.e. both standard and lightmapped) mesh buffers.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Re: Vertex Lightmapping supported in Irrlicht? PROBLEM FOUND
Thanks Hybrid!