Blotchy Lightmap

Hey my lightmap has blotchyness in the shadows and lighting… any idea what I should do about this? check the screenshot.

Compression artefacts? Try to set lightmaps to True Color and see if that helps

True color makes no difference. Its something to do with how its baking. Here are some screenshots of settings I have tried. Any ideas?





hm, is lightmap resolution enough in that particular place?

No that doesn’t seem to be the problem since i can make it sort of look smooth, but when it gets smooth it gets distorted looking… all over the place, like the picture frame in one of those images. Also still looks blotchy even if it is smoother.

Even though I dont beleive thats the issue, for future reference can you tell me how I would make the maps larger then 1024 x 1024 on bake.

Also I will upload the lightmap for one of those versions momentarily… soon as its done baking.

Ok here is the screenshot of hte lightmap. Any ideas?


I had these same issues over and over again with beast. It’s pretty much a trial over and over again to see what settings work best for each particular scene.

Haven’t had to much luck with using single lightmaps only so stick to dual lightmaps and as long as you set the Shadow distance to 0 it wont use the second set of lightmaps if thats what your after. Set the bounces to 3 or even 4. Bounce boost to 1 and bounce intensity to 1.5. Final gather 1000 even tho I have had good bakes with 600 to 1000 for final output. Contrast threshold to 0.05(but for testing .1 or .5 works good). Interpolation to 0 and Interpolation points to 15. These 2 settings I have tried over and over again and I dont think they really do anything for probs like this. Turn Ambient occlusion on to 1 and distance to .1 and contrast to .5 or 1 depending on how dark you want corners and stuff. For testing the resolution setting I set to 5 or 10 then for a final 25-50 works really good as well.

Also try playing around with adding more lights to the scene so your not relying on pure GI only coming in from the window. Also your unity ambient settings in the render settings try turning up that RGB setting to something higher as well to light up more dark spaces.

Pretty much beast from what ive seen and done it never comes out perfect so you have to paint out the probs once you get something your happy with.

-Miguel

I actually think that Alexey was right. The problem was not in the settings it was in the resolution.

I tried going to this forum post http://forum.unity3d.com/threads/56435-light-map-max-at-1k-solved?highlight=lightmap+resolution

It shows how to make your things bake at other resolutions besides 1024… welll in either case i switched it to 4096 and it works beautifully and smooth… very strange.

At least thats what it seems like so far… im going to try to render out a brighter scene to see if the problem happens like last time.

Maybe I spoke too soon, still experiencing the problem. Even on higher resolutions. Still messing with it… i think the results are a little better, but we will see.

Crap yea… the problem does still exist… if i put contrast threshold to .03 or below i get the weird blotchyness… if i go above that i get distortions around picture frames… weird black spots and generally shadowy areas where shadowy areas shouldnt appear… what do i do?

Ok I think i finally found the issue! I am pretty sure it had to do with the scale of the scene. My scene was too large and not conforming to unity standards. Mine wasnt using the whole “1meter = 1 unit” standard. Mine was like 4x the size… lowering the size to unity standard so far yields better results.

I will do more testing tomorrow to see what happens.

The artifacts you see have nothing to do with the lightmap resolution (if changing the resolution helps, that’s only a side effect). Also it’s not a problem with the scene scale (unless the scale is not completely ridiculous, baking a scene 100x bigger or smaller shouldn’t affect things much).

In your case the issue is that the scene is very dark and most of the light comes through those narrow holes between the blinds, thus Beast has problems during final gather, because such lighting setup introduces noise with the default settings. One solution one be to add a bright light inside :wink: but I guess this is not what you want.

So instead try setting interpolation points to a high value, then start increasing contrast threshold and the number of rays (to 2000, 4000) and that should help.

Each parameter has a description in the manual: http://unity3d.com/support/documentation/Components/class-LightMapping.html , and there’s some more advanced stuff here: http://unity3d.com/support/documentation/Manual/Lightmapping%20custom%20settings.html

The main thing to remember is that there is no universal setting for contrast threshold and for the number of rays, so these really have to be tweaked manually depending on the geometry and the light setup (and your particular setup is quite tricky).

1 Like

Hey Robert, I thank you for the info and the help. It is all very informative, but I will say the scale in this particular case did play a major issue. ( I dont know why) It works great with a normal scale with the scene measuring up at 1 meter per 1 unit. Originally it was 4x that and i got the spots… now i dont with the default settings except for contrast ratio at .03 and interpolaition points at 30.

Same settings that ive tried previously at a 4x scale scene gave me crappy results and now at a normal 1 meter = 1 unit scale scene it gave me these results. Nothing else is changed. same light.

No odd distortions near picture frames… and no blotchyness from light bounce.

Actually only other change was i made the directional light yellow instead of white.

Im pretty sure that if the scene is 4x, you probably want 4x the amount of rays. Though that bakes a lot longer. Also I cant be certain, but im pretty sure that having the scene at a smaller size actually makes the baking go much faster. With the same settings! Again I am not positive on this… still playing with the settings.

Oh my god. Look at this latest results. It has happened to me a few times now. What the heck is causing it?! It happens randomly… not really dependent on settings.


I’ve been having the same problem. Interestingly, the blotches appear in different patterns at each bake, even if I don’t adjust any settings.

About the scale: smaller scene will bake faster, because you define the lightmaps resolution in texels per world unit, so a smaller scene takes up less “world units” so if you don’t bump the lightmap resolution, the lightmaps will end up in lower resolution, which I think is quite reasonable :wink:

And also I didn’t want to say that the scale won’t affect anything - just that it should still be possible to find settings that will make the bigger scene bake correctly, but I know it’s a tricky business (and unfortunately it’s always the case with offline renderers).

About those weird artifacts in the last screenshot, look at my last post here: http://forum.unity3d.com/threads/70395-Weird-Lightmap-Problems

Yea I saw that… so far no artifacts if i put all my textures to tiling 1 - 1. I guess I set them back when the lightmap is done being generated or something. Anyway thanks for that. Still am playing with the settings to see what kind of quality i could attain with this. I found out that the picture frames still get weird shadowy thing that extend past the picture in weird angles. This is when I get rid of the grainy blotchyness, when i lower the contrast ratio i get more grainy blotchyness, but more detail so no shadowy errors from picture frames. When I up the contrast ratio I fix the grainy blotchyness… so that is gone, but then i get errors all over the place with weird shadowy artifacts. I cant find a balance.

Same thing is happening with this post…

http://forum.unity3d.com/threads/70807-Problem-with-beast-lightmapping.

On that post I dont get grainyness, but get a lot of weird shadowy artifacts on edges that I cant get rid of.

ive spent all week on this maybe 12 hours a day, at my job and at home. My job is simulation and were trying to light map a room… looks bad on me when I cant light map a single room after 5 days of trying. So far I may have to go back to using maya mental ray to bake my light maps. I dont think beast light mapping is ready for aproduction environment at all… and that sux because i was really looking forward to it.

Have you guys looked at the light/shadow settings?

I was having similar problems at one point, and it turned out that it was the lights were saved as Baked soft shadows, but they only had 1 shadow sample in the lightmapping object tab.

My shadow samples for the directional light are at 100 with an angle of 0

Oh and i also have a question. Is beast in anyway gpu accelerated. How awesome this entire thing would be if the rendering used cuda or was in some way gpu accelerated… would save a lot of time.

I’m sure Beast is ready for production environment :wink: It has been used in many AAA games and has been constantly improved at the same time. Also Unity not only includes the full version of Beast, but it’s also the newest, most up to date version with a ton of fixes (many of them based on our and Unity users’ feedback).

But I agree it’s sometimes hard to find the right settings, especially if your scene has a lighting setup that is tricky for Beast.

Have you tried higher numbers of rays? Have you seen this part of the manual: http://unity3d.com/support/documentation/Manual/Lightmapping%20custom%20settings.html ?

@DaveBuchhofer: In this case it’s not the number of shadow samples. Shadow samples only make a difference for direct light in the penumbra of soft shadows. In this scene the artifacts appear only in the areas completely lit by indirect light, so it’s an issue with the final gather settings.

I agree beast is ready for a production environment. I chose my words wrong. I dont mean to offend you or anyone who may be working on it. I meant the current settings that are enabled to us by default behind the scenes are not ready for a production environment. At the current its too difficult to get something without problems in an environment with deadline constraints. I dont want to sound unappreciative, and i know thats the way its coming out… its just a lot of time im spending on this, when i was hoping for a tool that made things just work. In a 3d package i hit the button and boom its done… no worries about checking wall around a picture frame, or doorway, or wall corner… or if geometry is interesecting anything…

So far alls I get is problems. Im not sure what beast has trouble with when it comes to lighting setups. This one for instance is a directional light through a window… ok might be kinda weird for beast. But look at my other post. http://forum.unity3d.com/threads/70807-Problem-with-beast-lightmapping.

On that post its a point light in the center of the room and a directional light outside. Nothing that complicated.

I did read that other manual part. Lots of information, very confusing. Any settings you would recommend in there?