FIXED: Vertex Lightmapping problem in Irrlicht?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

FIXED: Vertex Lightmapping problem in Irrlicht?

Post by christianclavet »

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?
Last edited by christianclavet on Fri Sep 09, 2011 4:07 pm, edited 2 times in total.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Here are some screen to show what is happening.

Here the scene is fully lit with Lightmaps:
Image

Here is the scene is lit with some object with vertex light maps
(chairs)
Image
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)
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Is vertex lightmapping just a case of using vertex colours?
I don't see why that wouldn't be supported, can you provide a mesh which shows the problem?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

it shouldn't be messing up the scene, could we have a copy of the mesh to find the problem.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

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

Post by hybrid »

Once again (like for most other mesh loading problems) this is working, both with 1.3.1 and the latest SVN version. As always tested under Linux with OpenGL.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

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?
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

It's working fine here with directx and openGL on windows. with 1.3.1 and the svn.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

this also works fine for me. (irrEdit, svn, 1.3)
does the corruption show when opening in meshviewer using burning's video driver?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi. Tested with Burning Video driver. All is ok? :shock:
Here is the picture:

Image

I was thinking it will not work. Then after I'd tried to load it in DirectX in the model viewer. It worked too!
Image

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

Re: Vertex Lightmapping supported in Irrlicht? PROBLEM FOUND

Post by hybrid »

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