{"action":"created","comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/comments/67771927","id":67771927,"diff_hunk":"@@ -49,7 +61,13 @@ var options = {\n     binary : binary,\n     embed : !separate,\n     embedImage : !separateImage,\n-    quantize : quantize\n+    quantize : quantize,\n+    ao_diffuse : ao_diffuse,\n+    ao_scene : ao_scene,\n+    ao_rayDepth : ao_rayDepth,\n+    ao_resolution : ao_resolution,\n+    ao_samples : ao_samples,","path":"bin/gltf-pipeline.js","position":38,"original_position":38,"commit_id":"9efcfbdc0318e4682eb76c3c88b0939f3230c25c","original_commit_id":"9efcfbdc0318e4682eb76c3c88b0939f3230c25c","user":{"login":"lilleyse","id":915398,"avatar_url":"https://avatars.githubusercontent.com/u/915398?v=3","gravatar_id":"","url":"https://api.github.com/users/lilleyse","html_url":"https://github.com/lilleyse","followers_url":"https://api.github.com/users/lilleyse/followers","following_url":"https://api.github.com/users/lilleyse/following{/other_user}","gists_url":"https://api.github.com/users/lilleyse/gists{/gist_id}","starred_url":"https://api.github.com/users/lilleyse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilleyse/subscriptions","organizations_url":"https://api.github.com/users/lilleyse/orgs","repos_url":"https://api.github.com/users/lilleyse/repos","events_url":"https://api.github.com/users/lilleyse/events{/privacy}","received_events_url":"https://api.github.com/users/lilleyse/received_events","type":"User","site_admin":false},"body":"Perhaps pack all the AO properties into an object. Also this makes it less verbose in `gltfPipeline`.","created_at":"2016-06-20T21:40:25Z","updated_at":"2016-06-20T21:40:25Z","html_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/96#discussion_r67771927","pull_request_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/comments/67771927"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/96#discussion_r67771927"},"pull_request":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96","id":74312754,"html_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/96","diff_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/96.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/96.patch","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/96","number":96,"state":"open","locked":false,"title":"Naive AO is ready for a first look!","user":{"login":"likangning93","id":5395255,"avatar_url":"https://avatars.githubusercontent.com/u/5395255?v=3","gravatar_id":"","url":"https://api.github.com/users/likangning93","html_url":"https://github.com/likangning93","followers_url":"https://api.github.com/users/likangning93/followers","following_url":"https://api.github.com/users/likangning93/following{/other_user}","gists_url":"https://api.github.com/users/likangning93/gists{/gist_id}","starred_url":"https://api.github.com/users/likangning93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likangning93/subscriptions","organizations_url":"https://api.github.com/users/likangning93/orgs","repos_url":"https://api.github.com/users/likangning93/repos","events_url":"https://api.github.com/users/likangning93/events{/privacy}","received_events_url":"https://api.github.com/users/likangning93/received_events","type":"User","site_admin":false},"body":"Run:\r\n\r\n`node ./bin/gltf-pipeline.js ./specs/data/ambientOcclusion/cube_over_ground.gltf --ao_diffuse=true --ao_samples=128 --ao_rayDepth=1.0 --ao_resolution=64 -o hello_AO.gltf`\r\n\r\nThis takes a couple seconds on my machine, but it's a really small model.\r\n\r\nThis version of naiveAO outputs a gltf with a separate image for each primitive and adds materials and textures as needed. It won't work with models that don't have any diffuse-textured materials, though, since it tries to find reference materials and textures to clone.\r\n\r\n#### Tasks for this PR\r\n* [x] improve memory efficiency by raytracing \"on the fly\" instead of precomputing and storing all the sample points\r\n* [ ] improve sampling to avoid artifacts near the edges of triangles in UV space\r\n* [ ] profile the code to get an idea of how to make speed improvements\r\n\r\n#### Tasks for upcoming PRs\r\n* [ ] evaluate speed benefits using a uniform grid for faster raytracing\r\n* [ ] add an option to bake the AO to vertices or a separate texture and automatically modify relevant shader code\r\n* [ ] evaluate the speed and memory benefits of moving the raytracing math to basic types instead of `Cartesian3`\r\n* [ ] GPU-accelerate with CUDA or WebGL rasterization, e.g. [hemicube](http://the-witness.net/news/2010/09/hemicube-rendering-and-integration/)\r\n   * [ ] Expand to prebaking IBL?\r\n* [ ] UV preprocessing, checking, and cleanup: currently, this stage only works with primitives that already have normalized, non-overlapping UVs","created_at":"2016-06-17T22:16:34Z","updated_at":"2016-06-20T21:40:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16e7dfb32662c58406c33c9cc0f5960fafb5e54d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96/commits","review_comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96/comments","review_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/96/comments","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/statuses/9efcfbdc0318e4682eb76c3c88b0939f3230c25c","head":{"label":"AnalyticalGraphicsInc:naiveAO_PR","ref":"naiveAO_PR","sha":"9efcfbdc0318e4682eb76c3c88b0939f3230c25c","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":46226879,"name":"gltf-pipeline","full_name":"AnalyticalGraphicsInc/gltf-pipeline","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/gltf-pipeline","description":"Content pipeline tools for optimizing glTF assets. :globe_with_meridians:","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/deployments","created_at":"2015-11-15T17:00:20Z","updated_at":"2016-06-17T12:15:35Z","pushed_at":"2016-06-20T18:33:43Z","git_url":"git://github.com/AnalyticalGraphicsInc/gltf-pipeline.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/gltf-pipeline.git","clone_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline.git","svn_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline","homepage":"","size":7774,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":15,"forks":4,"open_issues":15,"watchers":17,"default_branch":"master"}},"base":{"label":"AnalyticalGraphicsInc:master","ref":"master","sha":"c86e6298c9d8f5243edc9c4c952153778cf93fd6","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":46226879,"name":"gltf-pipeline","full_name":"AnalyticalGraphicsInc/gltf-pipeline","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/gltf-pipeline","description":"Content pipeline tools for optimizing glTF assets. :globe_with_meridians:","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/deployments","created_at":"2015-11-15T17:00:20Z","updated_at":"2016-06-17T12:15:35Z","pushed_at":"2016-06-20T18:33:43Z","git_url":"git://github.com/AnalyticalGraphicsInc/gltf-pipeline.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/gltf-pipeline.git","clone_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline.git","svn_url":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline","homepage":"","size":7774,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":15,"forks":4,"open_issues":15,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/96"},"issue":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/96"},"comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/gltf-pipeline/statuses/9efcfbdc0318e4682eb76c3c88b0939f3230c25c"}}}}
{"actor":{"display_login":"lilleyse"}}