mkeeter / mpr

Reference implementation for "Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces" (SIGGRAPH 2020)
191 stars 15 forks source link

How to implement Oracle-type operations? #5

Open VokerZJ opened 2 months ago

VokerZJ commented 2 months ago

I would like to use the Tree constructed with Libfive's Oracle API for rendering with MPR, taking full advantage of the GPU's acceleration capabilities. However, I found that the code does not seem to support this kind of operation. I want to know how to implement it. Can anyone give me some advice and help? image

mkeeter commented 2 months ago

This will not be particularly easy!

As you've seen, MPR only supports pure math operations. Implementing a fully generic oracle for MPR would probably be overkill; in libfive, it was important to allow others to extend the library with closed-source components.

It would be simpler to add a specific new opcode (e.g. ORACLE_MESH), then write the CUDA code to implement that operation. The actual implementation — as well as how to pass in data and whether to support tape simplification — are left as an exercise to the reader.

VokerZJ commented 2 months ago

Thank you so much,sir . I