Author Topic: Why isn't the background node playing nice with the spherical camera?  (Read 492 times)

Offline agent unawares

  • Member
  • *
  • Posts: 50
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:



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



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.

Offline agent unawares

  • Member
  • *
  • Posts: 50
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #1 on: February 17, 2018, 09:32:51 AM »
Oh boy.

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

79390-0

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

79392-1

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

79394-2

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.
« Last Edit: February 17, 2018, 09:36:06 AM by agent unawares »

Offline D.A. Bentley

  • Member
  • *
  • Posts: 150
    • D.A. Bentley
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #2 on: February 22, 2018, 11:21:30 PM »
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...
« Last Edit: February 22, 2018, 11:24:31 PM by D.A. Bentley »

Offline agent unawares

  • Member
  • *
  • Posts: 50
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #3 on: February 24, 2018, 09:28:36 PM »
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.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 2937
  • I'm the crazy one
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #4 on: March 07, 2018, 09:44:20 PM »
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.

Offline agent unawares

  • Member
  • *
  • Posts: 50
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #5 on: March 29, 2018, 05:32:33 PM »
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.
« Last Edit: March 29, 2018, 05:36:44 PM by agent unawares »

Offline agent unawares

  • Member
  • *
  • Posts: 50
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #6 on: March 29, 2018, 05:45:25 PM »
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.



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



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.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 2937
  • I'm the crazy one
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #7 on: March 30, 2018, 01:35:54 AM »
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.

Offline agent unawares

  • Member
  • *
  • Posts: 50
Re: Why isn't the background node playing nice with the spherical camera?
« Reply #8 on: March 30, 2018, 06:42:43 PM »
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.