Fog with Orthographic Camera?

I’m trying to get fog to appear using an orthographic camera but it never seems to render. I know the fog settings are right because I can run the scene and toggle the Orthographic check box on the camera, and when it switches to non-orthographic it displays the fog.

Is this possible with the most recent version of Unity (2.6.1)?

Orthographic cameras don’t do projection and therefor don’t have much use for fog.

Remember fog is not some volumetric effect or alike, its “overdrawing distant objects” only and with orthographic and the lack of projection you don’t have a visual difference between close and distant object (you only have “in front” and “behind”), making fog pretty confusing to really useless.

Mind if I ask what you wanted to achieve with it to offer other solutions?

1 Like

Well since it is orthographic and you don’t get a sense of foreshortening when you move objects closer or further from the camera, I was thinking one way of simulating a depth effect would be to apply the fog. Unfortunately we’re unable to use a projection camera due to the way we’ll be stitching together several displays across several computers.

Hi and welcome to the forum.

Couldn’t you use a plane with a semi-transparent material applied instead of relying on built-in fog?

I could, but then wouldn’t I have to make several of them to create an increasing fog effect, with the more planes meaning smoother transition between opacity… I would also have to make sure they’re always billboarded to the camera as well, and at this point the position and/or movement of the camera is uncertain for this project.

Am I to understand that officially there is no support for the built in fog renderer for orthographic cameras? I just need to be sure, because gauging by old forum posts it wasn’t always that way.

A quick test suggests that fog does work for ortho cameras. It’s likely there is some other problem, but it is hard to guess what it might be. Is there any other information about the scene that might be relevant?

If there is, I really can’t think of what it might be. It’s an incredibly simple scene, with one rigidbody sphere, 3 rigidbody boxes, and the soldier from the character animation example.

Do I need to compensate camera or fog settings to accommodate for a lack of projection?

You may need to experiment with the fog density to get the right effect, but it should work.

You’re right. Because of the small size of my scene, I had to max out the fog density and adjust the far clip plane of the camera to barely extend beyond my objects. Now the fog is apparent.