This week, I have been working on the mesh morpher and the myGUI system. In the morph targets question, we need to morph at least mroph 5 targets and they should be move continuously back and forth. In the nice ogre library, we can do it in a very straight forward way by using the function softwareVertexMorph().
entity->getMesh()->softwareVertexMorph(t,morphTarget1,morphTarget2,targetVertexData);
Where t is how much you want to morph in time, morphTarget1 is the original mesh data, morphTarget2 is the mesh data that you want to mroph to from the original mesh, and the targetVertexData is the target mesh data that you want to apply this morph to. Therefore, the mrophing action will apply on the third object and it has to apply on a third object, otherwise errors will occur. and this third mesh has to have the same number of vertices with the original mesh and the target mesh, or they have to by edited from the same model.
To upgrade the morph question, we need to use myGUI to select different object and morph between them depending on the user input. Since we already had a tutorial about how to use myGUI layout editor to create myGUI window, we can do it very quickly.
The other homework question that required myGUI in a major part is the inventory system where we have to collect the items and have a preview of the item in 3D, spinning. This is the most difficult part for me and I have to figure it out as soon as possible before the homework question deadline.
No comments:
Post a Comment