jkxing / DROT

Code for SIGGRAPH ASIA 2022 paper Differentiable Rendering using RGBXY Derivatives and Optimal Transport
MIT License
72 stars 6 forks source link

Recommend replacing RasterizeGLContext withRasterizeCudaContext #3

Open Assassin-plus opened 1 year ago

Assassin-plus commented 1 year ago

Since the nvdiffast developr mentioned in https://github.com/sicxu/Deep3DFaceRecon_pytorch/issues/108

Also, the current version of nvdiffrast includes a Cuda-based rasterizer that doesn't require OpenGL. You may want to consider switching to that by default, as setting up OpenGL can be tricky on some platforms.

I recommend to replace the RasterizeGLContext() function in core/NvDiffRastRenderer.py line 25 to RasterizeCudaContext().

It should be fine since I can run the code after the replacement, and if I don't replace it, I came up with the same problem in https://github.com/sicxu/Deep3DFaceRecon_pytorch/issues/2

$ python experiments/smpl/optim.py Setting up [LPIPS] perceptual loss: trunk [alex], v[0.1], spatial [off] Loading model from: /usr/local/miniconda3/envs/DROT/lib/python3.8/site-packages/lpips/weights/v0.1/alex.pth [F glutil.cpp:332] eglGetDisplay() failed Aborted

jkxing commented 1 year ago

Thanks! I'll check it.