Open
Description
Description
Hi all
I'm trying to display a garment 3D object, loaded as gltf. The material in my glb file is one-sided, so I tried to use the material settings from niceGUI to convert it to a double-sided material as follows:
# Camera setup
camera_location = [0, -200., 1.25]
camera = ui.scene.perspective_camera(fov=np.pi / 6.)
camera.x = cam_location[0]
camera.y = cam_location[1]
camera.z = cam_location[2]
camera.look_at_x = 0
camera.look_at_y = 0
camera.look_at_z = cam_location[2] * 2/3
# Create scene
with ui.scene(
width=1024,
height=800,
camera=camera,
grid=False,
) as ui_3d_scene:
ui_3d_scene.gltf(
'geo/Configured_design_3D.glb',
).scale(0.01).rotate(np.pi / 2, 0., 0.).material(side='double')
However, the displayed object is still one-sided (the back of the garment visible through the neck and sleeve holes is not rendered):
Here is how I expect it to look like:
Seems like currently, material setup in gltf object takes precedence over the additional material setup, but I would expect it to be the other way around, for the material properties that are explicitly set
Here is the glb file:
Configured_design_3D_sim.zip