Mesh Combiner

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

Re: Mesh Combiner

Postby Lonesome Ducky » Tue Nov 20, 2012 10:02 pm

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

Re: Mesh Combiner

Postby Lonesome Ducky » Wed May 15, 2013 3:46 pm

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

Re: Mesh Combiner

Postby Abraxas) » Wed May 15, 2013 7:39 pm

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?
Abraxas)
 
Posts: 227
Joined: Sun Oct 18, 2009 7:24 am

Re: Mesh Combiner

Postby Brainsaw » Thu May 16, 2013 5:13 am

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.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Brainsaw
 
Posts: 1144
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Re: Mesh Combiner

Postby RdR » Thu May 16, 2013 8:50 am

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!
User avatar
RdR
Competition winner
 
Posts: 273
Joined: Tue Mar 29, 2011 2:58 pm

Re: Mesh Combiner

Postby Lonesome Ducky » Thu May 16, 2013 1:42 pm

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

Re: Mesh Combiner

Postby Abraxas) » Thu May 16, 2013 5:23 pm

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=="") ?
Abraxas)
 
Posts: 227
Joined: Sun Oct 18, 2009 7:24 am

Re: Mesh Combiner

Postby ritti » Tue Jul 16, 2013 2:04 am

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
ritti
 
Posts: 90
Joined: Tue Apr 10, 2012 12:09 pm

Re: Mesh Combiner

Postby Virion » Fri Sep 06, 2013 8:06 am

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.
User avatar
Virion
Competition winner
 
Posts: 2141
Joined: Mon Dec 18, 2006 5:04 am

Re: Mesh Combiner

Postby kklouzal » Wed Oct 16, 2013 12:40 am

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.
Dream Big Or Go Home.
Help Me Help You.
User avatar
kklouzal
 
Posts: 318
Joined: Sun Mar 28, 2010 8:14 pm
Location: USA - Arizona

Re: Mesh Combiner

Postby gerdb » Tue Aug 22, 2017 2:20 pm

Is the code still around somewhere?

Greetings from Dresden.
gerdb
 
Posts: 194
Joined: Wed Dec 02, 2009 8:21 pm
Location: Dresden, Germany

Re: Mesh Combiner

Postby CuteAlien » Tue Aug 22, 2017 2:48 pm

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).
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8362
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Previous

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest