Dad72 Posted May 9, 2014 Share Posted May 9, 2014 hi, Why is there a limit to the number of light? because for a game, imagine two directional to the sun but then imagine that we want spots for various lighting like lamp nights. Made in lighting, we put a sun (2 directionnalLight) and a spotLight and you can not add any more lights. it does not works. Is it a bug ? It would not be possible to remove this limit is very restrictive to make a great game? Or acceptable limits: max 3 lights directionnalmax 1 lights hemispheriquemax 20 lights spotmax 20 lights point Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 9, 2014 Share Posted May 9, 2014 Because we are doing realtime 3D:) 4 simultaneous lights already produce shaders only sustainable on a DirectX10 class computer. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 This is not 4 simultaneous light, but 3. Therefore it may be a bug here. There is no way around it, making spot lights would be less consuming or I is not sure what. The lights were put up to 3 and the following does not work. most of the engines accept unlimited numbers of light, why Babylon accepts 3. is very poor light. I think there is something to reflect on that, because this limit is very very restrictive. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 10, 2014 Share Posted May 10, 2014 You can set up 1 millions lights but on a specific object no more than 4 (Yes 4: see this demo : http://www.babylonjs.com/index.html?LIGHTS --> 3 points and 1 directional)) Babylon.js 1.12 will introduce range for lights: This will be use to attenuate lights over distance. We could think about a way to not take in account a light when out of range and then free a spot for another one Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 10, 2014 Share Posted May 10, 2014 You can also use light.excludeMeshes to exclude specific meshes from specific lights to try to keep 4 lights per mesh Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 I have only 3 light on my ground, the 4 ième not Works. there must be a bug then. ah ok, so in the grounds I can not put that 4 lights, but I can use 4 different light to illuminate a boxing is what you tell me. I love an idea :We could think about a way to not take in account a light when out of range and then free a spot for another one In doing my idea was to be able to make a public lighting by outdoor lamps with sports that illuminates the path of a park or village at night. it takes more than 3 to illuminate the ground while the 5 meters, for example. J'imagine en gros une allée avec une 10 ene de spot qui éclaire le parc (donc le terrain) je ne voie pas d'idée la dessus. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 10, 2014 Share Posted May 10, 2014 You should think about not using dynamic lighting but static lighting (using emissive textures) Could you create a jsfiddle to repro the bug with your ground ? Is it a regular StandardMaterial used here? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 As I made my 2 Directional that simulates a sun can cast shadows. then I want sUse spot to make public and PointLight lighting to illuminate the interior of the house nights. This is just to make nice atmosphere at night. For bug:I, unwanted material from the WorldMonger coupling to standard material default to add the material of gaps WorldMonger. This may be because of that? Thank you also for all your helpful advice. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 10, 2014 Share Posted May 10, 2014 the ground uses a standardMaterial? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 no and yes. standardMaterial + GroundMaterial of WorlMonger (les 2 sont mélanger) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 10, 2014 Share Posted May 10, 2014 could be the problem:) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 Oh no, there are no bug. Alright already, I have 3 light on my scene. I forget that I am using a pointLinht on the Moon + 2 directionnalLight on my Sun. so I could add only a single light more. I was tired I think yesterday evening. Sorry Deltakosh But I totally agree your idea here: (You plan to add to the 1.12?)We could think about a way to not take in account a light when out of range and then free a spot for another one Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 for your idea DK , you think add in 1.12? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 10, 2014 Share Posted May 10, 2014 Did you see the streetlights demo in this post, dad72? It is not real lights, but it is a pretty good fake, yes? And you can put 1000 of those light poles all over a 3D town, and not use any 'real' lights to do that. Each light pole has a small piece of 'ground' for itself. If these fake lights were on a grass sports field or on grass in a park, you would need to texture the ground for the light poles... with a bright circle of grass texture, of course. Ok, sorry to interrupt... continue as wanted. I hope you guys are having a good weekend. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 10, 2014 Author Share Posted May 10, 2014 This seems like a great idea your artificial lights. Thank you, I had not seen this post.however, your link to download the zip is unavailable. Could you send a zip file containing all of this demo to see how you did. Thank you Wingnut. Good weekend to you also Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 10, 2014 Share Posted May 10, 2014 Thanks dad72. Zip url is fixed. I need to pay more attention to what I am doing. I have many .hasAlpha settings in there... on opacityTexture, on reflectionTexture... probably too many. So, I am saying that my code is not very good. I am not very experienced with textures. You will maybe have to improve things, as you are really good with textures. This demo is what they sometimes call a "proof of concept". Written to see if it can be done... but probably not done wisely. Each pole has 6 parts. pole1 (the base and parent), pole1a - the upright, scaled 10 tall, pole1b - the arm, scaled 7 wide, pole1c - the light cone, pole1d - the light bulb, and pole1e - the textured little piece of ground with transparency/alpha. Each is created in a function. A FOR-loop calls the function 15 times. That's all I remember about it. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 11, 2014 Author Share Posted May 11, 2014 Thanks Wingnut. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.