-
Notifications
You must be signed in to change notification settings - Fork 0
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
New renderer in Rust using the nsi crate #22
Comments
Sorry, I completely missed this. You need to expose the C API. I.e. what is in the The main issue is that you need to actually also replicate the functionality of NSI. I would be interested in helping writing this middle layer crate. That crate would keep the node graph representation and offer hooks to convert data to whatever internal representation the renderer requires. Then there is the biggest challenge: Open Shading Language support. For shading NSI relies on OSL. An alternative is to use pre-defined material/texture nodes that a renderer implements. And then combine them into a shading network via NSI, just as one would with OSL nodes. Probably MaterialX would be a good, minimal, starting point. Of course, if you have OSL, you can just use the MaterialX reference implementation. Without OSL you need to translate the MaterialX nodes to your renderer. As a reward you renderer is immediately available in Maya, Houdini and Cinema4D via the resp. OSS plugins on GitLab. |
Once you have the C-API exposed, you can then compile your renderer to a dylib and load that instead of When that happens I will gladly add code that lets a user select the rendering backend both at build time as well as dynamically, at compile time. I.e. there would probably be |
Furthermore, once the middle layer exists, we could create a Rust-only version of the NSI API that offers move and borrow semantics for the data passed into a The C-FFI wrapper around that would just call the move version with a copy of the data passed in. |
Hello, sorry if my question is trivial, but what are the steps to use this crate correctly when writing a new renderer instead of using 3dlight ?
The text was updated successfully, but these errors were encountered: