Lightmap is mangled. Why?

Hi!

For a couple of days already I’m trying to get lightmap for this object:

220587-without-lightmap.png

But now matter what I do - lightmap is far away from preview quality of shadows:

(lightmap resolution is 64)

220645-with-lightmap-1024.png

(lightmap resolution is 1024)

I tryed to change uv map already, to use original and auto-generated (on import) uv channel for lighting.

Model was optimized from high-poly original in couple of different ways. And regardless to topology, I always get this niticeable artefact here:

220590-artefact.png

Object has about 6k polygons, and, yes - it’s topology isn’t ideal, but I would say it’s good enough:

So, what am I doing wrong? And is there any common technique to debug such problems?

Thank you in advance.

Just in case - model itself: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online. (OneDrive)

Hi!

I’d say if you want to keep the high poly mesh then you’ll need a LOT higher lightmap than 64! :wink:
…I think you coud get away in this case with a very low poly model with baked normals… just an idea…

Good luck!

Hi!

No, increasing lightmap resolution doesn’t resolve the problem. I’ve added image with lightmap resolution set to 1024 - problem is still the same there. :frowning:

Hi!

Well it got a lot nicer! :wink:
…I guess then you have problems with your lightmap uv…

Sry I completely missed out the part where you’ve uploaded your mesh! :S
I didn’t have time this morning to fix but checked your lightmap and it’s not ideal… have too many small islands… :S
…I’ll have time to fix it later…

Hi!

I don’t have time! :S :smiley:
/there are some problems with your mesh, but… try to keep faces together that gets the same lighting…/
…but I hope you will get the idea from the attachment! :wink:
/just a blank new map, default medium settings bake, 256 lightmap/

Wowww!
Yes, I found mesh problems yesterday evening. There are duplicated faces on top and bottom parts. I also paid some attention to UV map quality as you adviced - and get better results. I’ll write detailed report about it a bit later.

But my uv map quality isn’t even close to yours. How did you generate this nice layout?

Yes and also overlapping faces /removable box on the top/…

You shoul “break” (UVs) your mesh by 90 angles… the top and bottom part shouldn’t be difficult after you fix your mesh… Then you will have just the middle part left. Put the seams at the back where nobody will see /you can take off the flat back/. You can also try to separate the two sides… But what I did is just put 4 extra seams at the top and bottom and then pelt mapping in 3ds max…

Your uv were separate where you had the pixelated artifacts…

Good luck!!

So, after all - I came up to model quality I strived for.

There were multiple issues I had to fix to get the result.

First, yes, there were overlapping faces on top and bottom parts of model. Model was double-faced there, and this lead to strange lightmap on top of central part. There were interrior faces too. So, I had to remove them all and rebuild remaining faces.

If you use Blender, there are nice options like Remove Doubles and Select by TraitNon manifold geometry that will help you to fight with surpluses on model.

Second, my UV map wasn’t ideal. To be more exact, there were some faces on UV map, that occupied less than 2 pixels on lightmap resolution. Because of this, lightmap didn’t deliver any useful information for this faces to model.

I had to rebuild UV maps multiple times to get reasonable result. On Blender, I came up to generating UV maps separately for top, center and bottom with Smart UV Project. And then I manually scaled and placed resulting fragments. Don’t forget to set appropriate Island Margin option when you generate fragments. (I set it to 16/2048 meaning 16 pixels on 2048 size, knowing that the actual margin will be approx. twice less when I scale fragments).

Makigirl, thanks a lot for your comments and your time! You set me on the right track with this explanations.

After lightmap issues were solved, I experimented with polygon count for a while. I found ZBrush Decimation Master very useful at generating simplified meshes. It gave me some nice decimation with perfect balance of details and simplicity:

And now model looks like this:

while taking approx 1000 polygons.

Thanks once more.