Model works in PreFab but not in-game

Software: Prefab3D

LadyBug, Newbie
Posted: 16 September 2013 09:27 PM   Total Posts: 4

Hey!

This post is especially directed to Fabrice but if anyone else knows a solution, you are more than welcome to point it out.

In the project we need animated models. The artist has made an animated model in Blender and then exported it as a Collada file.
It loads and animates fine but the mesh is totally screwed.
Please check the first attached picture to see what I mean.
We have tried to get it to work for more than a week now but to no avail.

I have noticed however that if I load this model into Prefab, it shows up just fine and the animation is running too. The model is not loaded with any errors either.

The second picture shows the model loaded in prefab.

I have tried to export that working model from Prefab as awd2 and run that. But it looks the same as the Colllada file does, ie it is loaded and the animation runs but the mesh looks like a little explosion.

Since it is loading and displaying perfectly in prefab, I was wondering if you have a special check, work-around, safety net or something in this regard, that prevents the mesh from behaving abnormally?

Anything that I can add to my code to prevent the mesh from exploding?
Or any advice for the artist to prepare the mesh in a special way?

We are using the Prefab version 2 and the latest version of Away3D (4.1)

Your help is greatly appreciated. We have run out of options to try.
Thank you smile

 

Image Attachments
LikeItIs.pngLikeItShouldBe.png
   

Avatar
Fabrice Closier, Administrator
Posted: 17 September 2013 09:05 AM   Total Posts: 1260   [ # 1 ]

You have probably a faulty jointsPerVertex value in your SkeletonAnimationSet constructor.

value must be:
jointIndexData.length / vertexData.length / 3;

   

LadyBug, Newbie
Posted: 17 September 2013 08:46 PM   Total Posts: 4   [ # 2 ]

Thank you so much for your quick reply Fabrice!

I will have a look into that. :D

   

LadyBug, Newbie
Posted: 17 September 2013 09:02 PM   Total Posts: 4   [ # 3 ]

That was the fix!
Thank you soo much! We are all so relieved :D

   

Avatar
Fabrice Closier, Administrator
Posted: 18 September 2013 08:59 AM   Total Posts: 1260   [ # 4 ]

You’re welcome. Don’t forget send some url when your project is up.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X