Camera Angles are Weird in Daz Studio

I have tried to match cameras between Daz Studio 4.12 and Terragen, in order to seamlessly integrate elements rendered in the two programs. To my surprise, in Daz, there seems to be a mismatch between camera rotation and vertical Field of View. I wonder if anyone else has encountered the same problem, and if there is a fix for it.

As you can see, I have rotated the camera 11 degrees on the X axis. The FoV is 20.9 degrees.

Half the FoV is 10.45 degrees. Since I have rotated the camera 11 degrees, the horizon ought to be outside the FoV, but it is not.

For comparison, I have also included a screenshot of an identical camera in Terragen, also rotated 11 degrees, and with a vertical FoV of 20.9 degrees. In Terragen, the horizon is outside the FoV, as expected.

It is worth noting that Daz uses a right hand cartesian coordinate system, and Terragen uses a left hand cartesian coordinate system. Both use a vertical Y axis. None of this ought to affect the camera rotation vs. FoV though.

If I am right, any attempt to match camera angles using FBX files would also be doomed, right?

Or, am I missing something?



 

 

Screenshot Coordinate Systems 02 Terragen angle is correct.jpg
1920 x 1080 - 218K
Coordinate Systems 01 Daz Angles not right.jpg
1920 x 1080 - 220K
Post edited by self_b7a95217d2 on

