[CRASH] Animated meshes with HDR compositing

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


User avatar
SamiTheGreat
Bronze Sponsor
Bronze Sponsor
Posts: 102
Joined: Sat Aug 30, 2008 11:57 am
Location: Finland
x 8

[CRASH] Animated meshes with HDR compositing

Post by SamiTheGreat »

Hi! I tried to enable HDR rendering but my program keeps crashing every time when mesh with skeleton is added to scene.

I used sample HDR system and configured it same way as in sample code. All is working fine if I export default cube from blender and also if my mesh is exported without skeleton armature. If mesh has skeleton, program crashes to this assert line: OGRE EXCEPTION(3:RenderingAPIException): Not all of the shader input semantics are set by the VertexArrayObject in D3D11VertexDeclaration::getILayoutByShader at OgreD3D11HLSLProgram.cpp.

What could cause this? Only clue is that there is something wrong with Shadow compositor node. I also tested PbsMaterials compositor where only PSSM shadows are enabled and it crashes same way. I checked HDR compositing scripts and I didn't find any armature releated declarations. Am I doing something wrong or is this a bug?

EDIT: I am using OGRE version 2.1

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

Re: [CRASH] Animated meshes with HDR compositing

Post by dark_sylinc »

Sounds like there's something wrong with the mesh itself.

Could you upload the mesh + skeleton? (if you can't publicly, send me a PM)
User avatar
SamiTheGreat
Bronze Sponsor
Bronze Sponsor
Posts: 102
Joined: Sat Aug 30, 2008 11:57 am
Location: Finland
x 8

Re: [CRASH] Animated meshes with HDR compositing

Post by SamiTheGreat »

dark_sylinc wrote:Sounds like there's something wrong with the mesh itself.

Could you upload the mesh + skeleton? (if you can't publicly, send me a PM)
Hi! Here is a link to the file in my dropbox: https://dl.dropboxusercontent.com/u/592 ... _model.zip.
I included mesh, skeleton and exported .xml files.

EDIT: I tested to add only one bone to the default cube in blender to be sure there is nothing bad happened in my real model but the program still crash.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5476
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1358

Re: [CRASH] Animated meshes with HDR compositing

Post by dark_sylinc »

I'm able to repro your problem. I'm now working on seeing what the problem is.
User avatar
SamiTheGreat
Bronze Sponsor
Bronze Sponsor
Posts: 102
Joined: Sat Aug 30, 2008 11:57 am
Location: Finland
x 8

Re: [CRASH] Animated meshes with HDR compositing

Post by SamiTheGreat »

dark_sylinc wrote:I'm able to repro your problem. I'm now working on seeing what the problem is.
Okay, thank you very much! I've been trying to fix the problem whole day now. I hope that it gets solved soon :D
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5476
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1358

Re: [CRASH] Animated meshes with HDR compositing

Post by dark_sylinc »

How did you export this mesh from Blender? The exporter is generating an xml using "shared vertices" feature which always had been a little buggy in 1.x; and thus causing trouble.
Also do you know what parameters were passed to OgreMeshTool.exe ?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5476
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1358

Re: [CRASH] Animated meshes with HDR compositing

Post by dark_sylinc »

Problem fixed.

There was a bug in the OgreMeshTool and another one in the function that optimized the vertex buffers used for shadow mapping. You'll have to run OgreMeshTool again on your mesh since the mesh previously produced contains invalid data.

Thank you for your report.

PS. Nice model btw. ;)
User avatar
SamiTheGreat
Bronze Sponsor
Bronze Sponsor
Posts: 102
Joined: Sat Aug 30, 2008 11:57 am
Location: Finland
x 8

Re: [CRASH] Animated meshes with HDR compositing

Post by SamiTheGreat »

dark_sylinc wrote:Problem fixed.

There was a bug in the OgreMeshTool and another one in the function that optimized the vertex buffers used for shadow mapping. You'll have to run OgreMeshTool again on your mesh since the mesh previously produced contains invalid data.

Thank you for your report.

PS. Nice model btw. ;)
Nice to hear that the problem got solved! :) I will pull and test now.

Btw, you said that exporter is generating "shared vertices" which causes problems indeed. OgreMeshTool fails to generate tangents if shared vertices are used. That's why I exported tangents to the xml file from blender. I used exporter found here https://bitbucket.org/iboshkov/blender2ogre/src since it was only one I got working on the newest blender version. I am trying to figure out how to export mesh without "shared vertices".

EDIT: I got it working with default cube exported with skeleton but my own model still makes it crash. Did you get it working with my exported xml?

EDIT2: My fault I had to clean my solution because debug output directory had two versions of my model and ogre was loading wrong version of it. Now all is working fine! Thanks! :D
FedorIsHere
Kobold
Posts: 25
Joined: Wed Sep 20, 2023 6:05 am
x 8

Re: [CRASH] Animated meshes with HDR compositing

Post by FedorIsHere »

How did you get Blender to export non-shared vertices?