mabaorui / NeuralPull

Implementation of ICML'2021:Neural-Pull: Learning Signed Distance Functions from Point Clouds by Learning to Pull Space onto Surfaces
MIT License
179 stars 28 forks source link

Make a shadertoy rendering from output #11

Closed fire closed 2 years ago

fire commented 2 years ago

Hi, I was wondering how to extract one possible sdf array so I can render it and use it for data base search?

Siren made a good demo. https://www.shadertoy.com/view/wtVyWK I wanted to do the same to NeuralPull.

mabaorui commented 2 years ago

I guess you want to directly render the SDF function. I watched this video, https://www.youtube.com/watch?v=8pwXpfi-0bU,he saves the parameters in the neural network through this function ‘serialize_to_shadertoy’, and finally uses this parameters to render the model. But because my code is a tensorflow version, you may need to call tf.global_variables() in NeuralPull.py to save the network parameters you need, and then use it for rendering. But in my code, I extract the mesh through marching-cube, and finally use it for visualization. https://github.com/mabaorui/NeuralPull/blob/a140258174d0e49a04aeec6c4702ce6639c7f0b0/NeuralPull.py#L393

fire commented 2 years ago

Ah I was comparing the various implementations of sdks.

My next test is from Nvidia. Thanks.