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

Geometric differentiation cannot optimize vertex positions at all. #182

Closed
udemegane opened this issue Jun 16, 2020 · 8 comments
Closed

Comments

@udemegane
Copy link

udemegane commented Jun 16, 2020

I'm not an English native, so I first apologize for the unnatural English.
I am using the "pathreparam" plugin (OptiX6.5) to test geometric differentiation. It transforms the base sphere object into another body.
However, it exhibits very unnatural behaviour.
The following is a video that attempts to transform a sphere into an ear.
sphere2ear

out_000

  • base object(sphere)

Screenshot_20200617_011827

  • ref object(ear)

I've tried multiple approaches, such as parameter tuning, regularization,
setting background objects and adjusting lighting etc.but I can't avoid mesh collapse.
Curiously, this collapse of the mesh changes shape each time you run your code. (Despite the exact same program)

Depending on the object to be transformed, the collapse of the mesh can be almost avoided.

sphere2s08 (1)

Screenshot_20200617_012634

  • ref objects

I have no idea what is happening.

Thank you.

@arpit15
Copy link
Contributor

arpit15 commented Jun 19, 2020

Have you given the new version of the plugin a try?

@udemegane
Copy link
Author

I tried the new version but it still doesn't work. If I make any progress, I will report it here.

@Speierers
Copy link
Member

Hi @udemegane ,

Please have a look at the tutorials in the pathreparam-optix7 branch, this could be helpful.

How do you modify the mesh at every iteration? Do you let the optimizer move the vertices directly using gradient descent to are you implementing a intermediate step, like in the tuto? (e.g. constrained to displacement along the normals)?

@arpit15
Copy link
Contributor

arpit15 commented Jun 22, 2020

@Speierers I get errors when I run pathreparam ex. For ex, I ran invert_pose.py and I get following error

cuda_check(): runtime API error = 0002 "cudaErrorMemoryAllocation" in ../ext/enoki/src/cuda/horiz.cu:59.
terminate called after throwing an instance of 'std::runtime_error'
  what():  CUDABackend: referenced unknown variable 112575
Aborted (core dumped)

I have RTX 2080 with 11MiB RAM. When I build in debug mode, the gdb bt complains path-reparam.cpp:449

@Speierers
Copy link
Member

It is possible that you are running out of memory on your GPU, the pathreparam integrator uses quite a bit of VRAM. Could you try to renderer with lower SPP maybe?

@udemegane
Copy link
Author

@Speierers
I do not give direct constraints on individual vertices, such as constrained to displacement along the normals. But that's a good idea, so I'd like to put it into practice, but I couldn't find a description in the documentation that would limit the vertices. Am I overlooking something?

@arpit15
Copy link
Contributor

arpit15 commented Jun 23, 2020

@Speierers Yeah it turns out spp got me again. I reduced it to 16 and everything worked. Is there a rule of thumb for memory with pathreparam to decide on the image size and spp?

@udemegane
Copy link
Author

I finally got the understanding about the pre render callback function. I also fully understood this issue by reading the pathreparam paper. All causes are simply that there were cases where the mesh was "not valid". Careful reading of the documentation tutorials will work around this issue, so I shut this out. Thank you for all your efforts!

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

3 participants