Blotchy, dappled, dark patches on lightmaps

I’ve done quite a lot of lightmapping with Unity in the past, but this has me stumped. Whatever I try doesn’t seem to help.

My issue is with dark patches on models when lightmapping, and obvious edges appearing. Hopefully these images will explain:

1823802--116779--lightmap-nomesh.png

1823802--116780--lightmap-mesh.png

Comparison with no lightmaps, which is fine:

The object is an airplane in a large hangar, lit by multiple spotlights on the ceiling (Shadow Samples 3, Shadow Radius 1), and a Directional Light that passes through a skylight above.

All lights are set to BakedOnly. All objects in the scene are static.

Note: I didn’t make the object myself, could it be a problem with the FBX?

I’m using Skyshop and LM Extended. My beast XML settings are below. I’m using Directional lightmaps.

<?xml version="1.0" encoding="iso-8859-1"?>
<ILConfig>
  <AASettings>
    <minSampleRate>0</minSampleRate>
    <maxSampleRate>2</maxSampleRate>
    <contrast>0.1</contrast>
    <diagnose>false</diagnose>
    <clamp>false</clamp>
    <samplingMode>Adaptive</samplingMode>
    <filter>Box</filter>
    <filterSize>
      <x>1</x>
      <y>1</y>
    </filterSize>
  </AASettings>
  <RenderSettings>
    <bias>0.005</bias>
    <giTransparencyDepth>2</giTransparencyDepth>
    <ignoreLightLinks>false</ignoreLightLinks>
    <maxRayDepth>6</maxRayDepth>
    <maxShadowRays>4</maxShadowRays>
    <minShadowRays>0</minShadowRays>
    <reflectionDepth>2</reflectionDepth>
    <reflectionThreshold>0.001</reflectionThreshold>
    <shadowDepth>2</shadowDepth>
    <shadowsIgnoreLightLinks>false</shadowsIgnoreLightLinks>
    <transparencyDepth>50</transparencyDepth>
    <tsIntersectionNormalization>true</tsIntersectionNormalization>
    <tsIntersectionOrthogonalization>true</tsIntersectionOrthogonalization>
    <tsOddUVFlipping>true</tsOddUVFlipping>
    <tsVertexNormalization>true</tsVertexNormalization>
    <tsVertexOrthogonalization>true</tsVertexOrthogonalization>
    <vertexMergeThreshold>0.001</vertexMergeThreshold>
  </RenderSettings>
  <EnvironmentSettings>
    <giEnvironment>None</giEnvironment>
    <skyLightColor>
      <r>0.86</r>
      <g>0.93</g>
      <b>1</b>
      <a>1</a>
    </skyLightColor>
    <giEnvironmentIntensity>1</giEnvironmentIntensity>
    <iblImageFile />
    <iblBandingVsNoise>1</iblBandingVsNoise>
    <iblEmitDiffuse>true</iblEmitDiffuse>
    <iblEmitLight>false</iblEmitLight>
    <iblEmitSpecular>false</iblEmitSpecular>
    <iblGIEnvBlur>0</iblGIEnvBlur>
    <iblIntensity>1</iblIntensity>
    <iblSamples>300</iblSamples>
    <iblShadows>true</iblShadows>
    <iblSpecularBoost>1</iblSpecularBoost>
    <iblSwapYZ>false</iblSwapYZ>
    <iblTurnDome>90</iblTurnDome>
  </EnvironmentSettings>
  <FrameSettings>
    <autoThreads>true</autoThreads>
    <autoThreadsSubtract>0</autoThreadsSubtract>
    <renderThreads>2</renderThreads>
    <dither>true</dither>
    <inputGamma>1</inputGamma>
    <outputCorrection>
      <colorCorrection>None</colorCorrection>
      <gamma>1</gamma>
    </outputCorrection>
    <premultiply>true</premultiply>
    <premultiplyThreshold>0</premultiplyThreshold>
    <outputVerbosity>
      <errorPrint>true</errorPrint>
      <warningPrint>true</warningPrint>
      <benchmarkPrint>false</benchmarkPrint>
      <progressPrint>true</progressPrint>
      <infoPrint>false</infoPrint>
      <verbosePrint>false</verbosePrint>
      <debugPrint>false</debugPrint>
      <debugFile>false</debugFile>
    </outputVerbosity>
  </FrameSettings>
  <GISettings>
    <clampMaterials>None</clampMaterials>
    <diffuseBoost>1</diffuseBoost>
    <emissiveScale>1</emissiveScale>
    <enableCaustics>false</enableCaustics>
    <enableGI>true</enableGI>
    <ignoreNonDiffuse>true</ignoreNonDiffuse>
    <prepassMaxSampleRate>0</prepassMaxSampleRate>
    <prepassMinSampleRate>-4</prepassMinSampleRate>
    <primaryIntegrator>FinalGather</primaryIntegrator>
    <primaryIntensity>1</primaryIntensity>
    <primarySaturation>1</primarySaturation>
    <secondaryIntegrator>None</secondaryIntegrator>
    <secondaryIntensity>1</secondaryIntensity>
    <secondarySaturation>1</secondarySaturation>
    <specularScale>1</specularScale>
    <fgAOContrast>0.666</fgAOContrast>
    <fgAOInfluence>0.181</fgAOInfluence>
    <fgAOMaxDistance>0.3</fgAOMaxDistance>
    <fgAOScale>2</fgAOScale>
    <fgAOVisualize>false</fgAOVisualize>
    <fgAttenuationStart>0</fgAttenuationStart>
    <fgAttenuationStop>0</fgAttenuationStop>
    <fgCacheDirectLight>false</fgCacheDirectLight>
    <fgCheckVisibility>true</fgCheckVisibility>
    <fgCheckVisibilityDepth>1</fgCheckVisibilityDepth>
    <fgClampRadiance>false</fgClampRadiance>
    <fgContrastThreshold>0.1</fgContrastThreshold>
    <fgDepth>1</fgDepth>
    <fgEstimatePoints>15</fgEstimatePoints>
    <fgExploitFrameCoherence>false</fgExploitFrameCoherence>
    <fgFalloffExponent>0</fgFalloffExponent>
    <fgGradientThreshold>0.5</fgGradientThreshold>
    <fgInterpolationPoints>15</fgInterpolationPoints>
    <fgLightLeakRadius>0</fgLightLeakRadius>
    <fgLightLeakReduction>false</fgLightLeakReduction>
    <fgMaxRayLength>0</fgMaxRayLength>
    <fgNormalThreshold>0.2</fgNormalThreshold>
    <fgPreview>false</fgPreview>
    <fgRays>500</fgRays>
    <fgUseCache>Irradiance</fgUseCache>
    <ptAccuracy>1</ptAccuracy>
    <ptCacheDirectLight>false</ptCacheDirectLight>
    <ptCheckVisibility>true</ptCheckVisibility>
    <ptConservativeEnergyLimit>0.95</ptConservativeEnergyLimit>
    <ptDefaultColor>
      <r>0</r>
      <g>0</g>
      <b>0</b>
      <a>1</a>
    </ptDefaultColor>
    <ptDepth>5</ptDepth>
    <ptDiffuseIllum>true</ptDiffuseIllum>
    <ptFile />
    <ptFilterSize>3</ptFilterSize>
    <ptFilterType>Gauss</ptFilterType>
    <ptNormalThreshold>0.7</ptNormalThreshold>
    <ptPointSize>0</ptPointSize>
    <ptPrecalcIrradiance>true</ptPrecalcIrradiance>
    <ptPreview>false</ptPreview>
    <ptSpecularIllum>true</ptSpecularIllum>
    <ptTransmissiveIllum>true</ptTransmissiveIllum>
    <mcDepth>2</mcDepth>
    <mcMaxRayLength>0</mcMaxRayLength>
    <mcRays>16</mcRays>
  </GISettings>
  <SurfaceTransferSettings>
    <frontRange>0</frontRange>
    <frontBias>0</frontBias>
    <backRange>2</backRange>
    <backBias>-1</backBias>
    <selectionMode>Normal</selectionMode>
  </SurfaceTransferSettings>
  <TextureBakeSettings>
    <bgColor>
      <r>1</r>
      <g>1</g>
      <b>1</b>
      <a>1</a>
    </bgColor>
    <bilinearFilter>true</bilinearFilter>
    <conservativeRasterization>true</conservativeRasterization>
    <edgeDilation>3</edgeDilation>
  </TextureBakeSettings>
</ILConfig>

What’s your lightmap resolution look like on the model?

1823829--116783--Screenshot 2014-10-26 18.25.47.png
It was higher res, I’m just lowering it briefly while I test a lower quality bake

Am I right in thinking that the discontinuities in the lightmaps correspond to the discontinuities in the checkerboard, there?

Ha! Yes, Not sure why I didn’t notice that. Well, that would explain the line that runs across it - I guess? I’ll ask the artist about that, see if he has any ideas…

The blotchyness though - that remains an issue.

Lightmaps are uncompressed, and set to a max res of 2048.

Yeah, first step is to sort out those lightmap UVs so that big continuous chunks of surface get big contiguous islands in the lightmap wherever possible. Then see where you’re at with the blotchyness.

You might want to try setting enableGI to false and baking, just to check whether the blotchyness is being caused by the GI stuff or whether it’s present even without that.

Not sure if this is the problem (There seem to be a few reasons from the search I did a while back), however I found when baking if I had lights that were really close to objects (Or almost intersecting), it could create the same blotchy pattern. It could also just be caused by only using a small number of rays. I’m pretty sure there’s a setting in there somewhere for rays, can’t remember where though :).