31/10/2021
More and more I have to deliver different versions from the project. One for television one for web, social media, and so on. Many times the aspect ratio and the resolution varies quite much. That’s why I created this simple but useful asset to help me to see how one render looks in different aspect ratios.
Note that the aspect ratio guide should be placed under the camera object.
Some calculations in Pythonish pseudocode:
doc = c4d.documents.GetActiveDocument() temp_height = distance_from_camera * math.tan((camera_fov_ver * 0.5)) * 2.0 temp_width = distance_from_camera * math.tan((camera_fov_hor * 0.5)) * 2.0 guide_position_x = temp_width * film_offset_x guide_position_y = temp_height * film_offset_y * -1 old_aspect_ratio = resolution_width / resolution_height # Calculate aspect ratio if old_aspect_ratio > new_aspect_ratio: # If old aspect ratio is bigger than new aspect ratio guide_width = temp_height * new_aspect_ratio guide_height = temp_height elif old_aspect_ratio < new_aspect_ratio: # If old aspect ratio is smaller than new aspect ratio guide_width = temp_width guide_height = temp_height / new_ar else: # If old and new aspect ratios are same guide_width = temp_height guide_height = temp_width
Supports:
- Perspective Projection
- Focal Length changes
- Sensor Size changes
- Film offset changes
- Render resolution changes
- Position Z changes
Updated 31/08/2023
> Resolution result bug fix
Included in AR_Scripts!
ar_aspect_ratio_guide.c4d v1.1.1 (2023.1.2)