Open virtualritz opened 3 years ago
Very cool! Now I know what I'm doing this weekend π
You will be the first 'other' renderer to add an NSI API. π I sent you an invite for the 3Delight slack per Twitter PM.
So the caveats.
The NSI API supports scene edits via NSIRenderControl("sync",...)
. To support this, too, you will need to add this bit that I saw on your todo list
But this is not mandatory. The DCC plug-ins have support for IPR viewport rendering which won't work w/o scene edits but that feature can probably be isolated with some #ifdef
s to make everything work if this feature is not implemented.
NSI's shading system is built around the idea that the renderer supports OpenShadingLanguage (OSL) to describe shader graphs. Integrating OSL is no weekend project.
Again, that being said: the API makes no assumptions in that regard. It's just that shaders are assumed to exist outside the renderer.
Workarounds:
3Delight ships with a set of artist friendly OSL shaders and these are well integrated with the DCC plug-ins. The most used one is a Disney Principled based Uber shader called dlPrincipled
. They also recently added an implementation of Autodesk Standard Surface β dlStandard
.
If you map what you have in the renderer to these two shaders and intercept dlTexture
nodes plugged directly into their slots you will have something that is 90% useful w/o adding OSL support. A bit of a hack but should be good enough.
Same for lights which are just geometry with a surface shader emitting, in OSL. It's based on reality β it doesn't have a concept of a light as something special.
A bit more work: in your version/fork of the DCC plugins you can expose shader nodes only mirroring what your renderer supports.
NSI also supports subdivision surfaces via extra attributes on the mesh
node.
Workaround: ignore these attributes and just render the control cage as a polygon mesh.
If you wanted to add support for subdivs, Pixar's OpenSubdiv is a painless dependency (as in: as painless as it gets in C/C++ land). It uses CMake, can be built with the (default) CPU backend only and then has no further dependencies. Add it as a git submodule and a bit of CMake and you should be good to go.
Being C++ It uses some template classes that require a specialization, each, to be usable.
You can grab specializations that expose a C-only API from an OpenSubdiv Rust wrapper.
In general, if you are interested in using C++ dependencies but with a C-API, watch this project β C++--.
Hmm. So whith this can we integrate to Blender also?
There is no NSI Blender plug-in yet. 3Delight have said they want to do one, at some point.
That said, no one stops you from making a plugin yourself. A good start may be the source code of the Appleseed or Cycles integration as they will cover the OSL part.
NSI was developed with both VFX production demands for a scene description and plugin developers mind.
This is not easy as these two groups sometimes have orthogonal requirements.
RenderMan RIB/the RenderMan Interface was the industry standard for many years but it can't serve this purpose any more, with the demands of today's productions. USD is both an asset container and a scene description. But it is not there yet and also didn't concern itself with the requirements of plugin developers.
Thanks for info.
Regards, Odilkhan Yakubov.
ΡΡ, 15 ΠΠΏΡ 2021, 15:42 Moritz MΕller @.***>:
There is no NSI Blender plug-in yet. 3Delight have said they want to do one, at some point.
That said, no one stops you from making a plugin yourself. A good start may be the source code of the Appleseed or Cycles integration as they will cover the OSL part.
NSI was developed with both VFX production demands for a scene description and plugin developers mind.
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vkoskiv/c-ray/issues/103#issuecomment-820324792, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKRYHBSEMIGOY2YBPEQFCTTI27JZANCNFSM4252RMLQ .
NSI is a replacement for RenderMan Ri/RIB that was developed by Illumination Research for their 3Delight renderer.
3Delight used to be RenderMan compliant from 1999β2019.
The NSI API is completely open and very minimal. It's a single header.
An NSI parser will be made OSS soon too. But it's fine to just have the C-API at the beginning. It's just 11 functions.
Having the C-API implemented for
c-ray
will instantly allow you to hook up the renderer to these apps:All of the NSI plug-ins for these apps are OSS and hosted here: https://gitlab.com/3Delight