Jump to content

Limit the number of light.


Dad72
 Share

Recommended Posts

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 directionnal

max 1 lights  hemispherique

max  20 lights spot

max 20 lights point

 

Thanks

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.  :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...