Trouble rendering objects in the center of the camera

Hi y’all

So here’s the situation, I’m flying a spaceship and the asteroid that are far away get rendered only on the border of the screen, as soon as I look at the they disappear and I need to get closser to them to make them apear again…

I don’t understand why it does that and how to fix it.

I would like to have a render distance equal all over me screen.

here’s two picture to help you understand.

thank all.

6082203--660084--screenRender.jpg 6082203--660087--cameraSetting.PNG

What is your culling mask set to? What layer are the objects in? Do you have multiple cameras in the scene? Are these worldspace objects or UI screen space objects?

the culling mask is set properly to render the layer the objects are in. I do have multiple camera but always just on active at any giving time. and they are worldspace objects.

like I said in the center they start rendering when I get closer it’s like the border of the camera have a grater distance for rendering… it’s weird.

How far away are these objects?

they spawn at random position so I can’t tell but the far clipping plane is set at 1000. but even if I set it at 1500 or 2000 it always does the same thing with the objet that are at the limit of the far plane.

oh and thanks for your time.

up

You can tell, just select one of them in the scene view and see where it is.

around 1150 unit away. and the far plan is set at 1000 so why does it render on the border then…

Because a camera’s viewing area is Frustum shaped: Viewing frustum - Wikipedia

Therefore technically the edges of the viewport are farther away from the camera than the center. It’s difference between the hypotenuse of a right-angle triangle and one of the other sides.

See like in this image when the camera is turned the edge of the frustum extends farther into the world than the center did:

6086673--660753--remrot.gif

wow ok! simple math and I didn’t even think about it!.. thanks mate! looks like I’ll have to leave it like that or script a way around it.

thanks you now at least I know what I’m looking for.

found a solution by using a second camera with a higher far clipping plain and using "camera.projection Matrix to render only the center of it and overlaping it with my first camera.

it should do the job, I let you know latter if it work or not.

and realy thank you caus know I know what is going on.

1 Like

oh and nice cat!

1 Like