Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Benchmarks: --benchmark-file PATH opens a project and runs the scoreboard's strokes and orbit
islandmed60e7e09fe7d7
diff --git a/src/app/ProofMode.cpp b/src/app/ProofMode.cppindex 599d7c4d..4b9a8ee2 100644--- a/src/app/ProofMode.cpp+++ b/src/app/ProofMode.cpp@@ -101,6 +101,21 @@ std::vector<ProofMeshSize> proofStandardScene(const std::string& name) {}, 5};return {s1b};}+ if (name.rfind("file:", 0) == 0) { // --benchmark-file: a project from disk (a scan, a real sculpt), the scoreboard's strokes+ const std::string path = name.substr(5);+ std::error_code ec;+ const double bytes = double(std::filesystem::file_size(std::filesystem::path(std::u8string(path.begin(), path.end())), ec));+ const ProofMeshSize s{ec ? 1.0 : bytes / 20e6, std::filesystem::path(path).stem().string(), [path](size_t) {+ std::string err;+ Document d;+ if (!loadProject(path, d, err)) {+ std::fprintf(stderr, "benchmark file %s: %s\n", path.c_str(), err.c_str());+ return makeBenchHead(size_t(1) << 20);+ }+ return std::move(d.mesh);+ }, 150}; // (the file's size in 20-byte triangles, at the spheres' 150 bytes each: the memory check)+ return {s};+ }if (name == "core-200m" || name == "core-100m") { // research (docs/design/core-200m.md): micro triangles in memory, opened from a projectconst int millions = name == "core-100m" ? 100 : 200;const ProofMeshSize s{double(millions), std::to_string(millions) + "M micro", [millions](size_t) {@@ -520,7 +535,7 @@ void App::startProofMode() {};p->jsonPath = !options_.benchmarkOut.empty() ? options_.benchmarkOut : u8(dir / ("sculptforge-benchmark-" + stamp + ".json"));p->videoPath = !options_.benchmarkVideo.empty() ? options_.benchmarkVideo : u8(dir / ("sculptforge-benchmark-" + stamp + ".mp4"));- if (p->scene.rfind("core-", 0) == 0) // the perf scoreboard (docs/design/perf-scoreboard.md): its three brush sizes, then orbit+ if (p->scene.rfind("core-", 0) == 0 || p->scene.rfind("file:", 0) == 0) // the perf scoreboard (docs/design/perf-scoreboard.md): its three brush sizes, then orbitp->phases = {{"clay small", 25.0f, p->strokeSeconds, BrushType::Clay, 0.35f},{"clay large", 120.0f, p->strokeSeconds, BrushType::Clay, 0.35f},{"240 px brush", 240.0f, p->strokeSeconds, BrushType::Clay, 0.35f},diff --git a/src/app/main.cpp b/src/app/main.cppindex 6dcb8f46..80ef6a7c 100644--- a/src/app/main.cpp+++ b/src/app/main.cpp@@ -76,6 +76,7 @@ void usage() {" --benchmark standard-1b Experimental Focus Detail: a billion micro triangle head streamed from disk\n"" --benchmark core-200m Research: a 200 million micro triangle head in memory (open, strokes, orbit)\n"" --benchmark core-100m The same at 100 million micro triangles\n"+ " --benchmark-file PATH Open the project PATH, then the same strokes and orbit\n"" --focus-detail FILE Experimental: open a Focus Detail file (.sfdetail)\n"" --benchmark-sizes 5,20 Proof mode mesh sizes in millions of triangles\n"" --benchmark-out FILE Where the JSON result goes (default: sculptforge-benchmark-<time>.json here)\n"@@ -218,6 +219,10 @@ int main(int argc, char** argv) {}}else if (a == "--focus-detail") options.openPath = next(); // a .sfdetail file (prototype)+ else if (a == "--benchmark-file") { // a project from disk, the scoreboard's strokes (docs/design/perf-scoreboard.md)+ options.benchmark = true;+ options.benchmarkScene = "file:" + next();+ }else if (a == "--benchmark-sizes") options.benchmarkSizes = next();else if (a == "--benchmark-out") options.benchmarkOut = next();else if (a == "--benchmark-video") options.benchmarkVideo = next();