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
Benchmark take HUD at the canvas's bottom left (clear of the timeline strip and the axes)
islandmed01131a5ff7bc
diff --git a/docs/benchmark.md b/docs/benchmark.mdindex 7837db7c..36978e1b 100644--- a/docs/benchmark.md+++ b/docs/benchmark.md@@ -143,7 +143,7 @@ sculptforge --benchmark-script take.sfui [project.sfproj] --benchmark-video takein the clip as it is for a person. `stroke` sends its pointer samples at 240 a second (each frame, the samplessince the last one), like proof mode; `pen_stroke` sends 4 a frame. A step's own end is checked once a frame, sowaits are at least as long as written.-- The proof mode HUD (version, commit, frame times over the last second, stroke lag, GPU) and the script's pointer+- The proof mode HUD (bottom left: version, commit, frame times over the last second, stroke lag, GPU) and the script's pointerare drawn on top, and the frames go to the MP4 the same way as proof mode's: read back through pixel buffers,encoded by ffmpeg on its own thread at a constant 30 fps (a frame repeats while the app is slower), so the videois as long as the take. `--benchmark-no-video` records none; `--benchmark-vsync` keeps vertical sync on.diff --git a/src/app/BenchTake.cpp b/src/app/BenchTake.cppindex 5bd43619..891cd675 100644--- a/src/app/BenchTake.cpp+++ b/src/app/BenchTake.cpp@@ -257,13 +257,12 @@ void App::takeBeforeSwap(int fbW, int fbH) {void App::drawTakeHud() {TakeState& t = *take_;if (t.stage == TakeState::Stage::Done) return;- // Top left of the canvas, as proof mode's (burned into the video: it is part of the frame).+ // As proof mode's (burned into the video: it is part of the frame).const float sc = uiScale_;const CanvasRect c = canvasRect();ImDrawList* dl = ImGui::GetForegroundDrawList();ImFont* font = ImGui::GetFont();const float bigSize = ImGui::GetFontSize() * 1.35f, smallSize = ImGui::GetFontSize() * 1.05f;- const ImVec2 at(c.x + 14 * sc, c.y + 14 * sc);const std::string brand = std::string("SculptForge ") + SCULPTFORGE_VERSION + " (" + SF_GIT_COMMIT + ") - benchmark take";const char* lines[] = {brand.c_str(), t.hud[0].c_str(), t.hud[1].c_str(), t.hud[2].c_str()};float w = 0, h = 0;@@ -272,6 +271,10 @@ void App::drawTakeHud() {w = std::max(w, s.x);h += s.y + 3 * sc;}+ // Bottom left of the canvas: the top has the timeline strip and the axes, and a take's strokes are mostly in the+ // middle (above the timeline strip when that is at the bottom).+ const float bottom = timelineStripY_ > c.y && timelineTopInset_ <= 0.0f ? timelineStripY_ : c.y + c.h;+ const ImVec2 at(c.x + 14 * sc, bottom - h - 14 * sc);dl->AddRectFilled(ImVec2(at.x - 10 * sc, at.y - 8 * sc), ImVec2(at.x + w + 10 * sc, at.y + h + 6 * sc), IM_COL32(12, 12, 14, 215), 6 * sc);float y = at.y;for (int i = 0; i < 4; ++i) {