Create viewport changes aperture o.Oo

Hey there,
how come that when I create a viewport, attach the camera, set the texture rendering (either LD 640x480 or 1920x1080) my vertical fov gets scaled in very strange ways???

This happens if I set the active camera before or after setting the textures.

Reproduced in Isaac2021.2.1, not sure if present on the newest one.

I ended up saving my apertures + rendering a couple of times + setting them back, but this is unexpected and very strange.
This is the snipped I use *already adapted for 2022

    viewport_name = "Viewport"
    viewport_handle = omni.kit.viewport_legacy.get_viewport_interface().get_instance(viewport_name)
    if not viewport_handle:
        viewport_handle = omni.kit.viewport_legacy.get_viewport_interface().create_instance()
        viewport_name = omni.kit.viewport_legacy.get_viewport_interface().get_viewport_window_name(viewport_handle)

    viewport_window = omni.kit.viewport_legacy.get_viewport_interface().get_viewport_window(viewport_handle)
    viewport_window.set_texture_resolution(resolution[0], resolution[1])
    if not is_headless:
        viewport_window.set_window_pos(1000, 400)
        viewport_window.set_window_size(300, 300)
    viewport_window = omni.kit.viewport_legacy.get_viewport_interface().get_viewport_window(viewport_handle)
    return viewport_window, viewport_name

There was a fix made for 2022.1.x where we force the aperture mode to conform to the viewport size

the setting is set in the apps/omni.isaac.sim.base.kit file

# ...
app.hydra.aperture.conform = 4 # Don't modify camera prim, stretch the image so it fits

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.