Converting manual object to mesh, losing vertex colour?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
PJani
Gremlin
Posts: 171
Joined: Wed Dec 24, 2008 7:21 pm

Converting manual object to mesh, losing vertex colour?

Post by PJani » Fri Nov 23, 2012 2:02 pm

Hey. I have one problem.

I am building player mesh procedurally using manual object. When i finish building player manual object i convert it to mesh.
Binding of skeleton/bone to mesh looks like this...

Code: Select all

	Ogre::MeshPtr mp = mo->convertToMesh(skeleton->getName());
	
	mp->_notifySkeleton(visual_skelet);
	mp->setSkeletonName(visual_skelet->getName());

	Ogre::SubMesh* submesh = mp->getSubMesh(0);

	for(int i=0;i<assigments.size();i++)
	{
		submesh->addBoneAssignment(assigments[i]);
	}
	submesh->_compileBoneAssignments();
For some reason i get in my vertex shader float4(0,0,0,0) via COLOR0.

I don't know why is this happening. Any idea?

Anyway everything works fine. Bones are bind.
0 x
| Intel Dual Core 1.8Ghz, ATI Radeon Mobility X1600 256MB, 2GB RAM |
| AMD64 3000+ 1.8Ghz, 2GB RAM, GF6600 GT 128MB |
| Ogre 1.6.4 | VS C++ EE | OgreNewt + Newton 2.xx |
| Win XP || Ubuntu 9.04 | C/C++, Python, VB6, Delphi |

Post Reply