Skip to content

Commit

Permalink
Enable back face culling in dm_control.viewer.
Browse files Browse the repository at this point in the history
The viewer has its own set of default renderer flags, and when the `mjRND_CULL_FACE` flag was introduced in MuJoCo (google-deepmind/mujoco@396fdf0) the viewer's default was not updated.

Fixes #346.

PiperOrigin-RevId: 472753294
Change-Id: I33e6f48ff1ea887d07765ae851651f6c106cb08b
  • Loading branch information
saran-t authored and copybara-github committed Sep 7, 2022
1 parent 60e18a5 commit d05e627
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dm_control/mujoco/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
" 'Go to the Runtime menu and select Choose runtime type.')\n",
"\n",
"print('Installing dm_control...')\n",
"!pip install -q dm_control\u003e=1.0.6\n",
"!pip install -q dm_control\u003e=1.0.7\n",
"\n",
"# Configure dm_control to use the EGL rendering backend (requires GPU)\n",
"%env MUJOCO_GL=egl\n",
Expand Down
1 change: 1 addition & 0 deletions dm_control/viewer/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
_DEFAULT_RENDER_FLAGS[mujoco.mjtRndFlag.mjRND_SHADOW.value] = 1
_DEFAULT_RENDER_FLAGS[mujoco.mjtRndFlag.mjRND_REFLECTION.value] = 1
_DEFAULT_RENDER_FLAGS[mujoco.mjtRndFlag.mjRND_SKYBOX.value] = 1
_DEFAULT_RENDER_FLAGS[mujoco.mjtRndFlag.mjRND_CULL_FACE.value] = 1


class BaseRenderer(metaclass=abc.ABCMeta):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def is_excluded(s):

setup(
name='dm_control',
version='1.0.6',
version='1.0.7',
description='Continuous control environments and MuJoCo Python bindings.',
long_description="""
# `dm_control`: DeepMind Infrastructure for Physics-Based Simulation.
Expand Down
2 changes: 1 addition & 1 deletion tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
" 'Go to the Runtime menu and select Choose runtime type.')\n",
"\n",
"print('Installing dm_control...')\n",
"!pip install -q dm_control\u003e=1.0.6\n",
"!pip install -q dm_control\u003e=1.0.7\n",
"\n",
"# Configure dm_control to use the EGL rendering backend (requires GPU)\n",
"%env MUJOCO_GL=egl\n",
Expand Down

0 comments on commit d05e627

Please sign in to comment.