Comments (3)
I think the best option is to start with the sink device and start building up an implementation from there. The sink device exists as a test implementation that trades robustly taking any API call stream for not doing anything useful. What this does is get some basics "off the ground" -- being able to load your library/device, mapping frame output data, etc. From there I would take a very simple ANARI application (such as anariTutorial
) and progress through the API in roughly the following order:
- base object lifetime (
anariNew*()
,anariRetain()
,anariRelease()
) - object parameters/commits
ANARIFrame
interface (parameters, map/unmap, correct pixel formats, etc)ANARICamera
: basicperspective
parameters- hard coded scene inside
ANARIWorld
(ignores parameters) to getanariRenderFrame()
setup ANARIArray1D
: get each array ownership model correct- arrays of objects: lock down the extra object lifetime concerns for arrays of
ANARIObject
ANARISurface
without instancing, with placeholder objects where possible (i.e.ANARIMaterial
)
That should get you to a basic image fairly quickly and gives you an idea of how the object model expressed by the ANARI API looks like. From there it's a matter of building out the rest of the object types, and then the object subtypes where relevant. This will also give you an idea of how to read through other implementations to see what they do, such as the example device or a vendor implementation like VisRTX.
In any case, I recommend dealing with some of the core problems first (object lifetimes, parameters/properties, arrays etc.), then start working on the world object hierarchy one object at a time. Each of these problems are relatively "bite sized", though there are quite a few things to go through in the end. I'm hoping to one day write up either blog posts or make YouTube videos walking through implementing ANARI, but alas that doesn't exist yet! 😅
from anari-sdk.
I'll also note that you can also take the approach to connect ANARI to another existing rendering system. This is the current approach used for RadeonProRender and OSPRay respectively. Getting the basics of objects, parameters, lifetimes, etc. as outlined above are still important to solve correctly, but it's very reasonable to forward the "heavy lifting" of actual rendering to an existing rendering engine.
from anari-sdk.
Thank you @jeffamstutz
from anari-sdk.
Related Issues (20)
- Please support MSYS2 MINGW64 HOT 4
- ANARIFeatures missing extension ANARI_KHR_STEREO_RENDERING HOT 2
- build failing, v0.3.0 and latest main HOT 5
- Create an offline version for the build HOT 3
- NULL pointer dereference in anariLoadLibrary if ANARI_LIBRARY is not set HOT 2
- Test fail with SIGILL HOT 1
- `primitive.index` not used for indexing into `vertex.color` HOT 1
- Vcpkg port HOT 2
- Wrong type for parameter `outOffset` of sampler `transform` HOT 1
- Missing CMake target for the debug backend layer HOT 1
- New device documentation HOT 3
- Comparing ANARIDataType in c++20
- Ensure spec compatibility with ANARI_BOOL in C++ wrappers
- Anari Python Bindings, Arrays of Arrays HOT 9
- Fails to build with Intel compilers. HOT 4
- Compiling on Windows - Visual Studio 2019 HOT 4
- Add SDK version as a #define
- Need to move anariGetObjectFeatures definition to the API.cpp implementation file HOT 4
- Building helide device fails for CMake 3.18 HOT 1
- Building GL Viewer on macOS fails due to missing GLES HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anari-sdk.