0
\$\begingroup\$

I'm creating a low poly 4X game that will likely have upwards of 200 unique hex tile models once everything is said and done. The colour palette consists of 16 different colours. I understand that if I want to reduce the number of draw calls I could simply UV map each individual model to the palette and there wouldn't be a problem.

However, I want to add an ambient occlusion effect which is best achieved by baking it on in Blender. This precludes me from using a single material for all my models since each model will have a different pattern baked onto the palette. I'm going to go out on a limb and say that having a different material for each model could create a pretty severe CPU bottleneck.

So, what would my best solution be? Should I abandon AO altogether? Perhaps I should try lightmapping in Unity (though I've heard AO baking in modelling software yields better effects)?

Any help is appreciated!

\$\endgroup\$
1
  • 3
    \$\begingroup\$ You're not limited to a single UV channel per mesh. You could use one UV channel to look up into the palette, and a second UV channel for your ambient occlusion texture (atlas). Or you could store the palette colour as a vertex colour channel. MaterialPropertyBlocks might help too, since they're meant to be lighter weight than full material changes. \$\endgroup\$
    – DMGregory
    Oct 4, 2016 at 4:24

1 Answer 1

0
\$\begingroup\$

Use Unity's AO when baking. Should be working fine in general.

If it's a high end game then you may also use SSAO which is runtime. There is a cheap SSAO Pro package in Unity Asset Store too.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Also the quite new Unity Post Processing Stack supports ambient occlusion. It is free. \$\endgroup\$
    – M156
    May 16, 2017 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .