Loading texture for each surfaces of a cube?

trqminh
Posts: 3
Joined: Mon Sep 07, 2020 1:40 am

Loading texture for each surfaces of a cube?

Post by trqminh »

I load a cube from cube.urdf in pybullet_data, how can I change the color of each surface of the cube with different color?

Thank you in advance for your consideration.
Last edited by trqminh on Tue Oct 20, 2020 4:03 am, edited 1 time in total.
samlrs
Posts: 2
Joined: Fri Oct 02, 2020 9:54 am

Re: Loading texture for each surfaces of a cube?

Post by samlrs »

I load a cube from cube.urdf in pybullet_data, how can I change the color of each surface of the cube?

Thank you in advance for your consideration.
Try

Code: Select all

p.changeVisualShape(sphere,linkIndex,rgbaColor=[red,green,blue,1])
trqminh
Posts: 3
Joined: Mon Sep 07, 2020 1:40 am

Re: Loading texture for each surfaces of a cube?

Post by trqminh »

Thank for your answer but I want each surface with different color
samlrs
Posts: 2
Joined: Fri Oct 02, 2020 9:54 am

Re: Loading texture for each surfaces of a cube?

Post by samlrs »

Then you should also check out this github post

https://github.com/bulletphysics/bullet3/issues/1295