LightsprintSDK 2021.08.08
Baking in your scene accessed in memory

If you prefer working with scene stored in your C/C++ structures in system memory, write adapter for accessing your structures. (What is an adapter)

Steps:
  • For quick start, pick one of existing projects, our SceneViewer sample or your application. If not sure, pick SceneViewer.
  • For quick second step, pick one of Existing adapters, one with features you need, e.g. Assimp.
  • Copy selected adapter to RRObjectCustom.h/cpp and insert it into your project.
  • Delete all unwanted third party #includes in your adapter, e.g. Assimp.
  • Build reports errors on all references to 3rd party model, change code so it works with your engine's 3d model rather than with Assimp. Replace all references to Assimp with your custom format. For more details, see
  • Open your scene in Scene Viewer sample. To open scene from memory rather than from disk, small modification is necessary, read comments in SceneViewerSample.cpp.
  • Review adapted geometry, materials, lights in scene viewer. If scene doesn't look as expected, go back to adapter and fix it. To diagnose problems automatically, click "Help/Log scene errors" in scene viewer or call checkConsistency() from your adapter. You can also set breakpoints in adapter in Debug DLL configuration.
Expected time spent:
  • 1-4 days