Mesh Combiner

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Kuzy
Posts: 21
Joined: Fri Feb 18, 2011 10:30 am

Re: Mesh Combiner

Post by Kuzy »

Thank you very much Ducky, I will try.

For now I'm going in holiday for one week :D , but after that I'll give you a feedback.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: Mesh Combiner

Post by Lonesome Ducky »

Alright, I'm thinking of changing the mesh combiner a bit. I think I want to make it just a mesh class derived from IMesh, so it can have more functionality. I can then more easily allow adding in other objects afterwards, and even transforming objects that are already in the mesh. Does this sound like a good idea?
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Re: Mesh Combiner

Post by Brainsaw »

This is a good idea for sure. An IrrEdit plugin would be cool in that case. Otherwise I might write a scenenode (and plugin) that does combine all it's children to a single mesh, without any special new functions.
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
sodandk
Competition winner
Posts: 340
Joined: Wed Aug 10, 2011 11:58 am

Re: Mesh Combiner

Post by sodandk »

Wierd... when I use the MeshCombiner in debug mode its fine, and when I run it in release mode from inside VS, its fine...
but when I run it in releasemode and an exe... it crashes...
any clues...?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Mesh Combiner

Post by mongoose7 »

Are you sure you're running the same executable inside and outside of VS? And, if you are, are you in the same directory both times. VS probably sets the CWD to the current directory, whereas the executable is probably in 'Release'. So, it is not able to find a file and, well, I guess ... you are not checking the return value. Dereferencing a null pointer usually results in a GPF.
sodandk
Competition winner
Posts: 340
Joined: Wed Aug 10, 2011 11:58 am

Re: Mesh Combiner

Post by sodandk »

it find and loads the model and textures just fine... and if I dont use the combiner, also runs fine... but as soon I use the combiner, it dies...
sodandk
Competition winner
Posts: 340
Joined: Wed Aug 10, 2011 11:58 am

Re: Mesh Combiner

Post by sodandk »

in the function 'CMeshCombiner::packTextures'... one of the last lines... says:

Code: Select all

  delete [] occupied;
that line goes BOOM in releasemode...
Kuzy
Posts: 21
Joined: Fri Feb 18, 2011 10:30 am

Re: Mesh Combiner - problem solved!

Post by Kuzy »

Hello Ducky and Mongoose,

I now have solved my problem with the lighting...
You were right, my normals were not correct. I changed my mesh and corrected the normals. As you expected you have no error in your combiner :-)
Thank you for your help. It gave me the right clue.

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

Re: Mesh Combiner

Post by Lonesome Ducky »

Good to hear you got it working, hopefully the performance boost is enough
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Re: Mesh Combiner

Post by hungryninja »

I want to make a minecraft-like game, but without the random map generation, in VB.NET.
1) Could you please give me the code that allows you to add and remove meshes?
2) For the minecraft-like graphics, do I need to split the pixels into multiple meshes?
3) Can I do the different textures for the sides of the cube without splitting the cube into individual squares? Should I do this?

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

Re: Mesh Combiner

Post by Lonesome Ducky »

Removing is not part of the current functionality, but should be trivial to add. I'd encourage you to look at the mesh combiner code and modify it to better suit what you need. As is, my mesh combiner will not work well for a minecraft clone. It strength lies in one time creation of a static mesh, not being constantly modified. It could serve as a starting point to make something more modifiable, though.
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Re: Mesh Combiner

Post by hungryninja »

Yeah. I get your point and I don't want to convert 700 lines of code to VB.NET, but don't want to use C++.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Mesh Combiner

Post by serengeor »

hungryninja wrote:Yeah. I get your point and I don't want to convert 700 lines of code to VB.NET, but don't want to use C++.
Aren't you supposed just to make a 'wrapper' on top of c++ code?
Working on game: Marrbles (Currently stopped).
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: Mesh Combiner

Post by Lonesome Ducky »

hungryninja wrote:Yeah. I get your point and I don't want to convert 700 lines of code to VB.NET, but don't want to use C++.
I don't know what you want then. If you want me to write it for you, I'm not going to.
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Re: Mesh Combiner

Post by hungryninja »

still, I want to know how to do the minecraft pixel graphics.
Post Reply