where is Cube_d.mesh

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
71puccini
Gnoblar
Posts: 20
Joined: Sun Jun 07, 2020 5:14 pm

where is Cube_d.mesh

Post by 71puccini »

I am new to Ogre 2.2.5. I am looking at "Samples" and come across this line

Ogre::Item* item = sceneManager->createItem("Cube_d.mesh");

I can't find Cube_d.mesh under models folder...but program runs fine....does "_d" mean something?

Then I changed it to ninja.mesh (Ninga does exist), then program throws an error.

My resources config includes "material" folder.

thanks!
71puccini
Gnoblar
Posts: 20
Joined: Sun Jun 07, 2020 5:14 pm

Re: where is Cube_d.mesh

Post by 71puccini »

Forgot to add the error: https://gyazo.com/3644f92e0585ac554066eca949bb129f
Cannot find the serializer for mesh version
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: where is Cube_d.mesh

Post by sercero »

The error you are getting is because ninja.mesh is a mesh created for OGRE 1.x and it seems that OGRE 2.x cannot read it.

You can use blender2ogre to export a cube and call it Cube_d.mesh and using the OGRE 2.x export tools you will get a OGRE 2.x compatible mesh.

I don't use OGRE 2.x so I don't know why there is a Cube_d.mesh, but assume is just a simple cube.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: where is Cube_d.mesh

Post by dark_sylinc »

Hi!

As sercero said the ninja error is because it's a v1 mesh. It needs to be converted first, either offline (via OgreMeshTool.exe) or at runtime (see Samples/2.0/ApiUsage/V2Mesh); or you create it as a v1 Entity instead of a v2 Item.

As for Cube_d.mesh, it's inside Samples/Media/packs/DebugPack.zip and that zip is loaded in Resources.cfg:

Code: Select all

[Essential]
Zip=/packs/DebugPack.zip
Cheers
71puccini
Gnoblar
Posts: 20
Joined: Sun Jun 07, 2020 5:14 pm

Re: where is Cube_d.mesh

Post by 71puccini »

thanks guys! it worked via OgreMeshTool.exe. I had to scale the mesh by 0.02 to see the Ninja:-)
Post Reply