Page 1 of 1

Changing background color or texture?

Posted: Thu Jan 24, 2019 4:37 pm
by Zackory
In pybullet, is it possible to change the current background color (light blue/purple) to another color, or even to a texture?
For example, is it possible to have a starry night background, similar to the one found in DeepMind's control suite?

Re: Changing background color or texture?

Posted: Sat Jan 26, 2019 6:30 pm
by Zackory
I have found out we can change the background color of the GUI window using the following code:

Code: Select all

import pybullet as p
p.connect(p.GUI, options='--background_color_red=1.0 --background_color_green=0.0 --background_color_blue=0.0')

Re: Changing background color or texture?

Posted: Fri Jun 17, 2022 3:33 am
by andytgl
Regarding this, I find myself unable to change the background color (which will remain light purple) either in the GUI window or in DIRECT mode when using the code above. I have experienced this issue with pybullet 3.2.5 on the following OS/python versions
- python 3.9.12 on MAC OS 11.6.5
- python 3.8.10 on Ubuntu 18

An example of the output I get is the following:
Python 3.9.12 (main, Mar 26 2022, 15:52:10)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pybullet as p
pybullet build time: Jun 16 2022 23:11:14
>>> p.connect(p.GUI, options='--background_color_red=1.0 --background_color_green=1.0 --background_color_blue=1.0')
Version = 4.1 ATI-4.6.21
Vendor = ATI Technologies Inc.
Renderer = AMD Radeon Pro 5300M OpenGL Engine
b3Printf: Selected demo: Physics Server
startThreads creating 1 threads.
starting thread 0
started thread 0
MotionThreadFunc thread started
with background color:

Has anyone experienced the same issue?