Skip to content

Add "Generate LODs" option to publish dialog#910

Merged
slimbuck merged 5 commits into
playcanvas:mainfrom
slimbuck:ssog-dev
May 25, 2026
Merged

Add "Generate LODs" option to publish dialog#910
slimbuck merged 5 commits into
playcanvas:mainfrom
slimbuck:ssog-dev

Conversation

@slimbuck

@slimbuck slimbuck commented May 25, 2026

Copy link
Copy Markdown
Member

Summary

Adds a user-facing "Generate LODs" toggle to the publish settings dialog. When enabled, the publish request sends publishFormat: 'ssog' instead of 'sog', telling the server pipeline to decimate the PLY into LOD chunks (streaming SOG) rather than producing a single SOG.
The toggle is visible in both new-scene and republish flows and defaults to ON when both:

  • the scene contains ≥ 1,000,000 splats, and
  • the unioned scene world-bound exceeds 16 m on at least 2 axes.
    Otherwise it defaults to OFF, preserving today's single-SOG behavior.
    Changes:
  • src/publish.ts: extended PublishSettings with generateLods; both doPublish and doRepublish payloads now derive publishFormat from it.
  • src/ui/publish-settings-dialog.ts: new BooleanInput row, default computed from splat count + world-bound extents, threaded into the resolved PublishSettings. The row is hidden when republishing animation-only (no model upload).
  • static/locales/*.json: added popup.publish.generate-lods for all 9 supported languages.
    Test plan:
  • Load a small PLY (<1M splats or compact bounds) → toggle defaults OFF; publish → publishFormat: "sog" in request.
  • Load a large outdoor PLY (≥1M splats and ≥2 axes >16 m) → toggle defaults ON; publish → publishFormat: "ssog".
  • Republish an existing scene with the toggle on → PUT /splats/:id/republish body carries publishFormat: "ssog".
  • Toggle off on a large scene before publishing → request still sends "sog".
  • Republish animation-only (Override Model off) → Generate LODs row is hidden.
  • Switch UI language → label renders the localized string.

@slimbuck slimbuck requested a review from Copilot May 25, 2026 10:24
@slimbuck slimbuck self-assigned this May 25, 2026
@slimbuck slimbuck added the enhancement New feature label May 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an “Generate LODs” publish option that switches the publish pipeline between single-SOG (publishFormat: "sog") and streaming-SOG with generated LOD chunks (publishFormat: "ssog"), exposed via the publish settings dialog and localized across all supported languages.

Changes:

  • Extended PublishSettings with autoLods and derived publishFormat from it for both publish and republish requests.
  • Added a new publish-settings dialog toggle with a default heuristic based on total splat count and unioned scene bounds.
  • Added popup.publish.auto-lods translations for all 9 locale files.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/ui/publish-settings-dialog.ts Adds “Generate LODs” toggle, computes default from splat count + union bounds, and threads autoLods into resolved settings.
src/publish.ts Adds autoLods to PublishSettings and uses it to select publishFormat (sog vs ssog) in publish/republish payloads.
static/locales/en.json Adds localized label for the new toggle.
static/locales/de.json Adds localized label for the new toggle.
static/locales/es.json Adds localized label for the new toggle.
static/locales/fr.json Adds localized label for the new toggle.
static/locales/ja.json Adds localized label for the new toggle.
static/locales/ko.json Adds localized label for the new toggle.
static/locales/pt-BR.json Adds localized label for the new toggle.
static/locales/ru.json Adds localized label for the new toggle.
static/locales/zh-CN.json Adds localized label for the new toggle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ui/publish-settings-dialog.ts Outdated
Comment thread src/ui/publish-settings-dialog.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread src/ui/publish-settings-dialog.ts Outdated
Comment thread src/publish.ts Outdated
@slimbuck slimbuck marked this pull request as ready for review May 25, 2026 10:47
@slimbuck slimbuck requested a review from a team May 25, 2026 10:47
@slimbuck slimbuck merged commit fc863b0 into playcanvas:main May 25, 2026
2 checks passed
Re-qi pushed a commit to Re-qi/ReSplat that referenced this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants