{"action":"created","comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/comments/70184606","id":70184606,"diff_hunk":"@@ -98,19 +112,54 @@ In either case, `header.gltfByteLength` contains the length of the glTF field in\n \n The `instances` field immediately follows the `glTF` field (which may be omitted when `header.gltfByteLength` is `0`).\n \n-The `instances` field contains `header.instancesLength` of tightly packed instances.  Each instance has three fields:\n+The `instances` field contains `header.instancesLength` of tightly packed instances.  Each instance has the following fields:\n+\n+| Field name | Data type | Description | Required |\n+| --- | --- | --- | --- |\n+| `position.x` | `uint16` | The x-coordinate in quantized cartesian coordinates. | `yes` |\n+| `position.y` | `uint16` | The y-coordinate in quantized cartesian coordinates. | `yes` |\n+| `position.z` | `uint16` | The z-coordinate in quantized cartesian coordinates. | `yes` |\n+| `v1.x` | `uint` | The first component of the oct-encoded vector `v1`. | `yes` |\n+| `v1.y` | `uint` | The second component of the oct-encoded vector `v1`. | `yes` |\n+| `v2.x` | `uint` | The first component of the oct-encoded vector `v2`. | `yes` |\n+| `v2.y` | `uint` | The second component of the oct-encoded vector `v2`. | `yes` |\n+| `batchId` | `uint16` | ID in the range `[0, length of arrays in the Batch Table)`, which indicates the corresponding properties. | `if header.batchTableByteLength > 0`\n+\n+### X, Y, and Z for Translation\n+\n+`x`, `y`, and `z` are stored as `uint16` positions in the quantized instance region defined by the `origin` and `span` fields in the header.\n+\n+**Figure 2:** The instance region defined by `origin` and `span`\n+\n+![](figures/instance-region.png)\n+\n+Transforming `position` in instance region space to `position_w` in world space can be done using the formula:\n+\n+`position_w` = `origin` + [`position` * `span` / (`2^16-1`)].\n+\n+### V1, and V2 for Rotation\n+\n+`v1` and `v2` are stored as two components in oct-encoded format as described in\n+[*A Survey of Efficient Representations of Independent Unit Vectors* by Cigolle et al.](http://jcgt.org/published/0003/02/01/)\n+The [AttributeCompression](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/AttributeCompression.js)\n+module in Cesium contains an implementation for encoding and decoding vectors in this fashion.\n+\n+In their decoded form, `v1` and `v2` establish a new orthonormal basis, effectively rotating the coordinate system.\n+\n+The `y` and `x` vectors in the natural basis are transformed to map onto `v1` and `v2` respectively.","path":"TileFormats/Instanced3DModel/README.md","position":84,"original_position":84,"commit_id":"54ba552a7a0f9fb2fbbae12ffabee8c21a7861f4","original_commit_id":"54ba552a7a0f9fb2fbbae12ffabee8c21a7861f4","user":{"login":"pjcozzi","id":782098,"avatar_url":"https://avatars.githubusercontent.com/u/782098?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcozzi","html_url":"https://github.com/pjcozzi","followers_url":"https://api.github.com/users/pjcozzi/followers","following_url":"https://api.github.com/users/pjcozzi/following{/other_user}","gists_url":"https://api.github.com/users/pjcozzi/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcozzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcozzi/subscriptions","organizations_url":"https://api.github.com/users/pjcozzi/orgs","repos_url":"https://api.github.com/users/pjcozzi/repos","events_url":"https://api.github.com/users/pjcozzi/events{/privacy}","received_events_url":"https://api.github.com/users/pjcozzi/received_events","type":"User","site_admin":false},"body":"Wouldn't it be more natural for readers to map x/y, not y/x.","created_at":"2016-07-10T16:25:48Z","updated_at":"2016-07-10T16:25:48Z","html_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/100#discussion_r70184606","pull_request_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/comments/70184606"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/100#discussion_r70184606"},"pull_request":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100","id":76796096,"html_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/100","diff_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/100.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/100.patch","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues/100","number":100,"state":"open","locked":false,"title":"I3dm updates","user":{"login":"lasalvavida","id":2489570,"avatar_url":"https://avatars.githubusercontent.com/u/2489570?v=3","gravatar_id":"","url":"https://api.github.com/users/lasalvavida","html_url":"https://github.com/lasalvavida","followers_url":"https://api.github.com/users/lasalvavida/followers","following_url":"https://api.github.com/users/lasalvavida/following{/other_user}","gists_url":"https://api.github.com/users/lasalvavida/gists{/gist_id}","starred_url":"https://api.github.com/users/lasalvavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasalvavida/subscriptions","organizations_url":"https://api.github.com/users/lasalvavida/orgs","repos_url":"https://api.github.com/users/lasalvavida/repos","events_url":"https://api.github.com/users/lasalvavida/events{/privacy}","received_events_url":"https://api.github.com/users/lasalvavida/received_events","type":"User","site_admin":false},"body":"@pjcozzi these are the i3dm spec changes. Can you take a look over this and tell me what you think?","created_at":"2016-07-08T18:40:52Z","updated_at":"2016-07-10T16:25:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8eafa3913809b2d0660186633087880798e8ee66","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100/commits","review_comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100/comments","review_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues/100/comments","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/statuses/54ba552a7a0f9fb2fbbae12ffabee8c21a7861f4","head":{"label":"lasalvavida:i3dm-updates","ref":"i3dm-updates","sha":"54ba552a7a0f9fb2fbbae12ffabee8c21a7861f4","user":{"login":"lasalvavida","id":2489570,"avatar_url":"https://avatars.githubusercontent.com/u/2489570?v=3","gravatar_id":"","url":"https://api.github.com/users/lasalvavida","html_url":"https://github.com/lasalvavida","followers_url":"https://api.github.com/users/lasalvavida/followers","following_url":"https://api.github.com/users/lasalvavida/following{/other_user}","gists_url":"https://api.github.com/users/lasalvavida/gists{/gist_id}","starred_url":"https://api.github.com/users/lasalvavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasalvavida/subscriptions","organizations_url":"https://api.github.com/users/lasalvavida/orgs","repos_url":"https://api.github.com/users/lasalvavida/repos","events_url":"https://api.github.com/users/lasalvavida/events{/privacy}","received_events_url":"https://api.github.com/users/lasalvavida/received_events","type":"User","site_admin":false},"repo":{"id":62892101,"name":"3d-tiles","full_name":"lasalvavida/3d-tiles","owner":{"login":"lasalvavida","id":2489570,"avatar_url":"https://avatars.githubusercontent.com/u/2489570?v=3","gravatar_id":"","url":"https://api.github.com/users/lasalvavida","html_url":"https://github.com/lasalvavida","followers_url":"https://api.github.com/users/lasalvavida/followers","following_url":"https://api.github.com/users/lasalvavida/following{/other_user}","gists_url":"https://api.github.com/users/lasalvavida/gists{/gist_id}","starred_url":"https://api.github.com/users/lasalvavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasalvavida/subscriptions","organizations_url":"https://api.github.com/users/lasalvavida/orgs","repos_url":"https://api.github.com/users/lasalvavida/repos","events_url":"https://api.github.com/users/lasalvavida/events{/privacy}","received_events_url":"https://api.github.com/users/lasalvavida/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lasalvavida/3d-tiles","description":"Specification for streaming massive heterogeneous 3D geospatial datasets :earth_americas: :post_office:. :deciduous_tree:","fork":true,"url":"https://api.github.com/repos/lasalvavida/3d-tiles","forks_url":"https://api.github.com/repos/lasalvavida/3d-tiles/forks","keys_url":"https://api.github.com/repos/lasalvavida/3d-tiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lasalvavida/3d-tiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lasalvavida/3d-tiles/teams","hooks_url":"https://api.github.com/repos/lasalvavida/3d-tiles/hooks","issue_events_url":"https://api.github.com/repos/lasalvavida/3d-tiles/issues/events{/number}","events_url":"https://api.github.com/repos/lasalvavida/3d-tiles/events","assignees_url":"https://api.github.com/repos/lasalvavida/3d-tiles/assignees{/user}","branches_url":"https://api.github.com/repos/lasalvavida/3d-tiles/branches{/branch}","tags_url":"https://api.github.com/repos/lasalvavida/3d-tiles/tags","blobs_url":"https://api.github.com/repos/lasalvavida/3d-tiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lasalvavida/3d-tiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lasalvavida/3d-tiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/lasalvavida/3d-tiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lasalvavida/3d-tiles/statuses/{sha}","languages_url":"https://api.github.com/repos/lasalvavida/3d-tiles/languages","stargazers_url":"https://api.github.com/repos/lasalvavida/3d-tiles/stargazers","contributors_url":"https://api.github.com/repos/lasalvavida/3d-tiles/contributors","subscribers_url":"https://api.github.com/repos/lasalvavida/3d-tiles/subscribers","subscription_url":"https://api.github.com/repos/lasalvavida/3d-tiles/subscription","commits_url":"https://api.github.com/repos/lasalvavida/3d-tiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/lasalvavida/3d-tiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/lasalvavida/3d-tiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/lasalvavida/3d-tiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/lasalvavida/3d-tiles/contents/{+path}","compare_url":"https://api.github.com/repos/lasalvavida/3d-tiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lasalvavida/3d-tiles/merges","archive_url":"https://api.github.com/repos/lasalvavida/3d-tiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lasalvavida/3d-tiles/downloads","issues_url":"https://api.github.com/repos/lasalvavida/3d-tiles/issues{/number}","pulls_url":"https://api.github.com/repos/lasalvavida/3d-tiles/pulls{/number}","milestones_url":"https://api.github.com/repos/lasalvavida/3d-tiles/milestones{/number}","notifications_url":"https://api.github.com/repos/lasalvavida/3d-tiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lasalvavida/3d-tiles/labels{/name}","releases_url":"https://api.github.com/repos/lasalvavida/3d-tiles/releases{/id}","deployments_url":"https://api.github.com/repos/lasalvavida/3d-tiles/deployments","created_at":"2016-07-08T13:50:59Z","updated_at":"2016-07-07T08:30:35Z","pushed_at":"2016-07-08T18:36:00Z","git_url":"git://github.com/lasalvavida/3d-tiles.git","ssh_url":"git@github.com:lasalvavida/3d-tiles.git","clone_url":"https://github.com/lasalvavida/3d-tiles.git","svn_url":"https://github.com/lasalvavida/3d-tiles","homepage":"","size":9713,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AnalyticalGraphicsInc:i3dm-updates","ref":"i3dm-updates","sha":"b14416908f79d66342715fa03ad7ba3153fe1a3e","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"repo":{"id":36929005,"name":"3d-tiles","full_name":"AnalyticalGraphicsInc/3d-tiles","owner":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles","description":"Specification for streaming massive heterogeneous 3D geospatial datasets :earth_americas: :post_office:. :deciduous_tree:","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/releases{/id}","deployments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/deployments","created_at":"2015-06-05T11:23:23Z","updated_at":"2016-07-07T08:30:35Z","pushed_at":"2016-07-08T18:40:52Z","git_url":"git://github.com/AnalyticalGraphicsInc/3d-tiles.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/3d-tiles.git","clone_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles.git","svn_url":"https://github.com/AnalyticalGraphicsInc/3d-tiles","homepage":"","size":9640,"stargazers_count":90,"watchers_count":90,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":27,"forks":21,"open_issues":27,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/100"},"issue":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues/100"},"comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/3d-tiles/statuses/54ba552a7a0f9fb2fbbae12ffabee8c21a7861f4"}}}}
{"actor":{"display_login":"pjcozzi"}}