EDIT: I just noticed you're using Unlit! Unlit will ignore skeletal animation!!!
It's really late so I can't think much right now. I would try of using Pbs and try to see if you can workaround the lighting problem by ramping up emissive lighting in the material to 1.0. Or perhaps in the ambient.
For best results perhaps you should add normals to the mesh to fool HlmsPbs, and set these normals to 0 0 0 or maybe 0.0001.
EDIT 2: I remembered user xrgo managed to trick HlmsPbs to work like Unlit so he uses HlmsPbs for both PBS and Unlit-like materials. I think he posted some code in the forum on how to do that, or you could try contacting him directly.
Original post:
Hi. I took a look.
Where you had to look was in the attributes of the input mesh (black rectangle):
In a properly skeletal animated mesh, there would be blendWeights and blendIndices alongside the position, normals and UVs. There aren't any, which means the mesh was incorrectly imported to v2 and Ogre thinks it's not skeletally animated at all.
My best guess is that when Mesh::importV1 gets called, one of these lines fails:
Code: Select all
mSkeletonName = mesh->getSkeletonName();
v1::SkeletonPtr v1Skeleton = mesh->getOldSkeleton();
if( !v1Skeleton.isNull() )
mSkeleton = SkeletonManager::getSingleton().getSkeletonDef( v1Skeleton.get() );
Maybe the skeleton name is empty, or v1Skeleton is a nullptr.
Another possibility is that SubMesh::_arrangeEfficient did not fill VES_BLEND_WEIGHTS and VES_BLEND_INDICES into vertexElements.
v1::Mesh::compileBoneAssignments should've added VES_BLEND_* stuff to the v1 mesh:
Code: Select all
const VertexElement& idxElem =
decl->addElement(bindIndex, 0, VET_UBYTE4, VES_BLEND_INDICES);
const VertexElement& wtElem =
decl->addElement(bindIndex, sizeof(unsigned char)*4,
VertexElement::multiplyTypeCount(VET_FLOAT1, numBlendWeightsPerVertex),
VES_BLEND_WEIGHTS);
but I guess this function is either getting called too late (i.e. should be called
before importing to v2) or something else unknown is stripping these elements from the declaration.
Please note that by the time importV1 is called, you should've fully set both the Mesh and the Skeleton up. If you set the Mesh first, then call importV1, then the Skeleton, it won't be imported correctly.
Cheers
Matias