{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/6082","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/6082/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/6082/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/6082/events","html_url":"https://github.com/mrdoob/three.js/issues/6082","id":57761269,"number":6082,"title":"Blender Exporting Animations - Normalizing Quaternions","user":{"login":"willy-vvu","id":3529065,"avatar_url":"https://avatars.githubusercontent.com/u/3529065?v=3","gravatar_id":"","url":"https://api.github.com/users/willy-vvu","html_url":"https://github.com/willy-vvu","followers_url":"https://api.github.com/users/willy-vvu/followers","following_url":"https://api.github.com/users/willy-vvu/following{/other_user}","gists_url":"https://api.github.com/users/willy-vvu/gists{/gist_id}","starred_url":"https://api.github.com/users/willy-vvu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willy-vvu/subscriptions","organizations_url":"https://api.github.com/users/willy-vvu/orgs","repos_url":"https://api.github.com/users/willy-vvu/repos","events_url":"https://api.github.com/users/willy-vvu/events{/privacy}","received_events_url":"https://api.github.com/users/willy-vvu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mrdoob/three.js/labels/Enhancement","name":"Enhancement","color":"deffdb"}],"state":"open","locked":false,"assignee":{"login":"repsac","id":1109289,"avatar_url":"https://avatars.githubusercontent.com/u/1109289?v=3","gravatar_id":"","url":"https://api.github.com/users/repsac","html_url":"https://github.com/repsac","followers_url":"https://api.github.com/users/repsac/followers","following_url":"https://api.github.com/users/repsac/following{/other_user}","gists_url":"https://api.github.com/users/repsac/gists{/gist_id}","starred_url":"https://api.github.com/users/repsac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repsac/subscriptions","organizations_url":"https://api.github.com/users/repsac/orgs","repos_url":"https://api.github.com/users/repsac/repos","events_url":"https://api.github.com/users/repsac/events{/privacy}","received_events_url":"https://api.github.com/users/repsac/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-02-16T03:21:15Z","updated_at":"2015-02-17T22:11:13Z","closed_at":null,"body":"This is more of a quick fix, though I'm not sure where to delve into the exporter source just yet.\r\n\r\nIn blender, it's easy to get quaternions that are not normalized, especially when using *Push Pose* (`Ctrl+E`). For example:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/3529065/6206790/f88f748a-b55f-11e4-9344-d0c0ad38744b.png)\r\n\r\nHowever, these get exported without being normalized.\r\n```json\r\n{\r\n  \"keys\": [{\r\n    \"time\": 0.283333,\r\n    \"pos\": [-0.104213,-0.116123,-0.0],\r\n    \"rot\": [-0.500419,0.0,-0.0,1.178179]\r\n  }]\r\n}\r\n```\r\n\r\nWhen imported, it causes `THREE.SkinnedMesh` to scale strangely, as non-normalized quaternions usually do.\r\n\r\nThis can be fixed by normalizing them in the exporter.\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/74765656","html_url":"https://github.com/mrdoob/three.js/issues/6082#issuecomment-74765656","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/6082","id":74765656,"user":{"login":"repsac","id":1109289,"avatar_url":"https://avatars.githubusercontent.com/u/1109289?v=3","gravatar_id":"","url":"https://api.github.com/users/repsac","html_url":"https://github.com/repsac","followers_url":"https://api.github.com/users/repsac/followers","following_url":"https://api.github.com/users/repsac/following{/other_user}","gists_url":"https://api.github.com/users/repsac/gists{/gist_id}","starred_url":"https://api.github.com/users/repsac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repsac/subscriptions","organizations_url":"https://api.github.com/users/repsac/orgs","repos_url":"https://api.github.com/users/repsac/repos","events_url":"https://api.github.com/users/repsac/events{/privacy}","received_events_url":"https://api.github.com/users/repsac/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T22:11:13Z","updated_at":"2015-02-17T22:11:13Z","body":"So I tried inserting a single line right after https://github.com/mrdoob/three.js/blob/dev/utils/exporters/blender/addons/io_three/exporter/api/animation.py#L276\r\n\r\nwith `rot.normalize()`\r\n\r\nhelp according to Blender:\r\n```\r\n>>> help(rot.normalize)\r\nHelp on built-in function normalize:\r\n\r\nnormalize(...) method of builtins.Quaternion instance\r\n    .. function:: normalize()\r\n    \r\n    Normalize the quaternion.\r\n```\r\n\r\nI don't have a scene that has the exact problem that you have with quaternions. In fact the animation scenes I do have that I tested exploded when I added this. You will want to test this on your end and if it solves your problem then it may have to be an option (off by default) that is available for users trouble shooting their exports. If that doesn't work then at the moment I am a bit clueless as I would expect a `normalize` method to have resolved this."}}