Finally found the issue with lightmapping, unity dosent like multiple lights?

So I finally started to mess even more with the lightmapping and basically streetlights lighting up their surroundings with self illuminating materials…

Self illuminating didnt work all that well to start with… tried amping up the lights and all i got was un uniform lighting going anywhere that it wanted but not where i wanted.

So i started doing it manually, setting up point lights and spot lights to light up exactly what i wanted.

found an issue that quite frankly is disturbing.

I created 8 lights attached to a building. Started setting them up to illuminate properly. Moved to the next set. Came around the building and after looping the building what seemed to be forever (jeez i thought i already turned that light on) i came to realise that when i made one light bright enough to be seen in the scene, other lights dimmed and didnt illuminate anymore.

I increased the intensity of the newly dim light, and the light i just got done making brighter, “turned off” basically.

So im deducing that either unity cannot seem to handle multiple lights or im doing something wrong.

Im going for unity.

It’s not Unity. Increase the number of pixel lights in the quality settings.

–Eric

Ok, well, whatever. (edit: the whatever wasnt directed to you Eric. you ninjad me) I turned all the lights rendering mode to important.

Fixes lights… but dosent tell me how to fix a self illuminated material doing the same thing. You know… like beacons on a building. The red ones on poles. I have those on my buildings. when i use Self illuminated material Some of them are on, and some arent.

When i use lights with important rendering, they all work correctly.

Not sure where in unity i tell self illuminated materials to behave like “render mode important” lights.

Get what im saying now? lol.

oh and sorry for MY ODD use of Capitals whenever i Capital and dont capital anything. I just let the fingers do what they want.

EDIT: alas when i render those lights into a lightmap, they do the same damn thing (some working and some not)

blah unity is giving me a damn headache

Edit edit: saw the lights thing. Set it to 9999 to see what happens :slight_smile:

Ok, im just about to give up on this whole thing. Beast seems to just completely ignore lights. I Manually set up lights in the scene, had them all on and nice and bright, hit the bake button to bake the lights into the lightmap of the object… delete the lights after the render is done… and whaddaya know… no light baking at all.

this is seriously irritating. Ive tried multiple methods. overbaking the lights to EXTREME values and i cant even get them to show up. I have 8 out of 40 lights casting their glow on the surface. I set my quality settings for everything to display 9999 pixel lights… etc…

Im seriously confused. Is unity and beast capable of making lightmaps or is it just capable of making shadow maps?

(p.s. the irritating thing is, i can see the lights in editor mode baked into the lightmap, but when i run the game, i dont see them. like wtf? they are BAKED into the lightmap and the lights that made the shadows dont exist anymore, how can unity selectively ignore specific parts of a lightmap?

your probably using the dual lightmapping method… where u have bounce light , and then u have one for shadow maps… when u get close to objects ur shadow maps disappear. probably because your shadow distance is set to very low or something.

ill look into that thanks

Materials using the Self-Illumin class of shaders should work just fine in realtime. The emmisive component is just the _MainTex.rgb * _Illum.a and is added to the result of the pixel shader (so e.g. on top of diffuse lighting). Objects using those materials obviously do not illuminate their surroundings before lightmapping.

Lightmapper treats those materials as emmisive, so a neon using that material will influence the nearby wall after baking. The strength of the emmision is controlled via Emission (Lightmapper) material property. Emissive materials work only when GI computations are turned on, i.e. the Bounces value in the Lightmapper window is bigger than 0. That functionality is limited to Unity Pro and is described in the docs for Lightmapping.

Remember though that large and dim light sources can be modeled as objects with emissive materials, but for small and intense you should use normal Unity lights, since emissive materials might introduce noise in the rendering.

Please see Forward Rendering Path Details and Pixel Lights in Forward Rendering Path in Optimizing Graphics Performance.

There are a couple of factors influencing how your lights are actually rendered. The first one is the Render Mode of a light. The second one is Pixel Light Count in Quality Settings. Then there is the sensible amount of lights that can be shaded in the vertex shader. And don’t forget about Spherical Harmonics.

Based on the setup of your scene Unity makes some educated guesses on how the lights should be rendered. It makes sure that the most important lights are rendered as pixel lights, a couple as vertex lights and the overflow, meaning the rest of the lights, is evaluated as spherical harmonics.

You can use the parameters mentioned above to make Unity render your lights as you wish, but forcing all the lights as pixel lights will hopefully not be necessary. That depends on the tessellation of your geometry (for vertex lights) and the size of the object relative to the range of the light (for spherical harmonics). So please just play around with the settings to get the most performance, while still maintaining the look you want to achieve.

First of all, you should not delete or disable your lights after baking. There is just no need to do that.
What happened in your case clearly shows that you’re using the dual lightmaps approach in deferred lighting. Please read about it in the Lightmapper Docs before continuing.

We’re creating lightmaps.

The Shadow Distance value controls the distance at which we fade between the Near and the Far lightmaps. Normally you control that parameter in Quality Settings, but when the Lightmapping window is selected a small overlay is shown in the scene view which temporarily overrides the Shadow Distance value from Quality Settings to let you play around with this value more quickly.

You probably have Maximize on Play selected in the game view. So when you hit Play all panes apart from Game View are hid (so the Lightmapper pane as well), which makes the Shadow Distance value from Quality Settings come into play.