[2.1] exporting Hlms from Blender?

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
obelisk
Gnoblar
Posts: 3
Joined: Mon Jan 11, 2016 4:52 am
Location: Vancouver, BC

[2.1] exporting Hlms from Blender?

Post by obelisk »

I'm new to Ogre and making my way through building a test app to see how everything comes together. I perhaps chose unwisely to start learning with 2.1, but it seemed like a good idea at the time :wink:

At the moment I'm working on getting a model exported from Blender (2.75) and loaded up with Ogre. I used https://bitbucket.org/iboshkov/blender2ogre to export, and OgreMeshTool to convert to a v2 .mesh, so far so good.

But it appears that blender2ogre exports outdated material files that fail to load:

Code: Select all

Mesh: Loading MrCubeTheFirst.mesh.
Corrupted chunk detected! Stream name: 'MrCubeTheFirst.mesh' Chunk id: 36864
Texture: MrCube.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 10 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
Exception thrown at 0x76985B68 in OgreTest01.exe: Microsoft C++ exception: Ogre::RenderingAPIException at memory location 0x0056E2BC.
OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material MrCubeMat must use shaders in HlmsLowLevel::calculateHashFor at E:\ogre\ogre-2.1\OgreMain\src\OgreHlmsLowLevel.cpp (line 119)
Couldn't apply datablock '[Value 0x0000001c]' to this renderable. Using default one. Check previous log messages to see if there's more information.
I can re-assign a material using code, or replace the generated material with one based on an Hlms and everything works ok.

Is there a newer exporter than blender2ogre? Or plans to update it? Is there something else I should be doing to improve the workflow from Blender to Ogre 2.1?

Thanks!
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: [2.1] exporting Hlms from Blender?

Post by dark_sylinc »

obelisk wrote:Is there a newer exporter than blender2ogre? Or plans to update it?
You would have to ask the blender2ogre maintainer.
obelisk wrote:Is there something else I should be doing to improve the workflow from Blender to Ogre 2.1?
Thanks!
Actually yes. There is a WIP project I'm working on called DERGO which can be used to edit materials inside Blender. Because it's very WIP, follow the instructions precisely and see what the videos are doing.

Currently there is no way to export the materials out of DERGO or Blender. However JSON support was added very recently, and if you slightly modify the DERGO server so that it constantly exports the materials to a JSON file in your disk drive, you could get it working quickly (just call mHlmsManager->saveMaterials( HLMS_PBS, "C:\\MyMaterisl.material.json" ) ).

I'm currently working on something else, but as soon as I'm done I'm planning on adding JSON export and packaging DERGO to get something friendlier out of the box for end users (i.e. install with a couple of clicks; automatically launch the server when the Blender plugin is started, choose from Blender where to save the JSON file, etc).
User avatar
obelisk
Gnoblar
Posts: 3
Joined: Mon Jan 11, 2016 4:52 am
Location: Vancouver, BC

Re: [2.1] exporting Hlms from Blender?

Post by obelisk »

Ok, thanks for the info, I'll check out DERGO and keep an eye on blender2ogre or take a stab at updating it for my purposes at least.
Post Reply