Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
563fc87
feat: map Visor parts to pvserver blocks
LKasianAnsys Nov 12, 2026
6dd0231
feat: draw each PARAVIEW dataset as one composite representation
LKasianAnsys Nov 13, 2026
11c5276
feat: batch block selection and property writes
LKasianAnsys Nov 13, 2026
fc52124
fix: selection highlight in PARAVIEW mode
LKasianAnsys Nov 13, 2026
0dd6308
fix: selection highlight in PARAVIEW mode - no wireframe and add high…
LKasianAnsys Nov 13, 2026
2d4878e
feat: render one PARAVIEW camera frame per frame request
LKasianAnsys Nov 13, 2026
a62a5c9
fix: color LUT values in PARAVIEW mode
LKasianAnsys Nov 13, 2026
2bcc798
fix: temp workaround for z-fighting: enable wireframe selection inste…
LKasianAnsys Nov 13, 2026
f8f3bfe
feat: pivot about centre of bounds in PARAVIEW mode
LKasianAnsys Nov 16, 2026
01e450b
feat: batch selection and visibility requests
LKasianAnsys Nov 16, 2026
1bed110
feat: batch selection for deselection
LKasianAnsys Nov 16, 2026
6c3e1c4
chore: adding changelog file 225.added.md [dependabot-skip]
pyansys-ci-bot Nov 16, 2026
c7b8606
fix: prettier add noqa for 4 mocked method names
LKasianAnsys Nov 16, 2026
4c329eb
test: skip paraview tests on non-paraview python version
LKasianAnsys Nov 16, 2026
552e7a7
test: fix - reset area.captures so only real captures are counted
LKasianAnsys Nov 16, 2026
0922e3e
Revert "test: skip paraview tests on non-paraview python version"
LKasianAnsys Nov 16, 2026
447d85d
Revert "feat: batch selection for deselection"
LKasianAnsys Nov 16, 2026
bc77fa5
Revert "feat: batch selection and visibility requests"
LKasianAnsys Nov 16, 2026
69ec3b2
chore: adding changelog file 225.added.md [dependabot-skip]
pyansys-ci-bot Nov 16, 2026
5a3753c
chore: set InterpolateScalarsBeforeMapping = 0 on rep and remove colo…
LKasianAnsys Nov 18, 2026
4c25e58
fix pytest.ini after merge issue
LKasianAnsys Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/225.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remote rendering 5.2b - Render mult-part datasets with per-part color and selection in ParaView mode
6 changes: 5 additions & 1 deletion src/ansys/visor/viewer/app/trame/paraview_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
ParaviewApp
===========
:class:`ServerApp` for a scene rendered by pvserver: the same triggers and
streamed view, reporting the PARAVIEW rendering mode.
streamed view, reporting the PARAVIEW rendering mode, with every frame
streamed at one quality.

Not decorated again: ``ServerApp``'s decoration already registers every
trigger this class inherits, and a second decoration would register each one
Expand All @@ -18,6 +19,9 @@
class ParaviewApp(ServerApp):
"""ServerApp that reports RenderingMode.PARAVIEW."""

INTERACTIVE_QUALITY: int = 90
"""Equal to STILL_QUALITY, so an unchanged scene is never rendered through pvserver again to re-encode it."""

@property
def rendering_mode(self) -> RenderingMode:
"""RenderingMode.PARAVIEW."""
Expand Down
10 changes: 8 additions & 2 deletions src/ansys/visor/viewer/app/trame/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ class SetDarkThemePayload(BaseModel):
class ServerApp(SceneTriggerApp):
"""Serves the scene triggers, part and geometry picking and the streamed view for server-side rendering."""

INTERACTIVE_QUALITY: int = 60
"""JPEG quality of frames streamed while the scene changes."""

STILL_QUALITY: int = 90
"""JPEG quality of the frame re-rendered once changes stop; equal to INTERACTIVE_QUALITY, none is re-rendered."""

def __init__(
self,
server: Server,
Expand Down Expand Up @@ -97,8 +103,8 @@ def _bind_stream(self) -> None:
self._rca_window,
encoder="jpeg",
target_fps=30.0,
interactive_quality=60,
still_quality=90,
interactive_quality=self.INTERACTIVE_QUALITY,
still_quality=self.STILL_QUALITY,
)
self._rca_window.bind_pixel_scale(lambda: view_handler.scale_factor)
self._bridge.bind(view_handler)
Expand Down
9 changes: 4 additions & 5 deletions src/ansys/visor/viewer/renderer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,10 @@ def apply_selected(
"""
Apply or remove the selection highlight on *node_id*.

Writes ``AmbientColor`` (the selection tint), ``Ambient`` and
``Diffuse`` as a function of *selected* only, and
``DiffuseColor = diffuse_rgb`` on both branches. Selection never
replaces the part colour. *diffuse_rgb* is the part's current diffuse
colour.
A selected part is visibly distinguished from an unselected one, as a
function of *selected* only. *diffuse_rgb*, the part's current
diffuse colour, is kept on both branches: selection never replaces
the part colour.

On return, the state this renderer serves to the client reflects the
write, and the client is not notified.
Expand Down
13 changes: 9 additions & 4 deletions src/ansys/visor/viewer/renderer/paraview_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

The base area renders the raw window before each capture. Rendering through
the session instead renders the view proxy, so pvserver renders and
composites the frame the window then holds.
composites the frame the window then holds. Writes held back until the
frame are made first.
"""

from __future__ import annotations
Expand All @@ -15,18 +16,22 @@
from trame_rca.rca import VtkRemoteControlledArea

if TYPE_CHECKING:
from collections.abc import Callable

from ansys.visor.viewer.renderer.paraview_session import ParaviewSession


class ParaviewCapture(VtkRemoteControlledArea):
"""trame-rca area over the view's client-side render window that renders through ParaView."""

def __init__(self, session: ParaviewSession) -> None:
"""Capture session.render_window."""
def __init__(self, session: ParaviewSession, before_render: Callable[[], None]) -> None:
"""Capture session.render_window; before_render makes the writes held back until the frame."""
super().__init__(session.render_window)
self._session = session
self._before_render = before_render

def _render(self) -> None:
"""Render the view through the session, so pvserver renders and composites the frame."""
"""Make the held-back writes, then render the view through the session so pvserver renders the frame."""
with self._timer_render:
self._before_render()
self._session.render()
Loading
Loading