Planetside Software Forums

General => Terragen Discussion => Topic started by: gregtee on January 10, 2013, 03:30:02 AM

Title: Camera Projection Problem
Post by: gregtee on January 10, 2013, 03:30:02 AM
I have a satellite cloud image I'd like to project from a camera back down on planet to render some clouds from an orbital view.  The problem I'm having is all the warping that's being caused by the camera not being completely square on the planet.  There always seems to be a little warping and stretching of the projection.  I would assume that if there's a way to target the camera to the center of the planet so it's always facing "down" that a lot of these problems would go away.

Is this possible?  I can't seem to find a way to do this.

The other issue is that I'm at a loss of what FOV I should use for the camera itself.  50?  Whatever looks right?  It all seems a bit arbitrary. 

Any suggestions would be helpful. 

Thanks!

Title: Re: Camera Projection Problem
Post by: Oshyan on January 10, 2013, 03:40:58 AM
What is the source of your cloud mask/shape? What "projection" is the image itself in? Is it based on an aerial photo, or is it satellite data? I think the first thing you want to decide is whether to actually use Through Camera Projection, as you seem to be attempting, or if Spherical or even planar (PlanY) mapping would be more appropriate. Perhaps you could post a small example of the image you're working with for cloud masking?

- Oshyan
Title: Re: Camera Projection Problem
Post by: gregtee on January 10, 2013, 03:52:41 AM
It's a satellite image of some clouds.  They're very high res, around 7k x9k.  I don't want to use planar Y since I need to be able to move the image around to different parts of the planet so planar axis mapping won't work when you're too far off the axis.  Camera projection seemed the best approach but then I can't seem to be able to perfectly align the camera to point straight down at the planet from any arbitrary position I have the camera placed far above the planet.

Is there a way to force the projection camera to always point down, or at the planet's center?
Title: Re: Camera Projection Problem
Post by: Oshyan on January 10, 2013, 04:20:57 AM
Hmm, there's no explicit function for keeping the camera's view perpendicular to the ground, so to speak. But you ought to be able to use the "look at" feature to accomplish your goal, at least in terms of alignment (there's no guarantee that this will fix your distortion issues though - I suspect you may simply be aiming for too large a feature, which will inevitably have distortion as the planet curves). In the 3D preview, the icon that is a little eye, second from right on the bottom toolbar, is the "look at point" function. What I would do is create a new Sphere object and place it in the same location as the Planet, which puts the sphere inside the planet, right at its center. Leave it enabled and visible in the 3D preview, then when you want to choose the Look At Point, you'll have a reference for where the center of the planet is and you can just click on it. That's about as accurate as I think you can get, unless I'm missing some other obvious method.

- Oshyan
Title: Re: Camera Projection Problem
Post by: Kevin F on January 10, 2013, 07:20:21 AM
Can't you just create a new camera and set it's to rotation  -90,0,0 and then to whatever height you want?
or am I missing something?
Title: Re: Camera Projection Problem
Post by: cyphyr on January 10, 2013, 09:04:55 AM
Or you could place a camera at the centre of the planet (xyz: 0, -6.378e+006, 0) and project your cloud mask "outwards". This should avoid any "stretching" at the edges since all points will be the same distance from the camera. This is obviously for "through camera" projection only.

Richard
Title: Re: Camera Projection Problem
Post by: gregtee on January 10, 2013, 09:44:10 AM
Thanks everyone.  Some good ideas here.  I'll give them a sot.

Greg