Skip to content

Commit

Permalink
Merge pull request #352 from brainglobe/fix-outlines
Browse files Browse the repository at this point in the history
Fix jagged renderings in cartoon mode and restore default shader style
  • Loading branch information
alessandrofelder authored May 15, 2024
2 parents baa5a69 + f43d02a commit fe39118
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions brainrender/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def render(
interactive=None,
camera=None,
zoom=None,
update_camera=True,
**kwargs,
):
"""
Expand All @@ -205,7 +204,6 @@ def render(
Pass a valid camera input to specify the camera position when
the scene is rendered.
:param zoom: float, if None atlas default is used
:param update_camera: bool, if False the camera is not changed
:param kwargs: additional arguments to pass to self.plotter.show
"""
logger.debug(
Expand All @@ -229,7 +227,7 @@ def render(
camera["focal_point"] = self.root._mesh.center_of_mass()

if not self.backend and camera is not None:
camera = set_camera(self, camera)
_ = set_camera(self, camera)

# Apply axes correction
for actor in self.clean_actors:
Expand Down Expand Up @@ -266,7 +264,6 @@ def render(
interactive=interactive,
zoom=zoom,
bg=settings.BACKGROUND_COLOR,
camera=camera.copy() if update_camera else None,
rate=40,
axes=self.plotter.axes,
)
Expand Down
2 changes: 1 addition & 1 deletion brainrender/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
ROOT_COLOR = [0.8, 0.8, 0.8] # color of the overall brain model's actor
ROOT_ALPHA = 0.2 # transparency of the overall brain model's actor'
SCREENSHOT_SCALE = 1
SHADER_STYLE = "plastic" # affects the look of rendered brain regions: [metallic, plastic, shiny, glossy, cartoon]
SHADER_STYLE = "cartoon" # affects the look of rendered brain regions: [metallic, plastic, shiny, glossy, cartoon]
SHOW_AXES = True
WHOLE_SCREEN = False # If true render window is full screen
OFFSCREEN = False

0 comments on commit fe39118

Please sign in to comment.