{"action":"created","issue":{"url":"https://api.github.com/repos/GoranM/bdx/issues/235","labels_url":"https://api.github.com/repos/GoranM/bdx/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/GoranM/bdx/issues/235/comments","events_url":"https://api.github.com/repos/GoranM/bdx/issues/235/events","html_url":"https://github.com/GoranM/bdx/issues/235","id":67630341,"number":235,"title":"About Light and Shadows","user":{"login":"SolarLune","id":4733521,"avatar_url":"https://avatars.githubusercontent.com/u/4733521?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarLune","html_url":"https://github.com/SolarLune","followers_url":"https://api.github.com/users/SolarLune/followers","following_url":"https://api.github.com/users/SolarLune/following{/other_user}","gists_url":"https://api.github.com/users/SolarLune/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarLune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarLune/subscriptions","organizations_url":"https://api.github.com/users/SolarLune/orgs","repos_url":"https://api.github.com/users/SolarLune/repos","events_url":"https://api.github.com/users/SolarLune/events{/privacy}","received_events_url":"https://api.github.com/users/SolarLune/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-04-10T16:22:03Z","updated_at":"2015-06-14T20:44:41Z","closed_at":null,"body":"Hey, there. \r\n\r\nSo I figure some discussion on lighting would probably be a good idea. It'd be really nice to add in to the engine. As far as I can tell, there's support for some lighting in LibGDX already (Ambient, Point, Spot, and Directional), so we could work on adding those. I don't think the default shader does anything for spotlights at the moment, but there's a PR waiting in the LibGDX repo that would add it, so maybe the next version will have support that we could take advantage of.\r\n\r\nNow, would the idea be to create a single class for lights and change an internal `type` variable depending on what kind of light it is, or have a different class for each kind? I think I prefer the different classes because different light types use different variables. However, most of those variables would be shared (position, color, intensity, rotation (except for PointLights)), so the overall gain from different classes might be outweighed by the additional files.\r\n\r\nAlso, what's the naming convention? `PointLight`, `DirectionalLight`, and `SpotLight`? Ambient lighting doesn't need a whole class; it can just be directly exported from Blender and set.\r\n\r\nHaven't looked into shadowing too much yet; I guess it'd be better to get lighting in and working and then consider how shadows could be implemented.\r\n\r\nAnyway, thoughts?"},"comment":{"url":"https://api.github.com/repos/GoranM/bdx/issues/comments/111875079","html_url":"https://github.com/GoranM/bdx/issues/235#issuecomment-111875079","issue_url":"https://api.github.com/repos/GoranM/bdx/issues/235","id":111875079,"user":{"login":"rafcolson","id":10002909,"avatar_url":"https://avatars.githubusercontent.com/u/10002909?v=3","gravatar_id":"","url":"https://api.github.com/users/rafcolson","html_url":"https://github.com/rafcolson","followers_url":"https://api.github.com/users/rafcolson/followers","following_url":"https://api.github.com/users/rafcolson/following{/other_user}","gists_url":"https://api.github.com/users/rafcolson/gists{/gist_id}","starred_url":"https://api.github.com/users/rafcolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafcolson/subscriptions","organizations_url":"https://api.github.com/users/rafcolson/orgs","repos_url":"https://api.github.com/users/rafcolson/repos","events_url":"https://api.github.com/users/rafcolson/events{/privacy}","received_events_url":"https://api.github.com/users/rafcolson/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T20:44:41Z","updated_at":"2015-06-14T20:44:41Z","body":">Material / object-based shaders are different from 2D filters in that they need to be applied on the object level.\r\n\r\nI assume those shaders don't work with bdx filters then.\r\n\r\n>One approach would be to just adapt our Filters to be able to work with our modelInstance render loop (one or a stack per modelInstance / GameObject) here:\r\n\r\nSo any idea how to do this? Or better, with materials? I think the latter would seem the most logical implementation.\r\n\r\n>AFAIK, your approach of adding specularity should be the correct one. Try upping the specular intensity considerably to ensure it's not just LibGDX expecting a 0 - 255 range or something a bit odd like that.\r\n\r\nI'm not following.. do you mean my current approach should work?\r\n\r\n> would it be OK to aim for a large amount of graphical features\r\n\r\nWe could always have a checkbox to enable/disable this, couldn't we, for developers who prefer graphics to be light."}}