Cache VoxelGrid meshing results (RenderMesh) #1414
Labels
A-Engine
B-Assets
B-Rendering
D-Good-First-Issue
Easy but interesting
P-Backlog
This issue isn't a priority at all
S-Blocked
Blocked on another issue or PR
Problem
Currently we always mesh voxel grid assets which are stored in the disk.
When shipping a game, this doesn't seem to make much sense, as it could have been already distributed as a mesh, instead of a voxel grid (or both).
In big samples/demos, this actually leads to a very slow startup, as meshing is a quite expensive algorithm.
Solution
With #1413, it would be trivial to solve this problem. We could simply change the
RenderMeshBridge
to check if there's a.mesh
file, and use if it so. Thesave
method could write the tesselated mesh into the.mesh
file. Thus, when deploying games, if we want faster loads, we could simply save all render meshes into the assets directory by callingAssets::save
on them.The text was updated successfully, but these errors were encountered: