Skip to content

Can I use a custom shape function using numpy or torch? #555

Answered by mkeeter
narnia-mason asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, that's not possible right now.

libfive works by compiling shapes down to math trees, usually using evaluation tracing (that's how the @shape decorator works). These tree objects are what's rendered, so it doesn't support arbitrary code.

If you could export such a math tree from Torch, that would be one option; another option would be to use the Oracle API (which requires writing C++, discussed here). I don't have the resources to do either implementation myself.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@narnia-mason
Comment options

Answer selected by narnia-mason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants