Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ Renderer: Failure to render higher LODs #6

Open
coledea opened this issue May 21, 2021 · 5 comments
Open

C++ Renderer: Failure to render higher LODs #6

coledea opened this issue May 21, 2021 · 5 comments

Comments

@coledea
Copy link

coledea commented May 21, 2021

Thank you very much for your work and the provided code!
I tried to run the C++ Renderer but encountered some problems when rendering higher LODs.
I am using Windows 10 / Libtorch 1.8 / CUDA 11.1 with a GeForce RTX 3090.

I had to make some changes to get the code running, especially changing some datatypes (e.g. from long to uint64_t). All the changes can be seen here coledea@9f2cebf.
Additionally I had to set g_TargetLevel to something smaller than g_SPC.getLevel() (e.g. 5). Otherwise I would get an illegal memory access error.
After that, the code compiled and I was able to run the application.

I trained on the armadillo model and I am able to render the neural representation with the provided python tools. With the C++ renderer, however, I am only able to render the lower LODs. On higher LODs, parts of the model are missing (as the pictures show) or I get the error CUDA Error: invalid configuration argument and nothing is rendered at all.

When activating debug output it shows for example a negative number for #elem in cf level 3:

offset_ on cf level 3 : 5122
# elem in cf level 3 : -1570503101
offset on parent nuggets array 4: 63
# elem in parent nuggets array 4: 156
offset on nuggets array 5 : 219
# elem in nuggets level 5 : 590

armadillo1
Lowest LOD.
armadillo2
Lowest LOD + 2
armadillo3
Lowest LOD + 3

Have you ever encountered this sort of problem and do you maybe know how to fix this?

EDIT: Interestingly, I am able to render higher LODs when using the model provided in #5. After clicking repeatedly +, I then get again the CUDA error (invalid configuration argument). I am using this .npz file: link

@tovacinni
Copy link
Collaborator

Hi, thanks for your interest in our work.

It's very weird that it works with the model provided in the other issue... I've been meaning to dive into this issue but haven't had the time to do so yet. Thanks for your patience!

@zhaoyuanyuan2011
Copy link

Hi @coledea , may I ask what parameters did you pass to output the .npz file? I noticed it's asking for --num_steps and --camera_clamp etc. but I'm not sure how to set them. Thank you!

@coledea
Copy link
Author

coledea commented May 3, 2022

I did just use the command specified in the readme. I did not pass values for num_steps or camera_clamp. Worked fine for me.

@zhaoyuanyuan2011
Copy link

zhaoyuanyuan2011 commented May 3, 2022

Hi @coledea , Thank you so much for the explanation! I manually set the values to default ones and it moved forward now.

May I ask that do you still remember how much memory is required to export a mesh using the command mentioned above? As I'm getting RuntimeError: CUDA out of memory. Tried to allocate 978.00 MiB (GPU 0; 22.38 GiB total capacity; 21.05 GiB already allocated; 63.94 MiB free; 21.68 GiB reserved in total by PyTorch) no matter which gpu I use. Thanks again!

--update--
Thank you for the reply!

@Sylva-Lin
Copy link

Sylva-Lin commented Dec 13, 2022

@zhaoyuanyuan2011 Hi, do you remember what the default values for these inputs (--num_steps and --camera_clamp etc.) are? I also need my own input here to run

I have found it at options.py and it moved forward now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants