{"action":"created","issue":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/7078","repository_url":"https://api.github.com/repos/highfidelity/hifi","labels_url":"https://api.github.com/repos/highfidelity/hifi/issues/7078/labels{/name}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/7078/comments","events_url":"https://api.github.com/repos/highfidelity/hifi/issues/7078/events","html_url":"https://github.com/highfidelity/hifi/pull/7078","id":132882369,"number":7078,"title":"Reimplement light attenuation for spot and point lights","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},"labels":[{"url":"https://api.github.com/repos/highfidelity/hifi/labels/DO%20NOT%20MERGE","name":"DO NOT MERGE","color":"e11d21"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":10,"created_at":"2016-02-11T04:03:16Z","updated_at":"2016-02-22T23:22:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/7078","html_url":"https://github.com/highfidelity/hifi/pull/7078","diff_url":"https://github.com/highfidelity/hifi/pull/7078.diff","patch_url":"https://github.com/highfidelity/hifi/pull/7078.patch"},"body":"Reimplements light attenuation to bias and scale to a cutoff radius, instead of a cutoff intensity.\r\n\r\nLight attenuation had been implemented with an intensity threshold, such that a light surface radius was established to maintain that intensity. Because of this, light had a consistent brightness and then immediate dropoff.\r\n\r\nIn establishing light attenuation based on a radius threshold, the light surface radius is reduced (by default, although it is now settable) to 0.1m, and light falls off from the source by 1/r^2. ***This looks drastically different.*** The radius threshold is equivalent to the size of the light. There is not yet a way to change the surface radius of the light exposed to the user.\r\n\r\nCaveats:\r\n- If the radius cutoff is above some value, the light attenuation equation goes negative and nonsensical.\r\n- If the light intensity is high, the light energy will appear to bunch near the source, and things on the periphery will not be lit.\r\nToo solve these, I included a MAX_CUTOFF_INTENSITY, such that everything with an intensity over it will still be lit.\r\n\r\n***This makes lots of things that had looked lit, appear unlit, as the light now drops off with 1/r^2.***"},"comment":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/comments/187433969","html_url":"https://github.com/highfidelity/hifi/pull/7078#issuecomment-187433969","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/7078","id":187433969,"user":{"login":"hifi-gustavo","id":4554450,"avatar_url":"https://avatars.githubusercontent.com/u/4554450?v=3","gravatar_id":"","url":"https://api.github.com/users/hifi-gustavo","html_url":"https://github.com/hifi-gustavo","followers_url":"https://api.github.com/users/hifi-gustavo/followers","following_url":"https://api.github.com/users/hifi-gustavo/following{/other_user}","gists_url":"https://api.github.com/users/hifi-gustavo/gists{/gist_id}","starred_url":"https://api.github.com/users/hifi-gustavo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hifi-gustavo/subscriptions","organizations_url":"https://api.github.com/users/hifi-gustavo/orgs","repos_url":"https://api.github.com/users/hifi-gustavo/repos","events_url":"https://api.github.com/users/hifi-gustavo/events{/privacy}","received_events_url":"https://api.github.com/users/hifi-gustavo/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T23:22:18Z","updated_at":"2016-02-22T23:22:18Z","body":"Build console output for commit: 868e2ec96157f569bb49000e72a31b35672f44b4 available at: https://gist.github.com/111dab1e3c6e73c8675f<br/><br/>Installers available for download at: <br/>Windows: http://s3.amazonaws.com/hifi-public/pr-builds/HighFidelity-Alpha-PR7078.exe<br/>OS X: http://s3.amazonaws.com/hifi-public/pr-builds/HighFidelity-Alpha-PR7078.dmg"}}