Animation problem (blender)

(Pepsi Tetra Hepta) #1

Hey there, first post here, I've just made my first animation in Blender and uploaded it on Sketchfab.

But there are two problems here, first I noticed that the animation went wrong, and i have no idea how to fix it, the box is supposed to end in the same pose as it has started in, but it goes on the side as it opens and closes.. In Blender everything looks right, I didn't change anything but the rotation of the model, that's why I have no idea why it kind of spins a little..

Second, the point light seems to work everywhere but on the inside of the top part of the box, which doesn't get light at all.

If anyone could give me a hint of a solution, or even tell me what I did wrong and how i could fix this, I would be really grateful!

EDIT: I was told I should post the .blend file, that it could help understanding the problem, so I made the file to be downloadable.

Animating popping at the end of cycle :-/
(Pepsi Tetra Hepta) #2

I thought I found the problem about the light since when I changed the box faces to be single sided, the inside that didn't get light went invisible, meaning that the normals were in the wrong way, but in fact, they were in the right way, so I thought i could try to flip them and see if that fixes the problem, and the only thing that has changed is now even in single sided, the model looks okay, but the lighting still doesn't work..

(Shaderbytes) #3

The normals are ok for most parts except the inside of the top lid , those are not facing the right direction. Do yourself a favour and enable "backface culling" in blender so you can get an idea of the normal direction.. Also check if you have any negative scaling on the object.. if you do , this will be reset to a possitive scale when uploading to sketchfab and of coarse this means the normals will get inverted when that happens.

Here is a video I did explaining the scale/normal relationship of a model in blender.

(Pepsi Tetra Hepta) #4

Alright, I did use the S -1 manipulation to copy the inside part of the box from down to up, to gain time, I didn't know doing this could screw up the normals in sketchfab, I don't think I've ever had this problem before, or I never noticed it..
Isn't it a problem on sketchfab side then? Or just something that you have to think of ..
By the way the first upload I did had all normals on the right side, I know how to show normals, (didn't know about the backface culling tho, thanks for this!) but the only way it would display right in single sided was to put them inside out, which really seemed weird to me, after your explanation I understand why this "worked".

Anyway, thank you for this, you fixed one of the problems I had, and I've learned a lesson!

Now if anyone has a clue why the animation goes out of place, I would be glad to hear from you! Thanks!

(Shaderbytes) #5

no it is not a problem in sketchfab , the normals are inverted in blender if you scale in edit mode , if you scale in object mode , blender is then handling inverting the normals back before rendering the preview or render etc.. as shown in my video .. if you actually apply the scale in blender it will then flip the normals and not render correctly ( if faces are single sided) The only thing to keep in mind is that scale is always applied when exporting to sketchfab. Glad I could help out.

You model does not have any animation? so I can not look at the issue. Upload a version with animations and I can have a look as well as the sketch fab development team.

chat soon

(Pepsi Tetra Hepta) #6

Well if you say so..

But there is an animation, I don't know if you have troubles seeing it but I can see it even when I'm not logged in, so I guess everyone should be able to see it too.

(Shaderbytes) #7

ok I see the animation now .. not sure why it loaded without it when I first looked. This is a bug on sketchfabs side. I have also had numerous rotation issues with animations before and the problem was due to some or other compression they perform on the data when uploading.

@stephomi any news when this is in the pipeline for a fix? I tested uploading the model as fbx and using the exporter. This user uploaded the blend , I also tried to add proper keys on the end frame , changed the rotation mode to Quaternion.. all the tests I did last time I also had errors.. nothing fixes the issue and this is a simple single axis rotation by 90 degrees

(Pepsi Tetra Hepta) #8

I was thinking of uploading it as fbx but couldn't find the motivation, thanks for trying it!
Kinda sad that nothing worked though, I'm sorry..
I'm somehow happy to know that this is a known thing that it's in the works :slight_smile:

I submitted a ticket to the support earlier today, but I guess from what you said that it's not an isolated problem, and that they're already on the case.

Anyway, thank you for your help!

(Mrchlblng) #9

@PepsiTetraHepta the animation issue you have is due to our animation compression. We must accumulate too much errors due to the rotation and end up with a visible shift. There's unfortunately not much you can do to bypass this, we'll work on a fix but don't have any ETA.

(Pepsi Tetra Hepta) #10

@mrchlblng Is there no way to fix this myself, like adding new keyframes on specific places, to keep it from moving by itself?

(Mrchlblng) #11

@PepsiTetraHepta as said, I can't see any way to bypass this compression issue at the moment. However, we should start improving our compressors so this should hopefully be fixed soon. We'll keep you informed. Sorry for the inconvenience.

Shaky animation problem FBX
(Mrchlblng) #12

@PepsiTetraHepta we just shipped a fix. You'll need to reupload your model to fix. Hopefully no more artifacts due to animation compression!

(Shaderbytes) #13

@mrchlblng when did you ship the fix? I just uploaded something and it is jumping

(Pepsi Tetra Hepta) #14

@mrchlblng IT WORKS ! :smiley: Good job guys!

(Pepsi Tetra Hepta) #15

@mrchlblng Welllll, it does work for the loop part, but there is still some warping if you look at the hinge part during the animation, but the loop works :smiley:

(Shaderbytes) #16

@mrchlblng I just did a fresh upload again just to test and the model is still jumping , I disabled blender doing any keyframe optimization and even cleaned any redundant channels in the fcurves for this bone. Rotation mode for this bone is Using Euler xyz.

(Shaderbytes) #17

@stephomi see post above , @mrchlblng is not responding , he mentioned a fix went live for rotation issues but as you can see above there are some problems. Just load the scene and watch the plane circle the globe .. you will notice the motion is very jumpy.


Well, it's late on a Friday in Paris :slight_smile:

(Mrchlblng) #19

@shaderbytes I did not say that all animation issues are resolved on sketchfab. We still have some rotation issues that have not been debugged yet. I can't tell if that the issue on your model as you previously did not post any url.

@PepsiTetraHepta I see the issue. The fix (which attempts to detect when doing "delta" prediction on rotations is safe) doesn't affect the hinge, I'm not sure why. I'll try to look after this but no ETA for a fix.

(Shaderbytes) #20

I forgot it is Friday :slight_smile:

I was just being pushy because I needed to know if there was going to be resolve for this because it directly affects my current work, no fix means I would have to scrap this model rotating and think up something else to add to the scene etc..

@mrchlblng I did share a link , twice. The model is is draft mode. Normally all staff members I have delt with previously dont have an issue accessing models in draft mode. The forum displays a rectangle with the text "Log into your Sketchfab account" .. that is the model hyperlink.