Page 9 of 9

Re: Mesh Combiner

Posted: Tue Nov 20, 2012 10:02 pm
by Lonesome Ducky
I think I should put a disclaimer on the first post that says this code won't be much use for Minecraft clones :lol: The thing is, for a Minecraft clone you'll constantly be updating the data and you'll only want to render the cubes that you can actually see. The code is in no way suited for either of those situations. It is meant for mostly static meshes where visibility is not always known. The kind of culling you can do with a voxel-ish world would be much faster and easier to work with.

Re: Mesh Combiner

Posted: Wed May 15, 2013 3:46 pm
by Lonesome Ducky
I'm thinking about coming back and updating the code to allow for object movement, addition, and deletion even after creation. Is any interested in it, or is the code no longer used?

Re: Mesh Combiner

Posted: Wed May 15, 2013 7:39 pm
by Abraxas)
I can guarantee your code is used plenty. I've had some issues with transparent and non trans materials combines in meshes, is there a way to fix this or does the 4 mat limit stop you from doing something like a material table?

Re: Mesh Combiner

Posted: Thu May 16, 2013 5:13 am
by Brainsaw
That would be a great addition. Although I am not doing any Irrlicht programming at the moment I hope I'll be back soon ;), and then I need a mesh combiner.

Re: Mesh Combiner

Posted: Thu May 16, 2013 8:50 am
by RdR
Abraxas) wrote:I can guarantee your code is used plenty.
Agreed, we use it in TANK@WAR as well. Would indeed be nice with some more features!

Re: Mesh Combiner

Posted: Thu May 16, 2013 1:42 pm
by Lonesome Ducky
Abraxas) wrote:I can guarantee your code is used plenty. I've had some issues with transparent and non trans materials combines in meshes, is there a way to fix this or does the 4 mat limit stop you from doing something like a material table?
The old code use one material for every single mesh, so it all had to be transparent or non-transparent. I can fix this though, and combine solid and transparent objects separately (shouldn't be much of a performance impact).

Here are some additions I've been planning out:
-Support for multiple textures (This way you can use shaders to bypass the single material restriction and have independent specular, diffuse, etc.)
-Addition, deletion, and modification of existing meshes (Will only be as slow as software skinning, as the process will be nearly identical)
-Better support for transparency
-Performance improvements

The new changes will add some new difficulties and the code will most likely be entirely restructured to better suit it, but it should be well enough documented to be easily grasped

Re: Mesh Combiner

Posted: Thu May 16, 2013 5:23 pm
by Abraxas)
Sounds amazing. If we're adding/deleting, maybe the combined mesh should have an internal array added to the class with both integer and string attributes, to help with collision response and deletion when specific objects are concerned (maybe when adding the scene node to the array calling a function addnode(ISceneNode* node,u32 ID==-1,stringw name=="") ?

Re: Mesh Combiner

Posted: Tue Jul 16, 2013 2:04 am
by ritti
Hey ho,
first of all, this is a really nice work :)
Thank you for sharing it.

But I have a little memory problem.
I'm using the meshcombiner for my mapeditor for a strategy game.
The map consists of many little different pieces and to edit the map, I change some of them, and the mesh combiner puts all this pieces together after every change.
Well now the problem is that after every time the meshcombiner puts all together the memory usage increases for about 100 MB.
I think it stores some old textures even if they aren't needed any more but I don't know how to delete them.
Or is the problem somewhere else?

Btw. I wasn't able to use the updated meshcombiner from the first post, because it gaves me a segmentation fault. Am I using it the wrong way? Or am I missing something else?

Help would be much appreciated.
Best regarts
Ritti

Re: Mesh Combiner

Posted: Fri Sep 06, 2013 8:06 am
by Virion
ritti wrote:Hey ho,
first of all, this is a really nice work :)
Thank you for sharing it.

But I have a little memory problem.
I'm using the meshcombiner for my mapeditor for a strategy game.
The map consists of many little different pieces and to edit the map, I change some of them, and the mesh combiner puts all this pieces together after every change.
Well now the problem is that after every time the meshcombiner puts all together the memory usage increases for about 100 MB.
I think it stores some old textures even if they aren't needed any more but I don't know how to delete them.
Or is the problem somewhere else?

Btw. I wasn't able to use the updated meshcombiner from the first post, because it gaves me a segmentation fault. Am I using it the wrong way? Or am I missing something else?

Help would be much appreciated.
Best regarts
Ritti
hi ritti. i've never used mesh combiner but i think it's not advisable to use mesh combiner within your editor. use it only in your game. flag those static objects that you want to combine in the editor and check for that flag when starting your game. unity engine is doing the same thing, it will only combine/batch static meshes after you press the play button, and not during editing the level. hope this help.

Re: Mesh Combiner

Posted: Wed Oct 16, 2013 12:40 am
by kklouzal
Simply amazing work Ducky! I and the community look forward to your improvements!
(especially Addition, deletion, and modification of existing meshes) ;]
At that point every project would benefit from integration, if not into the core of Irrlicht itself.

Re: Mesh Combiner

Posted: Tue Aug 22, 2017 2:20 pm
by gerdb
Is the code still around somewhere?

Greetings from Dresden.

Re: Mesh Combiner

Posted: Tue Aug 22, 2017 2:48 pm
by CuteAlien
Should be the CMeshCombiner code here: https://sourceforge.net/p/irrext/code/H ... ene/IMesh/
Note there is also CBatchingMesh which also tries to do that (I have no direct comparison, probably best to try both and see which one works better for you).