How to implement Oracle-type operations?
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?
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.
Thank you so much,sir . I
Dear sir, I have encountered another issue. When I use functions like blend (or blend_intersection, etc.) to mix SDFs several times, I find that the normal vector becomes "infinite", which causes the graph to turn black. Do you have any suggestions for solving this? Thank you