The camera crops objects when I zoom in

Hello,

I am using Nvidia Omniverse Isaac Sim on Ubuntu. Sometimes it is hard to visualize some parts of my scene since the default perspective camera crops the objects when I zoom in. I was wondering if it is possible to avoid that behavior.
test

Thank you in advance,

Juan

Hi! seems to be an issue with viewport clipping. I havenā€™t found a way to change the camera clipping but there is a chance that your model scale is too small. Check by making a cube, that 1 unit cube in most cases should be 1 meter.
Hope this helps!

Hi! Thank you for your comment. I am using one meter per unit. I added a sphere with a radius of one unit and looks like my model is on the right scale. When I increase the scale of my model by 10, the clipping problem is quite attenuated. But the robotā€™s behavior changes. I was wondering if it is possible to change the scale of the camera instead of changing the scale of all objects.

Thank you in advance.

please see if this doc on camera setting is helpful for you: Cameras ā€” Omniverse Create documentation

kindly,
Liila

Thank you for your reply. I mitigated the problem by scaling my model.

1 Like

Hello,

@juanjqo, by any chance, did you find a solution? @ltorabi Iā€™m trying to train a Deep RL model, and the cameras generated with code have the same problem besides the documentation did not point out how to change the clipping range. Do you have any suggestions?

kindly,
magokeanu

[update - 4/8]

The example code for stable baselines 3 uses a legacy version of the viewport. Ok, that works in execution, but the clipping range occurs. Viewing the frequently used python snippets, I noticed that the cameraā€™s examples use just viewport from Omni.kit, but when Iā€™m trying to execute it, an error pop-outs in the terminal:

viewport_interface = omni.kit.viewport.get_viewport_interface()

AttributeError: module ā€˜omni.kitā€™ has no attribute ā€˜viewportā€™

Omni.kit.viewport has functions to get the clipping range, so I guess it has others to set them, but I canā€™t find the file in the Isaac sim folder.

Hi @magokeanu. I did not find a solution. But I mitigated the problem using bigger models. My robot is now ten times bigger (I did so by changing the scale in all three axes, x, y, and z). Now, I am able to zoom in to look closer than before.

Thanks, @juanjqo , It is possible to change the clipping range through code with this code:

camera = self.stage.GetPrimAtPath(viewport_window.get_active_camera())

camera.GetAttribute(ā€œclippingRangeā€).Set( (0.01, 1000000) )

But testing different values nothing changes, I think I figure out the problem, the created camera has no clipping maps. When I ask for them the function returns an empty vector, maybe is possible to create one (or two) and set the attribute in a similar manner of clipping range. If I succeed Iā€™ll let you know here, this is a bad-ass update for Isaac Sim, the camera thing is a pity.

[update]
I solve it by creating one clipping plane with a numpy array and setting it to the ā€œclippingPlanesā€ of the camera:

camera = self.stage.GetPrimAtPath(viewport_window.get_active_camera())

camera.GetAttribute(ā€œclippingRangeā€).Set( (0.01, 1000000) )

camera.GetAttribute(ā€œclippingPlanesā€).Set( np.array([1.0, 0.0, 1.0, 1.0]) )

2 Likes

@magokeanu, Thank you for your updates. Iā€™m going to test your solution!

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