{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/57255041","id":57255041,"diff_hunk":"@@ -176,9 +176,9 @@ void NetworkGeometry::setTextureWithNameToURL(const QString& name, const QUrl& u\n \n                 auto albedoMap = model::TextureMapPointer(new model::TextureMap());\n                 albedoMap->setTextureSource(material->albedoTexture->_textureSource);\n-                albedoMap->setTextureTransform(\n-                    oldTextureMaps[model::MaterialKey::ALBEDO_MAP]->getTextureTransform());\n-\n+                albedoMap->setTextureTransform(oldTextureMaps[model::MaterialKey::ALBEDO_MAP]->getTextureTransform());\n+                // when reassigning the albedo texture we also check for the alpha channel used as opacity\n+                albedoMap->setUseAlphaChannel(true); ","path":"libraries/model-networking/src/model-networking/ModelCache.cpp","position":9,"original_position":9,"commit_id":"22191a2864f9f0eaa5ba8a12e47279912cc04a36","original_commit_id":"22191a2864f9f0eaa5ba8a12e47279912cc04a36","user":{"login":"zzmp","id":5403956,"avatar_url":"https://avatars.githubusercontent.com/u/5403956?v=3","gravatar_id":"","url":"https://api.github.com/users/zzmp","html_url":"https://github.com/zzmp","followers_url":"https://api.github.com/users/zzmp/followers","following_url":"https://api.github.com/users/zzmp/following{/other_user}","gists_url":"https://api.github.com/users/zzmp/gists{/gist_id}","starred_url":"https://api.github.com/users/zzmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzmp/subscriptions","organizations_url":"https://api.github.com/users/zzmp/orgs","repos_url":"https://api.github.com/users/zzmp/repos","events_url":"https://api.github.com/users/zzmp/events{/privacy}","received_events_url":"https://api.github.com/users/zzmp/received_events","type":"User","site_admin":false},"body":"I think you should only do this if it was being done before.","created_at":"2016-03-23T23:34:41Z","updated_at":"2016-03-23T23:34:41Z","html_url":"https://github.com/highfidelity/hifi/pull/7432#discussion_r57255041","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/7432","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/57255041"},"html":{"href":"https://github.com/highfidelity/hifi/pull/7432#discussion_r57255041"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7432"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/7432","id":63810192,"html_url":"https://github.com/highfidelity/hifi/pull/7432","diff_url":"https://github.com/highfidelity/hifi/pull/7432.diff","patch_url":"https://github.com/highfidelity/hifi/pull/7432.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/7432","number":7432,"state":"open","locked":false,"title":"Fix some Model loading issues with the translucent textures","user":{"login":"samcake","id":2230265,"avatar_url":"https://avatars.githubusercontent.com/u/2230265?v=3","gravatar_id":"","url":"https://api.github.com/users/samcake","html_url":"https://github.com/samcake","followers_url":"https://api.github.com/users/samcake/followers","following_url":"https://api.github.com/users/samcake/following{/other_user}","gists_url":"https://api.github.com/users/samcake/gists{/gist_id}","starred_url":"https://api.github.com/users/samcake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samcake/subscriptions","organizations_url":"https://api.github.com/users/samcake/orgs","repos_url":"https://api.github.com/users/samcake/repos","events_url":"https://api.github.com/users/samcake/events{/privacy}","received_events_url":"https://api.github.com/users/samcake/received_events","type":"User","site_admin":false},"body":"Trying to address issues with the interpretation of the alpha channel of the albedo map.\r\nMaking sure we are honoring our Material Guide correctly:\r\nhttp://hifi-public.s3.amazonaws.com/sam/MaterialExportGuide/Material%20Export%20Guide.html\r\n\r\n- Cleaned up the names and bit flags for the Translucent / OpacityMask Map and TranslucentFactor.\r\n- The albedoMap, if detected as Translucent texture is then preprocessed to detect the level of opacity:\r\n -- Opaque (no alpha or all = 1),\r\n -- OpacityMask (0 or 1)\r\n -- Translucent (true use of the full range)\r\n- The material is categorized as:  \"SurfaceOpaque / TexelOpaque / Translucent\" based on the combination of the albedoMap translucency property and the translucencyFactor.\r\n\r\n- REvised the shader code to have a more systematic way of getting the \"opacity\" information in the fragment shader.\r\n\r\nTO TEST:\r\nTry this file:\r\nhttps://s3-us-west-1.amazonaws.com/hifi-content/DomainContent/Junkyard/Playa/transparentcube.fbx\r\nIt should be seen as transparent.\r\nUsing the FrameDebugger.js you could see it s indeed not rendered has opaque but instead as transparent\r\n\r\nThis file should not be rendered as transparent, it is the same model, same texture but not bound to \"transparency\" field of maya material:\r\nhttps://s3-us-west-1.amazonaws.com/hifi-content/DomainContent/Junkyard/Playa/breaktransparentcube.fbx\r\nIn the master build this would be seen transparent\r\n\r\nSimirlay with this 2 files testing the alpha channel used as OpacityMask:\r\n\r\nThis shoudl work in both builds and be seen in the debugFramebuffer.js as opaque\r\nhttps://s3-us-west-1.amazonaws.com/hifi-content/DomainContent/Junkyard/Playa/leaf_transparent.fbx\r\n\r\nThis file should be fully opaque (grey box + the leaf texture) in this build\r\nIt should be broken in the current master build\r\nhttps://s3-us-west-1.amazonaws.com/hifi-content/DomainContent/Junkyard/Playa/leaf_brokentransparency.fbx\r\n\r\n\r\n\r\n","created_at":"2016-03-22T23:32:28Z","updated_at":"2016-03-23T23:34:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed60c6c0986027d41d765723fb2b6a963ade60ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/7432/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/7432/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/7432/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/22191a2864f9f0eaa5ba8a12e47279912cc04a36","head":{"label":"samcake:orange","ref":"orange","sha":"22191a2864f9f0eaa5ba8a12e47279912cc04a36","user":{"login":"samcake","id":2230265,"avatar_url":"https://avatars.githubusercontent.com/u/2230265?v=3","gravatar_id":"","url":"https://api.github.com/users/samcake","html_url":"https://github.com/samcake","followers_url":"https://api.github.com/users/samcake/followers","following_url":"https://api.github.com/users/samcake/following{/other_user}","gists_url":"https://api.github.com/users/samcake/gists{/gist_id}","starred_url":"https://api.github.com/users/samcake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samcake/subscriptions","organizations_url":"https://api.github.com/users/samcake/orgs","repos_url":"https://api.github.com/users/samcake/repos","events_url":"https://api.github.com/users/samcake/events{/privacy}","received_events_url":"https://api.github.com/users/samcake/received_events","type":"User","site_admin":false},"repo":{"id":24736064,"name":"hifi","full_name":"samcake/hifi","owner":{"login":"samcake","id":2230265,"avatar_url":"https://avatars.githubusercontent.com/u/2230265?v=3","gravatar_id":"","url":"https://api.github.com/users/samcake","html_url":"https://github.com/samcake","followers_url":"https://api.github.com/users/samcake/followers","following_url":"https://api.github.com/users/samcake/following{/other_user}","gists_url":"https://api.github.com/users/samcake/gists{/gist_id}","starred_url":"https://api.github.com/users/samcake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samcake/subscriptions","organizations_url":"https://api.github.com/users/samcake/orgs","repos_url":"https://api.github.com/users/samcake/repos","events_url":"https://api.github.com/users/samcake/events{/privacy}","received_events_url":"https://api.github.com/users/samcake/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samcake/hifi","description":"Open, decentralized virtual worlds using sensors to control avatars and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.io/jobs  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/samcake/hifi","forks_url":"https://api.github.com/repos/samcake/hifi/forks","keys_url":"https://api.github.com/repos/samcake/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samcake/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samcake/hifi/teams","hooks_url":"https://api.github.com/repos/samcake/hifi/hooks","issue_events_url":"https://api.github.com/repos/samcake/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/samcake/hifi/events","assignees_url":"https://api.github.com/repos/samcake/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/samcake/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/samcake/hifi/tags","blobs_url":"https://api.github.com/repos/samcake/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samcake/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samcake/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/samcake/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samcake/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/samcake/hifi/languages","stargazers_url":"https://api.github.com/repos/samcake/hifi/stargazers","contributors_url":"https://api.github.com/repos/samcake/hifi/contributors","subscribers_url":"https://api.github.com/repos/samcake/hifi/subscribers","subscription_url":"https://api.github.com/repos/samcake/hifi/subscription","commits_url":"https://api.github.com/repos/samcake/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/samcake/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/samcake/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/samcake/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/samcake/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/samcake/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samcake/hifi/merges","archive_url":"https://api.github.com/repos/samcake/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samcake/hifi/downloads","issues_url":"https://api.github.com/repos/samcake/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/samcake/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/samcake/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/samcake/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samcake/hifi/labels{/name}","releases_url":"https://api.github.com/repos/samcake/hifi/releases{/id}","deployments_url":"https://api.github.com/repos/samcake/hifi/deployments","created_at":"2014-10-02T20:49:37Z","updated_at":"2015-04-02T23:12:49Z","pushed_at":"2016-03-23T23:13:02Z","git_url":"git://github.com/samcake/hifi.git","ssh_url":"git@github.com:samcake/hifi.git","clone_url":"https://github.com/samcake/hifi.git","svn_url":"https://github.com/samcake/hifi","homepage":"","size":191071,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"highfidelity:master","ref":"master","sha":"dbfea6ec8299cd9a9408ebb4fb4be38feb4cf7ea","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","deployments_url":"https://api.github.com/repos/highfidelity/hifi/deployments","created_at":"2012-08-10T18:26:22Z","updated_at":"2016-03-20T19:29:36Z","pushed_at":"2016-03-23T23:30:38Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":234780,"stargazers_count":361,"watchers_count":361,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":214,"mirror_url":null,"open_issues_count":65,"forks":214,"open_issues":65,"watchers":361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7432"},"html":{"href":"https://github.com/highfidelity/hifi/pull/7432"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/7432"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/7432/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7432/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7432/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/22191a2864f9f0eaa5ba8a12e47279912cc04a36"}}}}