aipixel / GaussianAvatar

[CVPR 2024] The official repo for "GaussianAvatar: Towards Realistic Human Avatar Modeling from a Single Video via Animatable 3D Gaussians"
https://huliangxiao.github.io/GaussianAvatar
MIT License
440 stars 32 forks source link

error: GLSL 4.10 is not supported. #42

Open Zhibin-Liu opened 3 months ago

Zhibin-Liu commented 3 months ago

Thanks for your excellent work! I met an error when I tried to preprocess my own data. When I ran gen_pose_map_cano_smpl.py, I got the following error:

saving obj...
torch.Size([1, 24, 4, 4])
saving pose_map 512 ...
Compilation failure for vertex shader:
b'0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES\n'
Compilation failure for fragment shader:
b'0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES\n'
Linker failure: 
b'error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader'
Traceback (most recent call last):
  File "gen_pose_map_cano_smpl.py", line 112, in <module>
    save_npz(smplx_parm_path, 512)
  File "gen_pose_map_cano_smpl.py", line 94, in save_npz
    posmap512, _, _ = render_posmap(body_mesh.vertices, body_mesh.faces, uvs, faces_uvs, img_size=512)
  File "gen_pose_map_cano_smpl.py", line 27, in render_posmap
    rndr = PosRender(width=img_size, height=img_size)
  File "/data2/liuzhibin/GaussianAvatar/scripts/posmap_generator/lib/renderer/gl/pos_render.py", line 9, in __init__
    CamRender.__init__(self, width, height, name, program_files=['pos_uv.vs', 'pos_uv.fs'])
  File "/data2/liuzhibin/GaussianAvatar/scripts/posmap_generator/lib/renderer/gl/cam_render.py", line 9, in __init__
    Render.__init__(self, width, height, name, program_files, color_size)
  File "/data2/liuzhibin/GaussianAvatar/scripts/posmap_generator/lib/renderer/gl/render.py", line 49, in __init__
    self.model_mat_unif = glGetUniformLocation(self.program, 'ModelMat')
  File "src/latebind.pyx", line 51, in OpenGL_accelerate.latebind.Curry.__call__
  File "/home/liuzhibin/anaconda3/envs/hg/lib/python3.8/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 430, in glGetUniformLocation
    return baseOperation( program, name )
  File "/home/liuzhibin/anaconda3/envs/hg/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 415, in __call__
    return self( *args, **named )
  File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
        err = 1282,
        description = b'invalid operation',
        baseOperation = glGetUniformLocation,
        cArguments = (3, b'ModelMat\x00'),
        result = -1
)
Segmentation fault (core dumped)

The version of OpenGL should be the latest one. Here's the output of glxinfo | grep OpenGL

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 10.0.0, 128 bits)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.1 (Compatibility Profile) Mesa 20.0.8
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

I've been struggling with this error for a long time. Does anyone know how to fix it?

SE-starshippilot commented 3 months ago

Hey! I encountered this ssue before. Are you running on a headless server? If so, I would suggest using a desktop environment. It still triggers segmentation fault but the posemap is generated and I can run the training steps and produce results.

nagexiaochengzi commented 2 days ago

Has this problem been solved please, I'm having the same problem