MogrePlant

smiley80

28-07-2011 12:25:22

MogrePlant can convert ngPlant's .ngp files to meshes.
It's based on OgrePlant.

Usage:
MogrePlant.Create(meshName, pathToNgpFile).Dispose();
var entity = sceneMgr.CreateEntity(meshName);


Download:
https://sites.google.com/site/infralich ... -mogre.zip
'NgPlantNet.dll' is the managed, 'ngpcore.dll' is the native library.

Source code:
https://bitbucket.org/smiley80/ngplantnet

Works only with the .NET 4.0 versions of Mogre 1.7.

Screenshot:

tafkag

28-07-2011 15:19:46

Pretty cool, thanks for sharing! I followed the showcase thread in the Ogre forum and these are some nice looking trees. :)
Now I only have to learn how to use ngPlant. ;)

Beauty

29-07-2011 23:06:27

Hi smiley80,

it's an interesting addition for Mogre.

I suppose many users doesn't use Mogre for .NET 4.0. To support these users, I have an idea:
Mogre supports to save meshes from memory to a file.

You could offer a tiny tool (with GUI or command line), which loads an .npg file and save it to the Ogre mesh format. Then it can be loaded by other Mogre versions, too.
Additionally you could offer an option to set the output file format. (This can be set in the export method. So the written mesh files are also usable for older Ogre/Mogre versions.)

smiley80

30-07-2011 10:47:31

The reason for only supporting .NET 4.0 is a missing method in the .NET 2.0 version of Mogre (VertexData.ReorganiseBuffers).
But since that method seems to be superfluous (at least in all tests so far) , I'll go back to .NET 2.0 with the next release.

Edit:
Seems like DirectX needs it, so I have to stick with .NET 4.0.

Beauty

30-07-2011 12:35:11

Is VertexData.ReorganiseBuffers a special addition to the .4.0 Mogre wrapper?
In this case it would be useful to add this missing feature to the Mogre bug tracker. So it can be included to the main source code.