A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Rendering issue/Camera Shader
Posted: 24 August 2018 01:22 PM   [ Ignore ]  
Total Posts:  434
Joined  2012-01-05

Hello

I’m having some strange issue with a render, see the attached scene…I’m not sure if it is related to the camera shader.  But somehow what I see in the viewport has nothing to do with what I get in the render…

What is going on here?
https://www.dropbox.com/s/vdsk3jjg8nrmorh/Monolith_Portal_21.c4d?dl=0


Thanks!

Profile
 
 
Posted: 24 August 2018 01:57 PM   [ Ignore ]   [ # 1 ]  
Total Posts:  434
Joined  2012-01-05

Hmm, I think I identified the problem : camera clipping.  I needed to clip the camera to 1 cm.
However now I’m seeing that my camera shader is not really replicating what the actual camera is seeing.  It seems to be slightly offset?

Profile
 
 
Posted: 24 August 2018 02:55 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

HI Alex,

If you render out the Camera 1 and use it in the material (Color) for the Object that is in the view of Camera 2, then set the Texture Tag to Camera Mapping. Press the Calculate button, and remove the image (rendered and applied) from the Color channel: Now it should be very close.

What happens in your scene? The camera 1 is the source for the Camera Shader. This Shader is applied to object “Default.1”. The Camera is set but the texture tag was set to UV[W], whereby the set up doesn’t cover the whole image produced by the camera shader. (It is easy to see in the UV Editor). With the Camera Projection setting, this problem is eliminated.

The Camera is set to focal length 36mm and sensor size 36mm (which is the default). Which means, that any object width that is perpendicular to the camera will have the same need in distance to be horizontally covered, i.e., fit in the horizontal field of view. This is always true if the two numbers are the same. So a sensor with 40mm width needs a 40mm lens to achieve that.

In your scene the object is 3cm wide, which would require a 3cm distance to the camera. The camera is at P.Z. -3.134cm, and the points that creates the surface are P.Z. -0.3cm. So, the object needs to be set to P.Z. +0.166cm (it was zero before.
Then we need to have the camera shader cover the front of that object, which can be done in the UV editor for example. While that front part UV is selected, UV Commands> Fit UV to Canvas. But the object hight is not fitting. But that is now an easy match mathematically, based on the render settings. But scale and move the object not a few points, otherwise the UV will distort the result.

Anyway (you can ignore the explanation set in a gray font): Set up the camera mapping and delete the UV tag (copy the object before and set it to invisibility, back up). While the object and the texture tag is selected, go to Object Manager>Tags>Generate UVW Coordinates. This sets the UV mesh to the camera projection.

Another difference shows up, while the Anti Alias settings are on Geometry, that works for camera.1 but camera 2. has to work with an image.

Scene file
https://www.amazon.com/clouddrive/share/k9b4AfQSsoACLbD9en11VAGbIMGpwf9Ovhn7JXRnbYE

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 24 August 2018 04:11 PM   [ Ignore ]   [ # 3 ]  
Total Posts:  434
Joined  2012-01-05

Ha, that all makes sense…I tried changing the horizontal scale in the camera shader, but I guess I needed to change the projection method as well…
Thank you!!

Profile
 
 
Posted: 24 August 2018 05:03 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Alex, thanks for taking time to reply.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile