Why isn't the background node playing nice with the spherical camera?

Started by agent unawares, February 17, 2018, 05:14:42 AM

Previous topic - Next topic

agent unawares

I have a very simple scene. It has stars made from a power fractal hooked into a default shader in the background node.

When I point the camera straight up in the sky in Terragen, the stars render normally. Like this:

[attachimg=2]

When I render out a 360 image with the spherical camera, and point a camera straight up into the sky, it looks like this:

[attachimg=1]

Because for some reason the spherical camera is not rendering the background the same way as it is rendering the rest of the scene. The starfield doesn't get any spherical distortion.

The first thing I thought was "you know what, the background probably just scales itself to match the image size and the rest of the scene kind of gets rendered over it, so the type of camera doesn't affect it." Then I rendered a bunch of images pointing my camera all over, and the starfield was all different, fully realized everywhere as it should be. Somehow that doesn't carry over to the spherical camera.

So what gives? Is this fixable? This is weird.

agent unawares

Oh boy.

I tried this using a simple image as the background for kicks. This is it:

[attach=1]

And this is the result looking into the sky in Terragen (normal):

[attach=2]

And this is the result rendered through the spherical camera (also normal, you get back the original):

[attach=3]

So I guess a sub-question is: Why is this bizarre behavior only happening in some cases? Looks like only with procedural backgrounds and not images.

D.A. Bentley (SuddenPlanet)

Out of curiosity, why do you want to point your spherical camera up?  Normally when rendering Spherical, you only want to rotate your camera around the Y axis (leaving the Y value at 0 in other words).  If you tilt up or down you get distortion or wavy lines.

Although those results do look strange.  Not the typical wavy distortion I'm used to seeing...

agent unawares

I'm not pointing a spherical camera up. I'm pointing a normal camera up to show that the spherical camera is not capturing what is actually up there.

Matt

Are you projecting the texture with a spherical projection image map in Terragen, and then looking up to see what the image mapping looks like? Then this is the correct behavior. With a "latitude longitude" spherical projection, all the vertical grid lines converge at the poles of the sphere. A spherical projection simply isn't good at representing the top and bottom of the sphere. This isn't a mistake in Terragen, it's a limitation of this kind of projection.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

agent unawares

Matt, the image node is behaving 100% correctly as I noted. Only the procedural stars are not behaving correctly. The procedural starfield does not get properly distorted by the spherical camera, whereas an image background does. This is baffling to me.

Pointing a camera into the sky of Terragen with a procedural starfield does not even give neeeeeaaaaarly the same results as rendering the same starfield with a spherical camera, and pointing a camera up into the sky of the spherical render. Whereas pointing a camera into the sky of Terragen with an image background gives 100% exactly the same results as rendering the same image background with a spherical camera and pointing a camera up into the sky of the spherical render.

This is a bug.

agent unawares

Crappy example sketches: when I render a procedural starfield it should be giving me an image kinda like this, with the stars distorted at the poles so they project normally onto a sphere.

[attachimg=1]

Instead I get this, with all the stars completely even.

[attachimg=2]

I thought this was some projection error which is why I pointed the camera due north to see if the starfield just looked like crap up there to begin with. It didn't, only the spherical camera has a problem showing what "really exists" up there.

Matt

I think it's because the stars are too small, so they always render as random points in the render no matter what projection the render uses. What happens if you replace the starfield with a fractal that has large blobs?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

agent unawares

You're right, I tried with large blobs and that is what was happening. The stars are just so small that the spherical camera just renders exactly the same pattern all over. That's really frustrating but probably something I can work around anyway. Thanks.