Render specific region

Is there a way to render only specific region of the scene.

I want to speed up my render process and I’m only interested in with a certain area. How can I solve this problem? thanks in advance

You could perhaps alter your camera’s properties (its “film size” or aspect ratio)–but that would also affect how the rendering filled the window, and may thus result in stretching of the image if the window’s aspect-ratio doesn’t match that of the rendering.

Otherwise, you could perhaps apply a shader to your scene that only renders within the specified region.

And there may be other approaches, but this is not a field that I’m familiar with, I fear!

while its efficiency may depend on where your camera tends to be, you could use the occlusion culling system to speed up rendering a bit.

Use the lens settings (see the Lens class in the API reference) to limit the field of view. You can use the film_size properties or specify a FOV window with a view vector if you prefer. Or calculate your own projection matrix and put it in a MatrixLens.

To constrain which part of the window on screen Panda renders to, grab the display region on that is responsible for rendering the 3D scene, and use setDimensions(l, r, b, t) where the parameters range from 0…1.