Orthographic-Cylindrical Camera in Karma XPU

   763   7   2
User Avatar
Member
82 posts
Joined: March 2017
Offline
Is there a way to get an Orthographic Cylindrical camera lens in Karma (ideally XPU).

Been setting up some scenes that need it and thus far the only option seems to be Redshift as the Karma Lens Material set to Cylindrical gives vertical perspective.
It would also be great if there was FOV controls but that's secondary.

CVEX lenses still don't work in XPU right?
Is there maybe some way of diving in and editing the Karma Lens Material implementation?
User Avatar
Staff
480 posts
Joined: Sept. 2016
Offline
Hi. Not at the moment.
The builtin cylindrical lens implementation in karma CPU/XPU are... unconventional. It's going to be changed to be orthographic and match mantra behaviour in next major release, but for now, your only option is to use CPU and make a custom lens shader or modify the existing vex script (lens.h).
User Avatar
Member
82 posts
Joined: March 2017
Offline
Fair enough. Good to know it's coming though! Thanks

Is is also planned for XPU to support custom lens scripts in some fashion? Octane can do it with OSL for example.
User Avatar
Member
8223 posts
Joined: Sept. 2011
Offline
dlee
The builtin cylindrical lens implementation in karma CPU/XPU are... unconventional. It's going to be changed to be orthographic and match mantra behaviour in next major release, but for now, your only option is to use CPU and make a custom lens shader or modify the existing vex script (lens.h).

The current implementation should be kept and renamed though. What type of projection is it? Is it an X-Pan style swinging lens projection? {vertically rectilinear(perspective), horizontally equirectangular(longitudinal)}

Putting a sheet of paper in a coffee can pinhole camera is another type of cylindrical projection, but I think a bit different than the other two.

A Panini projection would be another useful one to have, I think it's also vertically rectilinear but it's horizontally equisolid or some other type of fisheye.
Edited by jsmack - March 25, 2026 11:40:05
User Avatar
Staff
480 posts
Joined: Sept. 2016
Offline
pixelninja
Fair enough. Good to know it's coming though! Thanks

Is is also planned for XPU to support custom lens scripts in some fashion? Octane can do it with OSL for example.

Nothing to announce at this time.

jsmack
dlee
The builtin cylindrical lens implementation in karma CPU/XPU are... unconventional. It's going to be changed to be orthographic and match mantra behaviour in next major release, but for now, your only option is to use CPU and make a custom lens shader or modify the existing vex script (lens.h).

The current implementation should be kept and renamed though. What type of projection is it? Is it an X-Pan style swinging lens projection? {vertically rectilinear(perspective), horizontally equirectangular(longitudinal)}

Putting a sheet of paper in a coffee can pinhole camera is another type of cylindrical projection, but I think a bit different than the other two.

A Panini projection would be another useful one to have, I think it's also vertically rectilinear but it's horizontally equisolid or some other type of fisheye.

The new implementation will be the same as mantra's (which pretty much looks like https://www.sidefx.com/tutorials/lens-shaders-for-gamedev/ [www.sidefx.com] scroll down to "Cylindrical" section).
The current implementation is indeed vertically rectilinear and horizontally longitudinal, but the implementation is deeply flawed (vertical fov forced to 45 degrees, and produces nonsensical results if the image aspect ratio isn't square). We do not believe it's implementation worth keeping.
User Avatar
Member
8223 posts
Joined: Sept. 2011
Offline
dlee
The current implementation is indeed vertically rectilinear and horizontally longitudinal, but the implementation is deeply flawed (vertical fov forced to 45 degrees, and produces nonsensical results if the image aspect ratio isn't square). We do not believe it's implementation worth keeping.

is a 'fixed' version worth implementing as a new projection type? not sure what you would call it, "panoramic" maybe? Use vertical aperture/focal to set vertical fov, same as a rectilinear, then derive horizontal fov from aspect ratio? Not sure how a physical widelux type camera actually works.

Edit:
XPan cameras are just wide aspect traditional lens cameras. The panoramic camera I was thinking of is called a "WideLux"
Edited by jsmack - March 31, 2026 14:18:58
User Avatar
Member
82 posts
Joined: March 2017
Offline
I'm not a fan of tying FOV to aspect ratio. Unless you mean the aperture aspect ratio and not resolution aspect ratio.


I've had a fair few cases where it's been necessary or at least advantageous to render a specific horizontal or vertical FOV at a specific resolution/aspect.
User Avatar
Member
82 posts
Joined: March 2017
Offline
A spherical/polar lens that had the ability to independently set the horizontal and vertical FOV, as well as optionally set either of them to orthographic, while being able to render to any resolution or aspect ratio would be amazing.
That would cover most permutations of polar and cylindrical lenses in one go.
  • Quick Links