Comments

  • SimonJMSimonJM Posts: 5,970
    edited July 2020

    It may just be me, but I do not think the DS camera has that FoV you mention - it looks, by eye, to be wider than that.  To me, it looks to be around 25 degrees or so, which, with the values you quote, makes me think - is the DS angle measured from the centreline (so is actually double expected value?)

    Post edited by SimonJM on
  • SimonJM said:

    It may just be me, but I do not think the DS camera has that FoV you mention - it looks, by eye, to be wider than that.  To me, it looks to be around 25 degrees or so, which, with the values you quote, makes me think - is the DS angle measured from the centreline (so is actually double expected value?)

    Yes, that is exactly the problem I wrote about. The FoV is way wider than it ought to be given the input parameters for the camera. I use the default 65mm 36x24 camera in Daz. The FoV equation is

    ANGLE OF VIEW = 2 ARCTAN( SENSOR WIDTH / (2 X FOCAL LENGTH))

    Thus, for both the Daz and the Terragen cameras, we get:

    Vertical Angle of View = 2*arctan(24 / (2 x 65)) = 20.91 degrees.

    I have checked the focal length. It is 65 mm. I have also checked the aspect ratio. It is 3:2, and the sensor width, which is 36mm.

    I also measured the Daz camera FoV on the screen with a protractor, and it is 30 degrees, not 20.9. That means that what is a 65mm lens according to the Daz parameters, is actually a 45mm lens.

    I am working on a fairly complex scene, with eight cameras, one of which is spherical. The cameras use 3 different focal lengths. I need to match all eight cameras in Daz with corresponding cameras in Terragen. I have some elements in Terragen that will go in front of elements rendered in Daz, and some that will go behind. To match lighting, I'll render 360 panoramas in Terragen and use as HDRIs in Daz.

    It may be possible to match the cameras up using FoV rather than focal length, but that can introduce perspective problems. It was my intent to semi-automate the matching process using FBX files, but that is unlikely to work if Daz messes up the FoV. I'll give it a try anyway, just to make sure.

    If this is a bug in Daz, it is quite serious. I am still hoping I am wrong.

  • SimonJMSimonJM Posts: 5,970

    I am not saying I would not trust DS camera settings, but, as an exmplae, their DoF settings are not even trying to be close to 'real life'.  I'd report it, and also, maybe, request the algortithm currently in use so you can use that to try and match stuff up.

  • FishtalesFishtales Posts: 6,104

    I've had a look and your equation.

    "ANGLE OF VIEW = 2 ARCTAN( SENSOR WIDTH / (2 X FOCAL LENGTH))

    Vertical Angle of View = 2*arctan(24 / (2 x 65)) = 20.91 degrees

    I have checked the focal length. It is 65 mm. I have also checked the aspect ratio. It is 3:2, and the sensor width, which is 36mm."

    Change the sensor width of 36 in Studio to 24.

  • fastbike1fastbike1 Posts: 4,077

    @Fishtales "Change the sensor width of 36 in Studio to 24."

    Sure you don't mean change the 24 to 36?

    @self_b7a95217d2

    FYI, the Studio camera is not meant to exactly replicate a real world camera. The FOV for a given focal length is good enough, but the effects of shutter speed and aperture will not exactly calculate the correct exposure. They will mimic the effects on the scene but won't match.

     

  • FishtalesFishtales Posts: 6,104
    fastbike1 said:

    @Fishtales "Change the sensor width of 36 in Studio to 24."

    Sure you don't mean change the 24 to 36?

    @self_b7a95217d2

    FYI, the Studio camera is not meant to exactly replicate a real world camera. The FOV for a given focal length is good enough, but the effects of shutter speed and aperture will not exactly calculate the correct exposure. They will mimic the effects on the scene but won't match.

     

    If you look at his equation it uses a Width of 24mm where the Width in Studio is 36mm so to match the equation the 36mm in Studio needs to be changed to 24.

  • Fishtales said:

     

    Change the sensor width of 36 in Studio to 24.

    That would make the FoVs in Daz and Terragen match up, but all the camera positions in Daz would be wrong. For one thing, the feet of some characters would be cropped so they do not show.

    Since I have created and positioned the Daz cameras, but not the Terragen cameras, it is easier to keep the Daz cameras as they are, and then create Terragen cameras with the same FoV as the Daz cameras. The focal distances will be a bit different, but since the FoVs are the same, that might not matter.

  • self_b7a95217d2self_b7a95217d2 Posts: 12
    edited July 2020
    Fishtales said:
    fastbike1 said:

    @Fishtales "Change the sensor width of 36 in Studio to 24."

    Sure you don't mean change the 24 to 36?

    @self_b7a95217d2

    FYI, the Studio camera is not meant to exactly replicate a real world camera. The FOV for a given focal length is good enough, but the effects of shutter speed and aperture will not exactly calculate the correct exposure. They will mimic the effects on the scene but won't match.

     

    If you look at his equation it uses a Width of 24mm where the Width in Studio is 36mm so to match the equation the 36mm in Studio needs to be changed to 24.

    No, it uses the height of 24mm to calculate the vertical FoV. I need to match both horizontal and vertical FoV, but I calculate the vertical, because that is where the problem showed up.

    I copied and pasted the equation. That is why it says sensor width, but the equation is the same for both horizontal and vertical FoV.

    If I match vertical FoV, horizontal FoV ought to match up, since I have set the aspect ratios to 3:2 for both the Daz and the Terragen camera.

    Post edited by self_b7a95217d2 on
  • I experimented a bit with FBX files. Looks like I can export camera position and rotation from Daz correctly. Daz messes up both focal length and FoV during export, but I can fix that manually after importing into Terragen.

  • FishtalesFishtales Posts: 6,104

    I tried setting the Studio camera to 15º and it seemed to match your image.

  • Fishtales said:

    I tried setting the Studio camera to 15º and it seemed to match your image.

    Changing the rotation around the X-axis will make the lower edges of the FoVs line up, but not the upper edges, or the sides. That means the Daz and Terragen pictures would still not line up.
    Also, I do not want to move the lower edge, because that will cut the feet off my characters. It is important to keep both horizontal and vertical FoVs exactly as they are.

    On the other hand, I think exporting the cameras as FBX, and then manually fixing the FoV solved it. I did a LoRes background render using camera 1 in Terragen, then used it as a backdrop In Daz when doing a preview with camera 1 there.

    The pictures seem to line up.

    Next steps are checking all the cameras in Terragen, finishing up the landscape, and then render a 360 panorama that I'll use to light the scenes in Daz. After that, it is pretty straightforward.

    Thank you all, for the help!

Sign In or Register to comment.