Skip to content

switch scene authoring paths from direct Vello scenes to imaging - #218

Draft
waywardmonkeys wants to merge 1 commit into
linebender:mainfrom
waywardmonkeys:imaging-first
Draft

switch scene authoring paths from direct Vello scenes to imaging#218
waywardmonkeys wants to merge 1 commit into
linebender:mainfrom
waywardmonkeys:imaging-first

Conversation

@waywardmonkeys

Copy link
Copy Markdown
Contributor

This draft moves bevy_vello toward an imaging-first architecture while keeping Vello as the final rendering backend.

The main change is that scene-producing integrations no longer author directly into vello::Scene. Instead, they lower into imaging::record::Scene, and the renderer replays those retained imaging scenes into the transient frame vello::Scene via imaging_vello::VelloSceneSink.

This is intended as the first stage of the migration, not the final cleanup pass.

Why

bevy_vello has historically exposed native vello::Scene as both its public scene model and its internal interchange format. That makes the crate tightly coupled to one backend and forces each integration path to speak Vello directly.

With imaging, svg_imaging, and velato_imaging now available, we can move scene authoring and format lowering onto a shared retained IR while still using Vello for actual rendering.

That gives us:

  • one scene model for hand-authored scenes, SVG, Lottie, and text
  • less backend-specific logic in integration code
  • a cleaner long-term boundary: Bevy plumbing here, lowering in imaging adapters, rendering in backend-specific sinks.
  • Vello as one backend, not the only authoring model
  • future support for alternate imaging backends without redoing all format integrations

What changed

  • VelloScene2d and UiVelloScene now retain imaging::record::Scene instead of vello::Scene.
  • The render pass now replays imaging scenes into the transient frame vello::Scene with imaging_vello::VelloSceneSink.

What did not change

  • Vello is still the final rendering backend.
  • The frame renderer still builds one transient vello::Scene per frame and renders it as before.
  • Existing scene APIs still use Vello/peniko vocabulary where that was already part of the crate surface.
  • Pre-existing behavior outside the imaging migration was intentionally left alone where possible.

Why this is still a draft

This gets the architecture moving in the right direction, but it is not yet the final polish pass.

In particular, this PR does not yet try to:

  • fully clean up all public API naming around VelloScene types
  • remove every remaining direct Vello-typed concept from the public surface
  • optimize replay/caching of static imaging scenes
  • do the final pass on docs, migration notes, and example cleanup

So this should be read as the structural first step, not the finished end state.

Follow-up work

  • rename/reframe scene APIs to reflect imaging-first authoring rather than Vello-first naming
  • continue separating backend-specific replay from the rest of the render pipeline
  • add support for additional imaging backends beyond Vello
  • tighten docs and migration notes
  • evaluate caching for static retained scenes

@nuzzles

nuzzles commented Apr 3, 2026

Copy link
Copy Markdown
Member

Woot! Thanks @waywardmonkeys . I will take a look soon. :)

@waywardmonkeys
waywardmonkeys force-pushed the imaging-first branch 2 times, most recently from bf68bff to 378d5a4 Compare May 22, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants