# Ambient Oclusion vs lightmaps

**URL:** <https://discourse.threejs.org/t/ambient-oclusion-vs-lightmaps/31333>\
**Category:** Questions\
**Tags:** lightmap, ambient-occlusion\
**Created:** [October 31, 2021, 6:06pm UTC](https://discourse.threejs.org/t/ambient-oclusion-vs-lightmaps/31333 "2021-10-31T18:06:09Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [October 31, 2021, 10:37pm UTC](https://discourse.threejs.org/t/ambient-oclusion-vs-lightmaps/31333/6 "2021-10-31T22:37:16Z")

</div>

> [@repalash](#):
>
> AO won’t be able to generate these kinds of results. AO will equally shade all edges and corners…

This doesn’t sound quite right to me — are you referring to screenspace AO? Baked AO can give results just as good as GI (at least in terms of the soft shadows) I think, as long as you have a nice UV unwrapping and spend the time baking AO offline.

> Once you bake the lightmaps you can export them with the 3d model in GLTF and threejs should automatically load them.

Unfortunately not – glTF files can contained baked AO but not lightmaps. But you could attach the lightmap to the emissive slot in glTF, and then just swap it to `.lightMap` after loading in three.js easily enough.

---

_[View the full topic](https://discourse.threejs.org/t/ambient-oclusion-vs-lightmaps/31333)._
