Quantcast
Viewing all articles
Browse latest Browse all 6821

Creating SkinnedEffect at runtime not working

@AliciaRaven wrote:

Hi

I have now successfully got a collada model with 166 bones to animate. I now have run into some issues with the SkinnedEffect class. In the skinned animation example, assigning each part a specific texture works, but for my model, the texture for all parts is always the last one set. This I assume is because only one effect is created and given to all mesh parts. I find it rather strange that the FBX would have a unique shader assigned but collada does not, maybe this is because the example FBX was not created with MonoGame but with XNA?

My biggest problem right now is that I am unable to create a new SkinnedEffect for each mesh myself. When i try to replace the existing effect collection for the mesh, the animation stops, the model turns black and even setting the world matrix has no effect on the models placement. The camera can be moved but the model stays fixed in relation to the screen. I have tried both creating a new effect and cloning the existing effect, both end with the same static black pair of legs on the screen that does not move even when the camera is changed.

Is there any reason why creating a SkinnedEffect shader at runtime will not work or is this a bug? I don't want the extra overhead of keeping effects in my custom model classes and with static models I have been able to create the shader at runtime to prevent bloat in the model file itself.

Thanks

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles