BakeryAPI

From Bakery GPU Lightmapper: Wiki
Revision as of 20:07, 22 February 2022 by Mr F (talk | contribs)
Jump to navigation Jump to search

Running the demo

API source, lightmapper binaries and the demo content are in separate repositories, so they can be updated separately.

  • Download API headers and the demo source from github.
  • Build the solution. Original files are created for Visual Studio 2015, but newer versions should work as well. Alternatively, create your own solution in any IDE on Windows. It does not require any dependencies or static libraries, so it should be as simple as adding all .h/.cpp files into the project.
  • Copy all files from Assets/Editor/x64/Bakery to a "bin" folder placed next to BakeryAPI.exe.
  • If you didn't previously patch the Unity version, also download latest binaries from github and overwrite old files in the bin folder.
  • Download demo models/textures from github.
  • Extract the "model" folder next to BakeryAPI.exe.
  • Create the "scene" folder next to BakeryAPI.exe.
  • Run BakeryAPI.exe. You should see baking progress printed to the console. Scene folder will be populated with temporary files.
  • In the end you should end up with sponzaLM_final.hdr file created in the scene folder, which is the final lightmap. Demo source also demonstrates other ways to export final data.
Bulbgraph.pngAs OBJ format only supports one UV channel, the demo OBJ is unwrapped for lightmaps, therefore material textures are mapped incorrectly, but as Sponza uses simple tiles, it's enough for demo purposes. In a real project different UVs should be supplied to SetVertexTextureUVs and SetVertexLightmapUVs functions