Before updating to Windows 10 you may need to return your Pro license. More information here

How Can I Make a Large Flat Surface Lit By Many Lights?

I have a scene for which I want a very large, flat, untextured surface. This is trivially easy to accomplish in a number of ways, but unfortunately my scene is lit by a large number of small lights (streetlamps, in fact). This is a problem, because only a small number of lights can illuminate a single mesh. Turning the quality up increases the count a bit, but I have something like 30 lights so it's not enough. Their range is short enough that only 1-3 will illuminate any given pixel, but that doesn't help.

I tried chopping the flat surface up into a grid of distinct objects, but that doesn't work either because I need the surface to remain smooth. Chopping it up like this creates visible seams.

How should I make large, flat surfaces to avoid lighting problems? Or is it simply impossible?

more ▼

asked Jan 24, 2011 at 05:10 PM

avatar image

118 17 14 22

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Look into light baking (unless all those lights need to be dynamic): http://unity3d.com/support/documentation/Manual/Lightmapping.html

more ▼

answered Jan 24, 2011 at 06:02 PM

avatar image

34.7k 420 360 561

That should do the trick, thanks!

Jan 26, 2011 at 07:21 AM bateleur
(comments are locked)
10|3000 characters needed characters left

There is no limit on the number of lights that will illuminate a single mesh. (At least for pixel lights; the limit is 8 for vertex lights.) Increase the max number of pixel lights in the quality settings.

more ▼

answered Jan 24, 2011 at 05:30 PM

avatar image

121k 79 361 774

This works, but seems to cause performance problems once I get to very high light counts. Which I guess isn't too surprising!

Jan 26, 2011 at 07:20 AM bateleur

If you need dynamic lighting with many small lights, deferred rendering (Pro only) will speed things up quite a bit.

Jan 26, 2011 at 08:01 AM Eric5h5
(comments are locked)
10|3000 characters needed characters left

Were you chopping it up via code or the editor? If you're using the editor, you may get better results if you spawn the smaller plane objects with script and position them exactly where they should be

more ▼

answered Jan 24, 2011 at 06:14 PM

avatar image

45 8 6 12

Makes sense, but I was already using a script. (I think part of the problem was that the objects were cuboid, not actual planes, so the hidden edges were causing the seams.)

Jan 26, 2011 at 07:19 AM bateleur
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jan 24, 2011 at 05:10 PM

Seen: 2618 times

Last Updated: Jan 24, 2011 at 05:10 PM