{"action":"created","issue":{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/824","repository_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit","labels_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/824/labels{/name}","comments_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/824/comments","events_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/824/events","html_url":"https://github.com/helix-toolkit/helix-toolkit/issues/824","id":337148636,"node_id":"MDU6SXNzdWUzMzcxNDg2MzY=","number":824,"title":"Homogeneous illumination using AmbientLight","user":{"login":"KrabatTilt","id":25710874,"node_id":"MDQ6VXNlcjI1NzEwODc0","avatar_url":"https://avatars0.githubusercontent.com/u/25710874?v=4","gravatar_id":"","url":"https://api.github.com/users/KrabatTilt","html_url":"https://github.com/KrabatTilt","followers_url":"https://api.github.com/users/KrabatTilt/followers","following_url":"https://api.github.com/users/KrabatTilt/following{/other_user}","gists_url":"https://api.github.com/users/KrabatTilt/gists{/gist_id}","starred_url":"https://api.github.com/users/KrabatTilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrabatTilt/subscriptions","organizations_url":"https://api.github.com/users/KrabatTilt/orgs","repos_url":"https://api.github.com/users/KrabatTilt/repos","events_url":"https://api.github.com/users/KrabatTilt/events{/privacy}","received_events_url":"https://api.github.com/users/KrabatTilt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-29T21:55:01Z","updated_at":"2018-06-29T22:05:57Z","closed_at":null,"author_association":"NONE","body":"I use Viewport3DX version 2.2.0\r\n\r\nI have a Viewport holding a GroupModel3D in which I load multiple textures. I want to illuminate the scene Homogeneously but it does not work. I thought AmbientLight3D would be correct light source for that. \r\n\r\nJust for testing I switched to directional light and it looked exactly the same as using ambient. Is that correct behaviour?\r\n\r\nBellow I attached a screen of my scene, Viewport and model generation code.\r\n\r\n![ambient](https://user-images.githubusercontent.com/25710874/42116196-80d94554-7bf6-11e8-8c07-fc575463e278.jpg)\r\n\r\n\r\n```xaml\r\n<hx:Viewport3DX x:Name=\"Viewport3Dx\" Grid.Row=\"0\" Grid.Column=\"0\" Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\"\r\n                        UseDefaultGestures=\"False\" ShowViewCube=\"False\"\r\n                        CameraRotationMode=\"Turntable\" CameraMode=\"Inspect\" IsRotationEnabled=\"False\"\r\n                        Camera=\"{Binding Camera}\" TouchDown=\"Viewport3Dx_OnTouchDown\" IsTouchRotateEnabled=\"False\"\r\n                        ZoomAroundMouseDownPoint=\"True\" MSAA=\"Disable\" FXAALevel=\"Low\" EnableD2DRendering=\"False\"\r\n                        BackgroundColor=\"{Binding BackgroundColor}\" IsViewCubeMoverEnabled=\"False\"\r\n                        ZoomDistanceLimitNear=\"20\"\r\n                        IsInertiaEnabled=\"True\">\r\n            <hx:Viewport3DX.InputBindings>\r\n                <MouseBinding Gesture=\"MiddleClick\" Command=\"hx:ViewportCommands.Zoom\" />\r\n                <MouseBinding Gesture=\"LeftClick\" Command=\"hx:ViewportCommands.Pan\" />\r\n            </hx:Viewport3DX.InputBindings>\r\n            <!--<hx:DirectionalLight3D Color=\"White\" Direction=\"0,0,-10\" />-->\r\n            <hx:AmbientLight3D Color=\"White\"></hx:AmbientLight3D>\r\n            <hx:GroupModel3D x:Name=\"ModelGroup\" />\r\n        </hx:Viewport3DX>\r\n```\r\n\r\n```c#\r\nMemoryStream ms = await GetImageAsMemoryStreamAsync(x, y);\r\n  var model = new MeshGeometryModel3D();\r\n                        var meshBuilder = new MeshBuilder();\r\n                        meshBuilder.AddBox(new Rect3D(rect.X, rect.Y, 0, rect.Width, rect.Height, 0.0), BoxFaces.PositiveZ);\r\n                        MeshGeometry3D geometry = meshBuilder.ToMeshGeometry3D();\r\n                        model.Geometry = geometry;\r\n                        model.Material = new HelixToolkit.Wpf.SharpDX.DiffuseMaterial\r\n                        {\r\n                            DiffuseMap = ms,\r\n                            DiffuseMapSampler = new SamplerStateDescription\r\n                            {\r\n                                AddressU = TextureAddressMode.Clamp,\r\n                                AddressV = TextureAddressMode.Clamp,\r\n                                AddressW = TextureAddressMode.Clamp,\r\n                                Filter = Filter.Anisotropic\r\n                            }\r\n                        };\r\n\r\n                        models.Add(model);\r\n```"},"comment":{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/comments/401485765","html_url":"https://github.com/helix-toolkit/helix-toolkit/issues/824#issuecomment-401485765","issue_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/824","id":401485765,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTQ4NTc2NQ==","user":{"login":"KrabatTilt","id":25710874,"node_id":"MDQ6VXNlcjI1NzEwODc0","avatar_url":"https://avatars0.githubusercontent.com/u/25710874?v=4","gravatar_id":"","url":"https://api.github.com/users/KrabatTilt","html_url":"https://github.com/KrabatTilt","followers_url":"https://api.github.com/users/KrabatTilt/followers","following_url":"https://api.github.com/users/KrabatTilt/following{/other_user}","gists_url":"https://api.github.com/users/KrabatTilt/gists{/gist_id}","starred_url":"https://api.github.com/users/KrabatTilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrabatTilt/subscriptions","organizations_url":"https://api.github.com/users/KrabatTilt/orgs","repos_url":"https://api.github.com/users/KrabatTilt/repos","events_url":"https://api.github.com/users/KrabatTilt/events{/privacy}","received_events_url":"https://api.github.com/users/KrabatTilt/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T22:05:57Z","updated_at":"2018-06-29T22:05:57Z","author_association":"NONE","body":"thx, PhongMaterial works great"}}
{"actor":{"display_login":"KrabatTilt"}}