GD_VRD Mesh Cooker

Terry

17-06-2011 17:17:33

Hi

We are developing a game system with its own editor called GameDirector in the course of the development we have developed a Tool called GD_VRD which we would like to share with you.

GD_VRD is a tool for cooking and scaling Ogre meshes and producing an nxs file its in its early development stage but practical enough for you to use.

OK first down load the zip file called GD_VRD_B1.zip place anywhere you want the folder will contain all the bits and bobs you need to run the application.

http://www.gamefront.com/files/user/hgtterry

Then launch the application from file choose Cook and select the mesh file you want to cook at this point you can scale if you want and it will cook again to new scale the nxs file will be produced and placed in the Media/NXS_Files folder for you.

Remember to place the mesh file you want to cook in the Media//Actors folder as we call it there are folders for textures and material files for you in the Media folder but not absolutely necessary for the cooking process.

We will be improving GD_VRD as an ongoing process to include convex and ordinary shapes such as capsules and cubes etc.

we also have modifications to NxOgre code we would like to make available to you with and actively build on the code that exists with betajaen blessing of course.

If you have any questions feel free to post here and we will answer any questions or ideas you would like to see added to GD_VRD.

We will add a help file shortly and and the option to save as a different file name it uses the ogre mesh file name at the moment.

By the way the red lines you will see in GD_VRD are the actual cooked mesh triangle shape.

Thanks

Terry Bernie

betajaen

17-06-2011 17:20:01

we also have modifications to NxOgre code we would like to make available to you with and actively build on the code that exists with betajaen blessing of course.

Of course you can post it.

Terry

20-06-2011 13:02:36

Hi

A few improvements to GD_VRD

Version B2 wont automaticly create the the nxs file now but on clicking close a save dialog will come up this will give you the opportunity to save the nxs file with a new file name or select a previous file to overwrite.

Also a conformation dialog will pop up on a successful creation on the file.

One thing to note at the moment is the file will only write to the Nxs_Files folder in the Media Folder eve if you change directory’s we are working to fix this so you can save the nxs file to any where such as your project folder but the cooking is a bit particular about paths if we hard code the path i.e. file:://Media/Nxs_Files all is OK but dose not seem to like the path returned from the windows open dialog but we are working on it.

Also adding a Primitive Option from Menu->File this when complete will allow you to load a mesh then choose a primitive such as cube sphere capsule scale the primitive correctly to the mesh and alter its local pose then a small file will be saved with all the details you need to add to your code to have the primitive correctly sized and positioned to a given mesh at a given scale.

GD_VRD_B2.zip

http://www.gamefront.com/files/user/hgtterry

Thanks

Terry Bernie

rromulo

20-06-2011 19:45:15

Great job man.
Well, I really liked this tool, but it only partially solved my problems...
Would be interesting to scale differently on the axes x, y and z.

Terry

20-06-2011 19:49:54

Yes rromulo we think it will be a great tool for NxOgre user especialy when we do the Primatives as well.

As far as your question about the x y z scale we thought most user would wont to scale in all directions equaly but will alter so can scale in any Vector if that helps you so we will have a sort of lock that will scale all or indivdual vectors will try and get that out in the next day or 2.

Thanks

Terry Bernie

Terry

21-06-2011 15:28:03

rromulo

As requested you can now altered the scaling in the X Y or Z.

GD_VRD_B2.1

http://www.gamefront.com/files/user/hgtterry

Thanks

Terry Bernie

rromulo

21-06-2011 22:22:54

Tested and approved :mrgreen:

Thanks too much Terry, it is a great help in my project.

Terry

22-06-2011 17:37:53

GD_VRD_2.2

we have added a grid for this version and turned the main view into an editor style rather than an Ogre scene also fixed a small bug where if the object was turned and then scaled the NxsShape did not align with the Ogre mesh.

Thanks

http://www.gamefront.com/files/user/hgtterry

Terry Bernie

rromulo

28-06-2011 22:39:43

Hi Terry, tks again for this tool.

Another thing...

For mesh objects, I can set Orientation like the last line of it:


Ogre::Entity* calc3Entity = mSceneMgr->createEntity("calc3","calc2.mesh");
Ogre::SceneNode *calc3 = mSceneMgr->getRootSceneNode()->createChildSceneNode("calc3Node");
calc3->attachObject(calc3Entity);
calc3->setPosition(1504.03,28.4113,1972);
calc3->scale(12.6,10.2,13.2);
calc3->setOrientation(0.165047,0,-0.986283,0);


