Mesh Combiner

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby hybrid » Wed Sep 22, 2010 7:46 am

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

Postby pepeshka » Thu Sep 30, 2010 2:37 am

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!
pepeshka
 
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Postby Lonesome Ducky » Thu Sep 30, 2010 4:09 am

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
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby Xero » Thu Sep 30, 2010 5:35 pm

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^^
Xero
 
Posts: 2
Joined: Thu Sep 30, 2010 5:05 pm
Location: Germany

Postby pepeshka » Thu Sep 30, 2010 7:45 pm

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.
pepeshka
 
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Postby Lonesome Ducky » Thu Sep 30, 2010 9:06 pm

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.
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby Xero » Fri Oct 01, 2010 3:08 pm

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.
Xero
 
Posts: 2
Joined: Thu Sep 30, 2010 5:05 pm
Location: Germany

Postby Lonesome Ducky » Fri Oct 01, 2010 9:03 pm

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?
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby milkshakeman » Sat Oct 02, 2010 7:37 am

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.
milkshakeman
 
Posts: 27
Joined: Mon Aug 14, 2006 12:36 pm

Postby Lonesome Ducky » Sat Oct 02, 2010 2:50 pm

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.
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby Dan911 » Sun Nov 07, 2010 7:25 am

Was messing around with this, can be very helpful performance boost in a lot of cases! Any chance of this getting added to irrlicht?
Dan911
 
Posts: 21
Joined: Tue Dec 16, 2008 11:28 pm

Postby Zurzaza » Sun Nov 07, 2010 10:43 am

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.
User avatar
Zurzaza
 
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy

A question about combining meshes

Postby DanielLoynaz » Wed Nov 24, 2010 6:52 pm

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.
DanielLoynaz
 
Posts: 6
Joined: Tue Mar 11, 2008 5:06 pm

Re: A question about combining meshes

Postby Lonesome Ducky » Thu Nov 25, 2010 3:14 am

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:
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby Kostya » Thu Apr 14, 2011 4:58 pm

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();
Kostya
 
Posts: 5
Joined: Mon May 31, 2010 9:58 am

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest