{"action":"opened","number":229,"pull_request":{"url":"https://api.github.com/repos/BabylonJS/Exporters/pulls/229","id":195664030,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NjY0MDMw","html_url":"https://github.com/BabylonJS/Exporters/pull/229","diff_url":"https://github.com/BabylonJS/Exporters/pull/229.diff","patch_url":"https://github.com/BabylonJS/Exporters/pull/229.patch","issue_url":"https://api.github.com/repos/BabylonJS/Exporters/issues/229","number":229,"state":"open","locked":false,"title":"Non uniform object offset scales","user":{"login":"tkazik","id":15689124,"node_id":"MDQ6VXNlcjE1Njg5MTI0","avatar_url":"https://avatars2.githubusercontent.com/u/15689124?v=4","gravatar_id":"","url":"https://api.github.com/users/tkazik","html_url":"https://github.com/tkazik","followers_url":"https://api.github.com/users/tkazik/followers","following_url":"https://api.github.com/users/tkazik/following{/other_user}","gists_url":"https://api.github.com/users/tkazik/gists{/gist_id}","starred_url":"https://api.github.com/users/tkazik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkazik/subscriptions","organizations_url":"https://api.github.com/users/tkazik/orgs","repos_url":"https://api.github.com/users/tkazik/repos","events_url":"https://api.github.com/users/tkazik/events{/privacy}","received_events_url":"https://api.github.com/users/tkazik/received_events","type":"User","site_admin":false},"body":"suggested fix for https://github.com/BabylonJS/Exporters/issues/214\r\n\r\nold vs new:\r\n![old_vs_new](https://user-images.githubusercontent.com/15689124/41565070-761cf3da-7355-11e8-86ac-1fe91409cf3e.png)\r\n\r\n\r\nAgain, few hours of debugging needed to sort of understand what 3ds max does under the hood (unfortunately, their sdk documentation is not really complete and it could be much more comprehensive). The code should be quite self-explanatory, but here is a short wrap-up:\r\n\r\n1. The interesting variables (`ObjOffsetScale` and `ObjOffsetRot` are properties of `meshNode`, which is why `meshNode` is propagated all the way to the function `CreateGlobalVertex`.\r\n\r\n2. The objectOffset-scale and -rotation are in a LH coordinate system.\r\n\r\n3. Actual computation of normal: Undo offset rotation, apply offset scale, re-rotate normal\r\n\r\nNote: To deal with negative node and offset scales, I had to take the absolute value during the normal computation. Probably, there is a cleverer way to to that (connected with the parity check), but I wasn't able to figure that out...and the current version runs fine.\r\n\r\nTo do / future work / open points:\r\n- Needed: Move tangent computation after normal computation, as the tangents depend on the normals\r\n- Nice to have: Think about propagation of `meshnode `and `babylonAbstractMesh`...maybe there is a nicer way.\r\n\r\n- If plenty of time available: There should be a way to get rid of the absolute value function during normal computation...might be related to the parity checking and normal flipping.\r\n\r\nLooking forward to you feedback\r\n\r\nPS: Some testing material: [testModels.zip](https://github.com/BabylonJS/Exporters/files/2113157/testModels.zip)\r\n","created_at":"2018-06-18T22:17:25Z","updated_at":"2018-06-18T22:17:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BabylonJS/Exporters/pulls/229/commits","review_comments_url":"https://api.github.com/repos/BabylonJS/Exporters/pulls/229/comments","review_comment_url":"https://api.github.com/repos/BabylonJS/Exporters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BabylonJS/Exporters/issues/229/comments","statuses_url":"https://api.github.com/repos/BabylonJS/Exporters/statuses/f299532234f8afdc016ad0b7da4692cd02a5a9da","head":{"label":"tkazik:nonUniformObjectOffsetScales","ref":"nonUniformObjectOffsetScales","sha":"f299532234f8afdc016ad0b7da4692cd02a5a9da","user":{"login":"tkazik","id":15689124,"node_id":"MDQ6VXNlcjE1Njg5MTI0","avatar_url":"https://avatars2.githubusercontent.com/u/15689124?v=4","gravatar_id":"","url":"https://api.github.com/users/tkazik","html_url":"https://github.com/tkazik","followers_url":"https://api.github.com/users/tkazik/followers","following_url":"https://api.github.com/users/tkazik/following{/other_user}","gists_url":"https://api.github.com/users/tkazik/gists{/gist_id}","starred_url":"https://api.github.com/users/tkazik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkazik/subscriptions","organizations_url":"https://api.github.com/users/tkazik/orgs","repos_url":"https://api.github.com/users/tkazik/repos","events_url":"https://api.github.com/users/tkazik/events{/privacy}","received_events_url":"https://api.github.com/users/tkazik/received_events","type":"User","site_admin":false},"repo":{"id":124304949,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQzMDQ5NDk=","name":"Exporters","full_name":"tkazik/Exporters","owner":{"login":"tkazik","id":15689124,"node_id":"MDQ6VXNlcjE1Njg5MTI0","avatar_url":"https://avatars2.githubusercontent.com/u/15689124?v=4","gravatar_id":"","url":"https://api.github.com/users/tkazik","html_url":"https://github.com/tkazik","followers_url":"https://api.github.com/users/tkazik/followers","following_url":"https://api.github.com/users/tkazik/following{/other_user}","gists_url":"https://api.github.com/users/tkazik/gists{/gist_id}","starred_url":"https://api.github.com/users/tkazik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkazik/subscriptions","organizations_url":"https://api.github.com/users/tkazik/orgs","repos_url":"https://api.github.com/users/tkazik/repos","events_url":"https://api.github.com/users/tkazik/events{/privacy}","received_events_url":"https://api.github.com/users/tkazik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkazik/Exporters","description":"Exporters for Babylon.js and gltf file formats","fork":true,"url":"https://api.github.com/repos/tkazik/Exporters","forks_url":"https://api.github.com/repos/tkazik/Exporters/forks","keys_url":"https://api.github.com/repos/tkazik/Exporters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkazik/Exporters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkazik/Exporters/teams","hooks_url":"https://api.github.com/repos/tkazik/Exporters/hooks","issue_events_url":"https://api.github.com/repos/tkazik/Exporters/issues/events{/number}","events_url":"https://api.github.com/repos/tkazik/Exporters/events","assignees_url":"https://api.github.com/repos/tkazik/Exporters/assignees{/user}","branches_url":"https://api.github.com/repos/tkazik/Exporters/branches{/branch}","tags_url":"https://api.github.com/repos/tkazik/Exporters/tags","blobs_url":"https://api.github.com/repos/tkazik/Exporters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkazik/Exporters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkazik/Exporters/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkazik/Exporters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkazik/Exporters/statuses/{sha}","languages_url":"https://api.github.com/repos/tkazik/Exporters/languages","stargazers_url":"https://api.github.com/repos/tkazik/Exporters/stargazers","contributors_url":"https://api.github.com/repos/tkazik/Exporters/contributors","subscribers_url":"https://api.github.com/repos/tkazik/Exporters/subscribers","subscription_url":"https://api.github.com/repos/tkazik/Exporters/subscription","commits_url":"https://api.github.com/repos/tkazik/Exporters/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkazik/Exporters/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkazik/Exporters/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkazik/Exporters/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkazik/Exporters/contents/{+path}","compare_url":"https://api.github.com/repos/tkazik/Exporters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkazik/Exporters/merges","archive_url":"https://api.github.com/repos/tkazik/Exporters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkazik/Exporters/downloads","issues_url":"https://api.github.com/repos/tkazik/Exporters/issues{/number}","pulls_url":"https://api.github.com/repos/tkazik/Exporters/pulls{/number}","milestones_url":"https://api.github.com/repos/tkazik/Exporters/milestones{/number}","notifications_url":"https://api.github.com/repos/tkazik/Exporters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkazik/Exporters/labels{/name}","releases_url":"https://api.github.com/repos/tkazik/Exporters/releases{/id}","deployments_url":"https://api.github.com/repos/tkazik/Exporters/deployments","created_at":"2018-03-07T23:01:13Z","updated_at":"2018-06-08T20:03:21Z","pushed_at":"2018-06-18T21:37:45Z","git_url":"git://github.com/tkazik/Exporters.git","ssh_url":"git@github.com:tkazik/Exporters.git","clone_url":"https://github.com/tkazik/Exporters.git","svn_url":"https://github.com/tkazik/Exporters","homepage":null,"size":529558,"stargazers_count":0,"watchers_count":0,"language":"Mathematica","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BabylonJS:master","ref":"master","sha":"fbbb0d7b2cc45159cc9ff8453437818572b52194","user":{"login":"BabylonJS","id":4855800,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NTU4MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/4855800?v=4","gravatar_id":"","url":"https://api.github.com/users/BabylonJS","html_url":"https://github.com/BabylonJS","followers_url":"https://api.github.com/users/BabylonJS/followers","following_url":"https://api.github.com/users/BabylonJS/following{/other_user}","gists_url":"https://api.github.com/users/BabylonJS/gists{/gist_id}","starred_url":"https://api.github.com/users/BabylonJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BabylonJS/subscriptions","organizations_url":"https://api.github.com/users/BabylonJS/orgs","repos_url":"https://api.github.com/users/BabylonJS/repos","events_url":"https://api.github.com/users/BabylonJS/events{/privacy}","received_events_url":"https://api.github.com/users/BabylonJS/received_events","type":"Organization","site_admin":false},"repo":{"id":106941366,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY5NDEzNjY=","name":"Exporters","full_name":"BabylonJS/Exporters","owner":{"login":"BabylonJS","id":4855800,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NTU4MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/4855800?v=4","gravatar_id":"","url":"https://api.github.com/users/BabylonJS","html_url":"https://github.com/BabylonJS","followers_url":"https://api.github.com/users/BabylonJS/followers","following_url":"https://api.github.com/users/BabylonJS/following{/other_user}","gists_url":"https://api.github.com/users/BabylonJS/gists{/gist_id}","starred_url":"https://api.github.com/users/BabylonJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BabylonJS/subscriptions","organizations_url":"https://api.github.com/users/BabylonJS/orgs","repos_url":"https://api.github.com/users/BabylonJS/repos","events_url":"https://api.github.com/users/BabylonJS/events{/privacy}","received_events_url":"https://api.github.com/users/BabylonJS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BabylonJS/Exporters","description":"Exporters for Babylon.js and gltf file formats","fork":false,"url":"https://api.github.com/repos/BabylonJS/Exporters","forks_url":"https://api.github.com/repos/BabylonJS/Exporters/forks","keys_url":"https://api.github.com/repos/BabylonJS/Exporters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BabylonJS/Exporters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BabylonJS/Exporters/teams","hooks_url":"https://api.github.com/repos/BabylonJS/Exporters/hooks","issue_events_url":"https://api.github.com/repos/BabylonJS/Exporters/issues/events{/number}","events_url":"https://api.github.com/repos/BabylonJS/Exporters/events","assignees_url":"https://api.github.com/repos/BabylonJS/Exporters/assignees{/user}","branches_url":"https://api.github.com/repos/BabylonJS/Exporters/branches{/branch}","tags_url":"https://api.github.com/repos/BabylonJS/Exporters/tags","blobs_url":"https://api.github.com/repos/BabylonJS/Exporters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BabylonJS/Exporters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BabylonJS/Exporters/git/refs{/sha}","trees_url":"https://api.github.com/repos/BabylonJS/Exporters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BabylonJS/Exporters/statuses/{sha}","languages_url":"https://api.github.com/repos/BabylonJS/Exporters/languages","stargazers_url":"https://api.github.com/repos/BabylonJS/Exporters/stargazers","contributors_url":"https://api.github.com/repos/BabylonJS/Exporters/contributors","subscribers_url":"https://api.github.com/repos/BabylonJS/Exporters/subscribers","subscription_url":"https://api.github.com/repos/BabylonJS/Exporters/subscription","commits_url":"https://api.github.com/repos/BabylonJS/Exporters/commits{/sha}","git_commits_url":"https://api.github.com/repos/BabylonJS/Exporters/git/commits{/sha}","comments_url":"https://api.github.com/repos/BabylonJS/Exporters/comments{/number}","issue_comment_url":"https://api.github.com/repos/BabylonJS/Exporters/issues/comments{/number}","contents_url":"https://api.github.com/repos/BabylonJS/Exporters/contents/{+path}","compare_url":"https://api.github.com/repos/BabylonJS/Exporters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BabylonJS/Exporters/merges","archive_url":"https://api.github.com/repos/BabylonJS/Exporters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BabylonJS/Exporters/downloads","issues_url":"https://api.github.com/repos/BabylonJS/Exporters/issues{/number}","pulls_url":"https://api.github.com/repos/BabylonJS/Exporters/pulls{/number}","milestones_url":"https://api.github.com/repos/BabylonJS/Exporters/milestones{/number}","notifications_url":"https://api.github.com/repos/BabylonJS/Exporters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BabylonJS/Exporters/labels{/name}","releases_url":"https://api.github.com/repos/BabylonJS/Exporters/releases{/id}","deployments_url":"https://api.github.com/repos/BabylonJS/Exporters/deployments","created_at":"2017-10-14T15:58:39Z","updated_at":"2018-06-15T15:18:03Z","pushed_at":"2018-06-14T13:41:21Z","git_url":"git://github.com/BabylonJS/Exporters.git","ssh_url":"git@github.com:BabylonJS/Exporters.git","clone_url":"https://github.com/BabylonJS/Exporters.git","svn_url":"https://github.com/BabylonJS/Exporters","homepage":null,"size":527733,"stargazers_count":61,"watchers_count":61,"language":"Mathematica","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":70,"open_issues":19,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BabylonJS/Exporters/pulls/229"},"html":{"href":"https://github.com/BabylonJS/Exporters/pull/229"},"issue":{"href":"https://api.github.com/repos/BabylonJS/Exporters/issues/229"},"comments":{"href":"https://api.github.com/repos/BabylonJS/Exporters/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/BabylonJS/Exporters/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/BabylonJS/Exporters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BabylonJS/Exporters/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/BabylonJS/Exporters/statuses/f299532234f8afdc016ad0b7da4692cd02a5a9da"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":3,"additions":70,"deletions":12,"changed_files":1}}
{"actor":{"display_login":"tkazik"}}