Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

Cloth simulation

Open alelordelo opened this issue 10 months ago • 4 comments

Can Genesis do cloth simulation on a walking avatar?

I found this demo for a simple cloth material, but wondering if collision avatar-> cloth would also work?

import genesis as gs

########################## init ########################## gs.init()

########################## create a scene ##########################

scene = gs.Scene( sim_options=gs.options.SimOptions( dt = 4e-3, substeps = 10, ), viewer_options=gs.options.ViewerOptions( camera_fov = 30, res = (1280, 720), max_FPS = 60, ), show_viewer = True, )

########################## entities ########################## plane = scene.add_entity( morph=gs.morphs.Plane(), )

cloth_1 = scene.add_entity( material=gs.materials.PBD.Cloth(), morph=gs.morphs.Mesh( file='meshes/cloth.obj', scale=2.0, pos=(0, 0, 0.5), euler=(0.0, 0, 0.0), ), surface=gs.surfaces.Default( color=(0.2, 0.4, 0.8, 1.0), vis_mode='visual', ) )

cloth_2 = scene.add_entity( material=gs.materials.PBD.Cloth(), morph=gs.morphs.Mesh( file='meshes/cloth.obj', scale=2.0, pos=(0, 0, 1.0), euler=(0.0, 0, 0.0), ), surface=gs.surfaces.Default( color=(0.8, 0.4, 0.2, 1.0), vis_mode='particle', ) )

########################## build ########################## scene.build()

alelordelo avatar Dec 20 '24 13:12 alelordelo