Is it possible to do with nxs archives?

Terry

29-06-2011 06:50:26

Hi rromulo

Well before you can set the rotation on an NXS file it as to be set to a NxOgre::Shape to gain access to the rotation part i will try to explain based on your code.


NxOgre::Mesh NXS_Mesh
NxOgre::SceneGeometry* NXS_SceneGeo;
NxOgre::Vec3 Nx_Pos;
NxOgre::Matrix44 Mat;
NxOgre::Shape *p;

NXS_Mesh = mMeshManager->load(calc2.nxs, "calc"); // Load NXS file into a NxOgre Mesh Object

// Create the the scene Geometry and set its position
NXS_SceneGeo = Nx_mScene->createSceneGeometry(NxOgre::TriangleGeometryDescription(NXS_Mesh), NxOgre::Vec3(1504.03,28.4113,1972));

// Now get its shape in to an NxOgre Shape so can rotate it
p = NXS_SceneGeo->getShape(0);
Mat = p->getGlobalPose();
Mat.get(Nx_Pos.x,Nx_Pos.y,Nx_Pos.z); // Saves the Pos to add back to the Matrics later

// Now set the Rotaion you used when adding the Ogre mesh calc2.mesh
Mat.set(NxOgre::Quat(0.165047,0,-0.986283,0));

Mat.set(Nx_Pos.x,Nx_Pos.y,Nx_Pos.z); // Add the postion back

p->setGlobalPose(Mat); // Now update Rotation and Position





I hope this helps it looks involved but its not that complicated when you get your head round it but it will allow you to set the rotation and position independent of the ogre mesh but are usually the same or there would not be much point.

One thing to note the ogre mesh scale can obviously be scaled but the NxsShape can not even when cast to an NxOgre Shape use GD_VRD for that.

Thanks

Terry Bernie

deshan

01-07-2011 19:06:04

Nice work Terry

rromulo

01-07-2011 22:54:25

Terry,

You just be considered the guy I'd most like to see win one million euros. :D

Great explanation, great job, as yaufent said, you're The Man.

It's a little difficult get info about nxogre, mainly when you're a beginner. NxOgre certainly is a big and fantastic project so we need people like you :wink:

I didn't forget you too betajaen, tks for all. Would be nice more and more people to help, discuss and improve even more NxOgre.

I'm too near to finish my project because of you both.

Ty.

Terry

02-07-2011 12:41:43

Thanks guys

Will have a new Update in a couple of days which will include the character controller so can then play with the object that’s is to be cooked and see it interact with the CC.

We don’t mind answering any questions on NxOgre or GD_VRD by the way we intend to change the name to NxEditor for next update we are focusing on NXS stuff and the CC at the moment.

But Thanks again for your support

Cheers

Terry Bernie

betajaen

02-07-2011 14:00:06

Good name. ;)

If you want me to add links to it in the official documentation and FAQ just ask.

Terry

03-07-2011 16:50:13

Hi betajaen

Well we have a release of NxEditor we can release but the thing is for this release we can use you code as is.

But we have a modified version we will use from now on the thing is how to we get it to NxOgre users what we promise is not to brake the API so is backwards compatible so we add not take away

what we don’t wont to do is split all this up we would like some how to update code on the fly as opposed to posting it in a text form.

We have kept you license on all headers and cpp and marked what we have done to comply with the license.

Is the a way we can have a way of putting the code up on your site as a downloadable version as opposed to a link to modified code.

We know this is a mute point but and if you say no will understand.

And post Link instead.


Thanks

Terry Bernie

betajaen

03-07-2011 19:13:34

It's just links to the download page in the FAQ post, and on the NxOgre wiki. There isn't any need for me to host it, or for you do anything differently.

deshan

04-10-2011 17:14:15

Terry
I have some .mesh files which got errors when opening.

Any idea?

jarwulf

07-12-2011 19:20:39

I guess Terry doesn't visit anymore...but if not can you point us to the latest version? The files don't seem to be available anymore.

jarwulf

14-12-2011 18:41:13

Terry
I have some .mesh files which got errors when opening.

Any idea?



Looks like Terry is MIA here, his Mesh cooker download is removed, and his forums are deleted with no way to contact him that I can find. So I guess we have another dead nxs conversion tool with substantial unresolved bugs to add to the pile. If anyone finds a solution or bugfixed mesh cooker let us know.