{"action":"created","issue":{"url":"https://api.github.com/repos/bjorntore/KebabOslo/issues/12","repository_url":"https://api.github.com/repos/bjorntore/KebabOslo","labels_url":"https://api.github.com/repos/bjorntore/KebabOslo/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/bjorntore/KebabOslo/issues/12/comments","events_url":"https://api.github.com/repos/bjorntore/KebabOslo/issues/12/events","html_url":"https://github.com/bjorntore/KebabOslo/issues/12","id":133601264,"number":12,"title":"Reduce quality when zoomed out","user":{"login":"Andrioden","id":393376,"avatar_url":"https://avatars.githubusercontent.com/u/393376?v=3","gravatar_id":"","url":"https://api.github.com/users/Andrioden","html_url":"https://github.com/Andrioden","followers_url":"https://api.github.com/users/Andrioden/followers","following_url":"https://api.github.com/users/Andrioden/following{/other_user}","gists_url":"https://api.github.com/users/Andrioden/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrioden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrioden/subscriptions","organizations_url":"https://api.github.com/users/Andrioden/orgs","repos_url":"https://api.github.com/users/Andrioden/repos","events_url":"https://api.github.com/users/Andrioden/events{/privacy}","received_events_url":"https://api.github.com/users/Andrioden/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bjorntore/KebabOslo/labels/performance","name":"performance","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bjorntore/KebabOslo/milestones/1","html_url":"https://github.com/bjorntore/KebabOslo/milestones/Scope%201","labels_url":"https://api.github.com/repos/bjorntore/KebabOslo/milestones/1/labels","id":1582286,"number":1,"title":"Scope 1","description":"* Random-genererer by\r\n  * Politistasjon\r\n  * Hus\r\n  * Skoler\r\n  * Uteplasser. Genererer kunder/personer\r\n  * Randomiser bydelsverdi, for eksempel et punkt.\r\n  * Parker\r\n  * Næringsliv\r\n* Kunder\r\n  * Spawner fra buildings\r\n  * DecideDestination() avgjør om de går til en sjappe eller om de går ut av brettet.\r\n    * Hvis for langt unna er avgjørende, gå ut av brettet i motsatt retning-ish (til en vis grad).\r\n    * Spawner reaksjons-boubles over hodet.\r\n  * Er det ikke nok kapasitet på en sjappe så går kunden etter hvert. Mister streetcred\r\n* Ditt kebab-emperie\r\n  * Har cash\r\n  * Har en operating cost\r\n    * Basert på antall ansatte\r\n    * Vedlikeholdskostnader på bygget\r\n  * Har streetcred\r\n* Kan bygge kebabsjappe overalt\r\n  * Koster å kjøpe tomt\r\n  * Tomme tomter er billigere\r\n  * Riving koster mere\r\n  * Har en max kapasitet\r\n  * Pris per kebab\r\n  * Scope 1.5 : Kan oppgradere\r\n* Ansetter folk\r\n  * Fast pris per person\r\n  * Per person er like flinke\r\n  * Øker kapasiteten til sjappa\r\n* Taper:\r\n  * Hvis du har minus-penger så så lenge.\r\n* Mål:\r\n  * Ingen konkret mål\r\n  * Achivements\r\n* En hjelpeknapp som viser hva de forskjellige reaksjons-boublesene betyr.","creator":{"login":"Andrioden","id":393376,"avatar_url":"https://avatars.githubusercontent.com/u/393376?v=3","gravatar_id":"","url":"https://api.github.com/users/Andrioden","html_url":"https://github.com/Andrioden","followers_url":"https://api.github.com/users/Andrioden/followers","following_url":"https://api.github.com/users/Andrioden/following{/other_user}","gists_url":"https://api.github.com/users/Andrioden/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrioden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrioden/subscriptions","organizations_url":"https://api.github.com/users/Andrioden/orgs","repos_url":"https://api.github.com/users/Andrioden/repos","events_url":"https://api.github.com/users/Andrioden/events{/privacy}","received_events_url":"https://api.github.com/users/Andrioden/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":1,"state":"open","created_at":"2016-02-14T23:13:16Z","updated_at":"2016-02-15T01:32:38Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-02-15T01:32:38Z","updated_at":"2016-02-15T18:34:02Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/bjorntore/KebabOslo/issues/comments/184339750","html_url":"https://github.com/bjorntore/KebabOslo/issues/12#issuecomment-184339750","issue_url":"https://api.github.com/repos/bjorntore/KebabOslo/issues/12","id":184339750,"user":{"login":"bjorntore","id":3596256,"avatar_url":"https://avatars.githubusercontent.com/u/3596256?v=3","gravatar_id":"","url":"https://api.github.com/users/bjorntore","html_url":"https://github.com/bjorntore","followers_url":"https://api.github.com/users/bjorntore/followers","following_url":"https://api.github.com/users/bjorntore/following{/other_user}","gists_url":"https://api.github.com/users/bjorntore/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorntore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorntore/subscriptions","organizations_url":"https://api.github.com/users/bjorntore/orgs","repos_url":"https://api.github.com/users/bjorntore/repos","events_url":"https://api.github.com/users/bjorntore/events{/privacy}","received_events_url":"https://api.github.com/users/bjorntore/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T18:34:02Z","updated_at":"2016-02-15T18:34:02Z","body":"\nhttps://software.intel.com/en-us/articles/how-to-plan-optimizations-with-unity\n\nLayer Cull Distances\n\nYour camera will not render game objects beyond the camera’s clipping plain in Unity. There is a way, through Unity scripting, to have certain layers set to a shorter clipping plane.\n\n\nFigure 8. Sample script taken from Unity*’s Online Documentation showing how to modify a layer’s culling distance\n\nIt takes a bit of work to set up game objects so they have a shorter culling distance. First, place the objects onto a layer. Then, write a script to modify an individual layer’s culling distance and attach it to the camera. The sample script in Figure 8 shows how a float array of 32 is created to correspond to the 32 possible layers available for creation under the Edit->Project Settings->Tags. Modifying a value for an index in your array and assigning it to camera.layerCullDistances will change the culling distance for the corresponding layer. If you do not assign a number for an index, the corresponding layer will use the camera’s far clip plane.\n\nTo test performance gains from layerCullDistances, I set up three scenes filled with small, medium, and large objects in terms of complexity. The scenes were arranged with a number of identical game objects grouped together and placed incrementally further and further away from the camera. I used Intel GPA to take FPS captures while incrementing the layer culling distance each time, adding another group of objects to the capture, i.e., the first capture had one group of objects, whereas the sixth capture had six groups of objects.\n\nFigures 9, 10, and 11 show the scenes I used for testing with the different types of objects.\n\nBoots: Poly – 278 Vertices – 218\n\nFigure 9. Test scene filled with low polygon and vertices count boot objects\n\nT-Rex’s: Poly – 4398 Vertices – 4400\n\nFigure 10. Test scene filled with medium polygon and vertices count dinosaur objects\n\nAirplane: Poly - 112,074 Vertices - 65,946\n\nFigure 11. Test scene filled with large polygon and vertices count airplane objects\n\nTables 3, 4, and 5 show the change in FPS for each of the scenes tested.\n\n\nTable 3. Data collected from the scene with boots (Figure 9)\n\n\nTable 4. Data collected from the scene with dinosaurs (Figure 10)\n\n\nTable 5. Data collected from the scene with airplanes (Figure 11)\n\n\nTable 6. Fantastic mode data from all the test scenes\n\nThis data shows that performance gains can be achieved from using the layerCullDistances feature within Unity.\n\nTable 6 illustrates how having more objects on the screen impacts performance, especially with complex objects. As a game developer, using the layerCullDistances proves to be very beneficial for performance if utilized properly. For example, smaller objects with a complex mesh that are farther away from the camera can be set up to only draw when the camera is close enough for the objects to be distinguished. While planning and designing a level, the developer needs to consider things like mesh complexity and the visibility of objects at a greater distance from the camera. By planning ahead, you can achieve greater benefits from using layerCullDistances.\n\n"}}