Repository navigation
feat: [Remote rendering 3.5c] Server creates color lookup table and client stops creating its own - #161
Merged
Conversation
LKasianAnsys
changed the base branch from
main
to
feat/3.5b-client-uses-server-owned-variables
October 7, 2026 02:24
LKasianAnsys
force-pushed
the
feat/3.5b-client-uses-server-owned-variables
branch
from
October 7, 2026 20:29
40fb6b1 to
857b098
Compare
LKasianAnsys
force-pushed
the
feat/3.5c-server-created-lut
branch
2 times, most recently
from
October 7, 2026 21:33
1b26164 to
0c9b735
Compare
LKasianAnsys
marked this pull request as ready for review
October 7, 2026 22:37
Base automatically changed from
feat/3.5b-client-uses-server-owned-variables
to
main
October 13, 2026 16:27
…onse guard and range-refresh hook # Conflicts: # src/ansys/visor/viewer/renderer/null_renderer.py
LKasianAnsys
force-pushed
the
feat/3.5c-server-created-lut
branch
from
October 13, 2026 16:39
0c9b735 to
0189582
Compare
ansBAkula
approved these changes
Oct 14, 2026
ansBAkula
left a comment
Collaborator
There was a problem hiding this comment.
Discussed and tested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Addresses #23
Context
This is the third PR for user story 3.5 in Phase 3 of the remote rendering epic, which sees the visualizer state authority move from client to server.
Until now the browser created and configured its own lookup table (LUT) on every color apply. The server never set one explicitly; VTK created a default under the hood when the mapper was first serialized (unbuilt, component mode, default hue), and the client replaced it on every apply. Two issues arose from this: replacing a table the wasm object manager still indexed crashed the runtime (about 1 in 3 add_dataset calls after a part was colored), and the server could not say how a scene was colored without asking the browser.
This PR moves LUT ownership to the server. Each part's VTK pipeline creates a fixed magnitude table (blue-to-red hue) at construction and sets it on the mapper, so it ships with the mapper's serialized state; the client uses the table it receives and no longer calls
CreateDefaultLookupTable,SetHueRange, orSetVectorModeToMagnitude. Component selection stays on the mapper (-1 for magnitude).With the client no longer authoring color state, we are able to clean up the following pieces on the wire and save paths:
VisorSaveStateResponse._discard_browser_variable_states. Thesave_stateAPI now takesvariable_statesfrom the server's records; this is no longer needed.IRenderer.refresh_color_variable_rangeand its two implementations: was initially added as a no-op stub in remote rendering user story 1.2 but was never wired up as originally expected. As of user story 3.5a, range changes go throughapply_color_variable.Copilot summary
In this pull request, the server now creates and manages the color lookup table for part coloring, and the client no longer creates or configures its own lookup tables. The payloads and APIs have been updated to remove the need for clients to send color range (
min/max) values, and the server now applies its own authoritative range. Related code, tests, and documentation have been refactored to reflect this new responsibility split.Server-side rendering and lookup table management:
VtkNodePipelinenow owns and builds avtkLookupTablefor each part, which is set on the mapper and never reconfigured by the client. The lookup table is created with a blue-to-red hue range and magnitude mode, and is serialized with the part's state. [1] [2] [3] [4]set_part_color_variablelogic and related documentation have been updated: the color variable range is no longer carried in the payload, and the server uses its own record’s effective range. [1] [2]Client-side changes:
WasmRenderer) no longer creates or configures lookup tables when setting color variables. The LUT-related calls are removed, and the payload sent to the server omitsmin/maxfields. [1] [2]API and validation cleanup:
SetPartColorVariablePayloadmodel and related test cases have been updated to removemin_valandmax_valfields, and to ensure that payloads without these fields are properly handled. [1] [2] [3]These changes centralize color mapping logic on the server, reduce client complexity, and clarify the contract between client and server for part coloring in VISOR.