3dsmax c++ SDK generic OctMap Camera that could work with most renderers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the past I have written custom camera plugins for MentalRay (lens shaders) as well as V-Ray.
What I would like to do now is to implement a camera that renders into an OctMap, which is similar to a Cubemap, but with a more optimal pixel distribution https://cloud.githubusercontent.com/assets/171001/15010736/8a015b30-11e5-11e6-89cf-457a189f9bba.jpg.
Now, I would know how to go about to implement this as a V-Ray Camera. But if possible I’d like to implement it as a 3Dsmax camera in the hope that it would work with most raytracers out of the box.
Having implemented a raytracer in the past, I know that there is somewhere some piece of code that defines the mapping to create the primary rays based on currently rendered pixel- (and sub-pixel) location.
Something like
Ray getRayFromSampleLocation(Vec2 uv); //pseudo-code
What I don’t know is whether in 3dsmax, that piece of code is part of 3dsmax or if it is part of each renderer - and if it is part of 3dsmax, whether (and how) it’s possible to write a plugin that provides a custom RenderUV->PrimaryRay implementation for it.
Is this possible using the 3dsmax SDK or would i definitely have to develop a unique plugin for each renderer I want to support?