RS Camera Distortion map - shearing images?
-
RS Camera Distortion
I have been trying to utilize the camera lens distortion feature in RS, but I can't seem to get the expected results.
Going from tutorials and the c4d/rs manual, I use the NEUTRAL UV bitmap setup (tried both flat bitmap, and node setups)...
However, the render comes back sheared, as opposed to NO distortion.
I've played around with different orientations and colors (gradients/solids, white, gray, black, yellow, olive, etc.) trying to wrap my brain around how to work with it, but still confused, as it seems broken if I cant get a neutral state.
End goal is to apply a spherize filter or similar to the neutral UV map to get fisheye and tilt-shift-like effects.
Project File ZIP for reference / testing / debugging / validation.
Many Thanks-
Egan -
Hi Egan,
The gradients must be linear, and from my point of view, in CIE XYZ, they are in "color space." This means really Raw, Gamma 1.0, and nothing else than 32bit/float per channel. Those colors are values, not image-based.
Your image shows a gamma-based gradient.
The easiest way is normally suggested: Standard render, a plane with many segments; the plane size is the PZ negative distance to the camera. The camera needs to be 36mm (while in full frame mode, 24x36) and on the same z-axis as the Plane (yes, it was for two decades on 36mm for that option. Sadly, someone set it to 35mm and have not been able to get it back for everyone. Render this as a floating point linear.
Have I had 100.00% success with it? Nope, but for experiments, that is the closest I get quickly. Render the Multi-Pass "UV" out. You might have to flip the result depending on how you placed the Plane.Two concerns:
A real fish eye has around 180º view angle; some have more, and some have less. But 180º means that the object to create the UV map (ST-Map, see NUKE Manual, The Foundry) would be tangential on the outline of the resulting circle, and with that not visible anymore, even with an orthogonal camera in Ciema 4D. This goes perhaps beyond what you need, but I wanted to point this out.The Tilt-Shift effect is not based on lens distortion; it is based on the tilt) rotating the Focal Plane (Scheimpflug Effect, see Wikipedia) and, with this, the tilt of the DOF plane. Not all lenses have a flat focal plane; see Lens Baby and Single Glass optics, for example.
The Shift effect would be achieved by distorting the UV image like a trapezoid, whereas keeping the camera parallel to the object (Facade) and using the Offset seems more the way to go.RedGiant has a very quick way to do it in the post (Lens Distortion Matcher). Still, if you are concerned about pixel quality, even the slightest pixel correction will blur the result if pixels are not moved on total pixel amounts. You can place the UV (St-Map) into After Effects, use raw values (Preserve RGB), and first go with the plug-in. Don't use any lens distortion to render a "clean file. Compare that in Ps (difference mode) if all settings are fine. Then, set up a fisheye and distort the UV map.
All the best
P.S.: zip files are not supported here, for security reasons.
-
Honestly, I'm not concerned about technically accurate fisheye, or tilt-shift.
Primarily I was after some controllable distortion and chromatic dispersion around the edges of the rendered image, similar to this image I generated using Cycles4D using dispersive glass geometry (but very noisy, so I moved to RS).
https://eganjones.com/images/3d/___EO_BASE_14a.pngI am concerned about quality of 4k rendered image.
I thought i set the gradients to 32-bit, linear. C4D file w/ nodes below.
I didn't tweak any Gamma settings. How do i make sure it's 1.0?Maps looks the same as the RS manual:
https://help.maxon.net/r3d/cinema/en-us/Content/html/Lens+Distortion.htmlFollowed this tutorial:
https://lesterbanks.com/2018/11/camera-distortion-shader-redshift-c4d/Should I even be messing with the RS camera distortion map?
Don't have plugins. Don't have money. Just C4D+RS.Sounds like a real PIA to generate a proper neutral distortion map, with finicky results.
Is there a repository or resource of pre-made maps?Example c4d file:
http://eganjones.com/c4d/rs_camera_distortion/test_camera_distortion_example_01.c4d -
Hi Future-Craft,
When you have Cinema 4D, you have Red Giant's Magic Bullet Looks. There are a few plug-ins avaialbe. I have "scanned" (Red Epic Dragon) over a hundred of my filters for the Optical Diffusion, and the Red Giant team has turned those into data for the optical Diffusion Filter, for example. Most of the RG magic Bullet Looks filter has gotten this practical care. For example, all the Film emulations are based on practical footage.
Here is an example:
CV4_2024_drs_24_RSmb_01.c4d
Perhaps too much was added for the demo, but you can drag each effect out or add more.
Here is an ST-Map maker file with distortion; set the render to save path for the UV-pass in the Multipass setting (Standard Render!)
CV4_2024_drs_24_REst_02.c4d
Then load this file into the RS Camera>Optical. You might need to widen the Field of view.I checked your file and did not touch an unknown download server. (Dropbox is preferred, but Google, Adobe, Apple, and Wetransfer can pass the security here. Sorry about that.
All the best