Mesh Combiner
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Re: Mesh Combiner
I think I should put a disclaimer on the first post that says this code won't be much use for Minecraft clones 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.
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Re: Mesh Combiner
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
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
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
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Re: Mesh Combiner
Agreed, we use it in TANK@WAR as well. Would indeed be nice with some more features!Abraxas) wrote:I can guarantee your code is used plenty.
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Re: Mesh Combiner
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).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?
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
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
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
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
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.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
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Re: Mesh Combiner
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.
(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.
Help Me Help You.
Re: Mesh Combiner
Is the code still around somewhere?
Greetings from Dresden.
Greetings from Dresden.
Re: Mesh Combiner
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).
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.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm