Mesh Combiner

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Lonesome Ducky wrote:If irrlicht has a way of changing MipMap bias, you can change it to a further value as well.
Yes, in SMaterial, MipmapLODBias or something like that.
pepeshka
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Post by pepeshka »

Hey ducky,

Once again, bravo, I just have a question; I've got .obj meshes with multiple materials applied, and when I use the combiner, everything but the first material gets dropped (turns black). Does this support multiple materials, am I just doing it wrong?

Thanks!
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

It should, as the dwarf model had a different texture for its axe and it worked. Now, if you're using materials with different colors then that's a problem. It combines any materials that use the same texture into one material (otherwise separate meshbuffers would have to be used, which would defeat the purpose.) Be sure you're using materials that have textures
Xero
Posts: 2
Joined: Thu Sep 30, 2010 5:05 pm
Location: Germany

Post by Xero »

really nice work lonesome ducky, but

1.Although the FPS is shown and i can see a big difference between the mesh combiner and scene nodes I get a black screen when i start the example.

2. I don't really understand how your mesh combiner works. Whats the difference between normal scene nodes and your method? Pls explain for dummies^^
pepeshka
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Post by pepeshka »

That's good to hear, actually I was just using a test model with (IIRC) one textured material and one color. I'll try with multiple textures.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Xero wrote:really nice work lonesome ducky, but

1.Although the FPS is shown and i can see a big difference between the mesh combiner and scene nodes I get a black screen when i start the example.

2. I don't really understand how your mesh combiner works. Whats the difference between normal scene nodes and your method? Pls explain for dummies^^
1) Try moving the camera around, I don't think I actually faced it towards the terrain :lol:

2) Basically, the graphics card can render a single huge batch of triangles much faster than tons of small batches. So this combines those small batches into one large batch. Not only this, but it also greatly reduces the amount of work irrlicht itself has to do, because it only needs to update one scene node instead of thousands.
pepeshka wrote:That's good to hear, actually I was just using a test model with (IIRC) one textured material and one color. I'll try with multiple textures.
Yeah, I seem to recall having problems with a single texture being used for the whole thing, as the texture packer would expand the texture atlas bigger than it needed to be for just one texture, so the uv's would be off and incorrect.
Xero
Posts: 2
Joined: Thu Sep 30, 2010 5:05 pm
Location: Germany

Post by Xero »

Lonesome Ducky wrote: 1) Try moving the camera around, I don't think I actually faced it towards the terrain :lol:
can't find it ...just a black screen.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Well that's odd, I haven't had any other reports of it doing this. Have you tried using it in your own code or tried recompiling the example?
milkshakeman
Posts: 27
Joined: Mon Aug 14, 2006 12:36 pm

Post by milkshakeman »

a small question; is it possible to use mesh scene combiner on a complete scene and still have standard shadows and lighting working? Because afaik you can not add a shadowvolume to this kind of node.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

You can, shadow volumes and lighting should work. Just be aware that the whole thing uses the same material, so without shaders you won't be able to set specular etc. for individual models.
Dan911
Posts: 21
Joined: Tue Dec 16, 2008 11:28 pm

Post by Dan911 »

Was messing around with this, can be very helpful performance boost in a lot of cases! Any chance of this getting added to irrlicht?
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Great project Ducky...but there still a lot of memory leaks..is there a way to fix this?
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
DanielLoynaz
Posts: 6
Joined: Tue Mar 11, 2008 5:06 pm

A question about combining meshes

Post by DanielLoynaz »

It is possible to combine several meshes and to respect the materials and textures assigned, using MeshCombiner.

My problem is the following: I am creating a room using planes for walls, floor and roof and when I combine the meshes, using MeshCombiner, it tries to combine the textures of the floor, walls and roof in all the places.

Some way exists of combining the meshes of the planes to obtain a single object but that the textures are in the place that I put them.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: A question about combining meshes

Post by Lonesome Ducky »

DanielLoynaz wrote:It is possible to combine several meshes and to respect the materials and textures assigned, using MeshCombiner.

My problem is the following: I am creating a room using planes for walls, floor and roof and when I combine the meshes, using MeshCombiner, it tries to combine the textures of the floor, walls and roof in all the places.

Some way exists of combining the meshes of the planes to obtain a single object but that the textures are in the place that I put them.
It will only work when the textures don't tile, which is likely the problem your case. It is not at all trivial to make it work with tiling textures and I regret to say that it's beyond my ability.
Zurzaza wrote:Great project Ducky...but there still a lot of memory leaks..is there a way to fix this?
I wasn't aware of any large memory leaks. I thought I deleted all my pointers. But if you're having problems with it, go through the code and make sure I really did delete all the pointers :lol:
Kostya
Posts: 5
Joined: Mon May 31, 2010 9:58 am

Post by Kostya »

Now this library not correct calculate bounding box.

To fix this bug add this line in CMeshCombiner.cpp
to lines 470 and 351

Code: Select all

meshBuffer[x]->recalculateBoundingBox();
Post Reply