- Home /
Seams between planes when lightmapping
I'm using the built-in beast lightmapper to map shadows onto a grid of planes (native unity planes made with GameObject->Create Other->Plane). After running the lightmapper, I get visible seams between the planes:
Which settings should I adjust in order to get rid of these seams? I tried increasing edgeDilation, but that didn't help. Here's my BeastSettings.xml file for the scene as it is now; most of it is just the default:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ILConfig>
<AASettings>
<samplingMode>Adaptive</samplingMode>
<clamp>false</clamp>
<contrast>0.1</contrast>
<diagnose>false</diagnose>
<minSampleRate>0</minSampleRate>
<maxSampleRate>2</maxSampleRate>
<filter>Gauss</filter>
<filterSize>
<x>2.2</x>
<y>2.2</y>
</filterSize>
</AASettings>
<RenderSettings>
<bias>0</bias>
<maxShadowRays>10000</maxShadowRays>
<maxRayDepth>6</maxRayDepth>
</RenderSettings>
<EnvironmentSettings>
<giEnvironment>None</giEnvironment>
<skyLightColor>
<r>0.86</r>
<g>0.93</g>
<b>1</b>
<a>1</a>
</skyLightColor>
<giEnvironmentIntensity>0</giEnvironmentIntensity>
</EnvironmentSettings>
<FrameSettings>
<inputGamma>1</inputGamma>
</FrameSettings>
<GISettings>
<enableGI>false</enableGI>
<fgPreview>false</fgPreview>
<fgRays>1000</fgRays>
<fgContrastThreshold>0.05</fgContrastThreshold>
<fgGradientThreshold>0</fgGradientThreshold>
<fgCheckVisibility>true</fgCheckVisibility>
<fgInterpolationPoints>15</fgInterpolationPoints>
<fgDepth>1</fgDepth>
<primaryIntegrator>FinalGather</primaryIntegrator>
<primaryIntensity>1</primaryIntensity>
<primarySaturation>1</primarySaturation>
<secondaryIntegrator>None</secondaryIntegrator>
<secondaryIntensity>1</secondaryIntensity>
<secondarySaturation>1</secondarySaturation>
<fgAOInfluence>0</fgAOInfluence>
<fgAOMaxDistance>0.223798</fgAOMaxDistance>
<fgAOContrast>1</fgAOContrast>
<fgAOScale>2.0525</fgAOScale>
</GISettings>
<TextureBakeSettings>
<bgColor>
<r>1</r>
<g>1</g>
<b>1</b>
<a>1</a>
</bgColor>
<bilinearFilter>true</bilinearFilter>
<conservativeRasterization>true</conservativeRasterization>
<edgeDilation>8</edgeDilation>
</TextureBakeSettings>
</ILConfig>
Answer by equalsequals · Sep 08, 2011 at 03:20 AM
I had a similar issue before when using tiled quads for ground, for me it was because I didn't pay close enough attention to my texel resolution. If you play with your lightmap resolution settings in a ye old eye exam (tweak, better or worse, repeat) you will likely find the sweet spot.
Hope that helps.
==
Thanks -- do you know are there any guidelines for setting texel resolution? Like might this be too high, too low, not a multiple of 2 ... etc.
Yeah, actually. It all corresponds to how you'll be looking at it, though. You want to make sure that its proportional to the size of the object, so you should take into account how many pixels in the lightmap translate into 3d world units (meters in unity's case) so if an object is 1 meter and it's lightmap is 10 pixels, you can deduce that 1 pixel == 10 cm at this texel resolution. So it all depends on how much detail you need to pack in. But you want to make sure that the resolution makes sense, ie no 77 pixels to 1 meter or anything like that - it just doesn't make sense to anyone.
Answer by nasapc123 · Sep 06, 2011 at 02:57 AM
is it a problem outside the beast engine? have you tried selecting all the planes and snapping them using edit > snap?
Yeah, the planes are all lined up properly -- there are no visible seams until I run the lightmapper, so that's where the issue is co$$anonymous$$g from.