- Home /
Lightmapping strange behaviour
Hi
I'm having some problems with Beast's lighmapping results. For example, in this case the house should be completely covered by a shadow, however it is illuminated on the shadow contours of a near tree (from terrain).
This is possibly hard to explain in words so I have included 2 images:
Wrong Lightmapping
View from the base of the house
Do any of you know how to fix this? Thanks in advance
I don't have a lot of experience with lightmapping in Unity so I'm not sure how trees and terrain factor in but based on the shape of the shadow it looks like the lightmapper uses the Tree leaf alpha to deter$$anonymous$$e the shadow shape (which it should) but then it gives full light to transparent portions of the texture.
I have no idea how to fix this but would love to tinker with it. Would you $$anonymous$$d packaging up the $$anonymous$$imum assets and scene to have this issue happen and share it?
sorry for the delay, I was not with my computer during the weekend. I agree with your analysis. I have created and exported a $$anonymous$$imum scene that has this problem. You can download it here: http://feupload.fe.up.pt/get/LAqblEWd2WWBPh1
thanks again.
Answer by djturrican · Aug 20, 2011 at 01:57 PM
all right after fiddling around with it for around 4 hours and used up my sparetime for today, the best solution I came up with for this kindda scenario:
1.Clone/duplicate your BigTree prefab and rename it to something like BigTree_without_shadow
2.Go into the BigTree_without_shadow and disable the static box, so it wont be lightmapped
3.Go further down and disable the cast shadow boxes, for the prefab if needed also separately for the leaves and the bark.
4.This tree You will have to drag & drop one at a time into your scene those places with that kind of problem, where you dont want it to cast that funky shadow.
5.You need to delete the tree youve added through the terrain tree painter and put this one their instead and it will not cast a caustic like shadow mix in your shadow areas.
I have also taken a quick screenshot of the scene, and where to turn off the shadow props and lightmapping for that object, i modified the scene a bit too, to debug of course if their was something wrong with the terrain or similar.
Yeah I know the tree will be missing a shadow but, if you keep those areas high enough or surround by colliders so the player wont be able to go there, than their shouldn't be any problems.
Yeah Agree that it is a problem due to Beast lightmapper, but for now this is the only solution i can come up with, so why wait for extension of the beast lightmappers preferences, which will not come anytime soon.
screenshot: http://www.imagebam.com/image/15ec55145889638
Enjoy! This is the solution i will be using in my project, for now, when I run into this problem, which I havent for now.
thanks for your effort djturrican. That doesn't fix the problem but consists a valid alternative for anyone that, for some reason, can't remove the trees and don't want to have the shadow's artifacts mentioned above.
Answer by djturrican · Aug 19, 2011 at 12:41 AM
increase your lightmapping resolution to minimum 50, looks like its below 50 on your SS
resolution has no effect on the occurrence of this problem. I have already tried with resolutions above 50 and the problem is still there. You can try it by yourself if you want with a simple scene like this: http://feupload.fe.up.pt/get/LAqblEWd2WWBPh1
I think it is a bug of Beast Lightmapping tool.