Skip to content

Model preview improvements and fixes - #1

Open
KyleThmpsn wants to merge 3 commits into
stanuwu:masterfrom
KyleThmpsn:model-preview
Open

KyleThmpsn wants to merge 3 commits into
stanuwu:masterfrom
KyleThmpsn:model-preview

Conversation

@KyleThmpsn

Copy link
Copy Markdown

Asset model previews render more accurately, closer to how they look in game, with new studio lighting and framing. Every item opens with its model, armor and weapons can be shown and animated on a Guardian, and changing shaders updates the preview. The model preview is now its own pane inside the workspace, which can be resized, docked or popped out, and its controls can stay pinned or show on hover. Maps keep the current viewer.

This PR includes several improvements and fixes to model previews. If you'd rather I break it up into smaller chunks, I'd be happy to do so.

What

Items

  • Any item with arrangement art now opens with a model pane, as weapons do, its art loaded through the item's art arrangement. Items without art open as before, with no pane. Before, only weapons loaded a model. Armor, Ghosts, Vehicles and Ships were marked for a model pane but had no open context to load their art, so the pane never showed.
  • An item with several art parts draws them all. The picker above the preview lists the arrangement row first, then each part to show alone.
  • Item and weapon dyes now include the shader the item's sockets start with, so changing the shader plug recolors the preview. Before, weapons used only their own dyes.

Guardians

  • Armor opens fitted to a class and gender chosen in the picker. The Show Guardian toggle draws the Guardian wearing it, and toggling it frames the view again.
  • Weapons get the same toggle, which puts the weapon in the Guardian's hands in its hold pose. Choosing another clip in the animation controls plays it on the Guardian, and the weapon follows the grip bone.
  • Shaders open on a Guardian wearing a Legendary armor set of that class, colored by the shader. The set is found from the item index. Before, shaders had no preview.
  • Weapons and shaders use the same class and gender picker as armor. For armor, each entry names the piece's model with the Guardian wearing it.

Asset Lighting

  • Studio lighting mode now has a key light and a reflection environment that follow the camera. Before, it was one flat reflection level with no key, since the sun only ran with atmosphere lighting.
  • Exposure is fixed under studio lighting, so dark gear stays dark. Before, the view metered every asset model toward the same brightness. Other lighting modes still meter.
  • Ambient light is halved, from an intensity of 1 to 0.5, so the key light gives the model shape while its shaded side stays readable.
  • Hologram shells and other transparent parts are exposed with the model. Before, they were exposed for a sky the preview doesn't have, so they didn't match the model's brightness.
  • Weapons show in their idle state. Channels that carry gameplay state read as off when nothing sets them. Before, they read as full.
  • Edges are smoothed with FXAA.
  • A Flat Backdrop toggle swaps the sky gradient for one dark color. It's off by default.

Asset Framing

  • The view opens at a three-quarter angle in the model's own frame, so a weapon posed at an angle stands level.
  • The grid sits at the model's base as a floor, spaced to the model's size. Before, it was at world zero and spaced by camera distance.
  • Markers, collision and volumes are drawn and picked through the model's pose.
  • Grid lines are a lighter gray, so they show over both the gradient and the flat backdrop.

Preview Pane

  • The controls can float on hover instead of sitting above the view. They stay pinned by default, as before.
  • Pop Out opens the preview in its own window. Preview is also a dockable panel. The window stays open as you change assets and previews the model of the asset currently open.
  • A divider resizes the model pane. Until it is dragged, the pane keeps the original 55% beside the pages or 45% above them, and double-clicking the divider returns to that.
  • The controls fit on one row: the clip list is narrower, 160 pixels instead of 250, and the LOD and Layers menus are as wide as their labels.
  • Orthographic view:
    • Switching projection on a model in its own frame returns to the three-quarter view and frames the model again. Before, it switched projection and kept the camera where it was.
    • The framed view is 3 zoom steps inside the bounding-sphere fit, 61% of the fit distance. Perspective uses 1 step, 85%, which leaves room for depth that orthographic doesn't need.
    • The studio key light still lights the model, unshadowed, since the shadow cascades need the linear depth a perspective view gives. Before, orthographic view never drew the sun, in any lighting mode.
    • The projection is remembered and restored at launch.
  • New remembered settings, defaulting to current behavior: Orthographic, FlatBackdrop, AssetControlsPinned, ShowGuardian and ModelPaneDivider.

Fixes

  • Weapons with an empty art region now open with their model. Before, they opened with "No weapon model: An art variant has no model." Creating a weapon from one of these, which failed with the same error, now works, and the new weapon keeps the region empty.

Why

  • Only weapons showed a model. Armor, Ghosts, Vehicles and Ships had a model pane that never filled, and other items had none.
  • Armor and weapons could only be seen on a Guardian by setting up a loadout in the Guardian view, not from the item itself.
  • Shaders had no preview at all, and changing a weapon's shader plug didn't change its preview.
  • Studio lighting reflected one flat level with no key light, so models looked flat. Auto exposure metered dark gear up to gray.
  • Weapons showed their active state, since gameplay channels read as full, which made some weapons' base models hard to see.
  • Weapons with an empty art region opened without a model, and couldn't be used to create a weapon.

Effects

  • Asset viewer only, apart from the weapon art fix, which only changes weapons with an empty art region that couldn't be read at all before. Every other weapon reads and copies exactly as it did.
  • Maps and worlds are unchanged. The lighting and framing changes apply only to asset previews.
  • Opening an item now loads its art, and the Guardian when one is shown. The first shader preview for each class and gender looks through the item index once for a showcase set, then reuses it.
  • Studio's settings file gains five fields. Settings saved by an older build load with the defaults, which match current behavior.
  • Nothing new is written to projects or packages, and no game data is bundled.

Unchecked

Not every shader and model was checked for accuracy. Lighting and exposure are tuned by eye, not measured against the game. Items that don't list every dye may show generic colors.

Known Issues

Decals can streak in orthographic view, observed on some models like Ghost shells. This looks like depth precision: they may tie with the surface under them because of the camera's fixed orthographic depth range of -10,000 to 10,000, which this PR doesn't change.

Checks

  • dotnet build "Sunrise Studio.sln" -c Release with .NET SDK 10.0.402 on Windows 11: 0 warnings and 0 errors.
  • verify.ps1 -Game against the installed game passes.
  • Checked in Studio: armor on different classes and genders with and without Show Guardian, weapons held by a Guardian while changing clips, changing a shader plug and seeing the preview recolor, Pop Out, pinned and floating controls, the divider and orthographic view.

@KyleThmpsn
KyleThmpsn marked this pull request as draft October 22, 2026 18:01
@KyleThmpsn
KyleThmpsn marked this pull request as ready for review October 23, 2026 19:50
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.

1 participant