Camera Field Of View

1,593 views
Skip to first unread message

Tiziano Fiorenzani

unread,
Jan 9, 2008, 6:57:13 AM1/9/08
to KML Developer Support - Advanced Support for KML
Hello everybody. My question is how can I change the camera field of
view? I need to make zooming without changing the camera position. Is
there some kml or API way?

Thanks

Jonathan van Tuijl

unread,
Jan 9, 2008, 9:47:48 AM1/9/08
to KML Developer Support - Advanced Support for KML
There isn't a good way. The only way you can even touch the FOV is
with a PhotoOverlay. I happened to upload an image showing the idea a
while ago:
http://kml-support.googlegroups.com/web/Google%20Earth%20Telescope.png

Jonathan

Tiziano Fiorenzani

unread,
Jan 9, 2008, 11:11:16 AM1/9/08
to KML Developer Support - Advanced Support for KML

Thanks for the reply. My question must be read in this sense: I'm
trying to interface my external flight simulator software with Google
Earth. My purpose is to simulate the on board camera motion. To do so
I've created a kml file with is linked to another kml file which
contains a <Camera> tag and is updated by the simulator software. The
result is good at 10Hz. My questions are:

1) I cannot control the camera field of view: is there any way to
perform a zoom without changing the camera position?

2) Is this way (updating a kml file) good or is there any other
better?

Jonathan van Tuijl

unread,
Jan 10, 2008, 12:13:32 AM1/10/08
to KML Developer Support - Advanced Support for KML
Tiziano Fiorenzani wrote:
> Thanks for the reply. My question must be read in this sense: I'm
> trying to interface my external flight simulator software with Google
> Earth. My purpose is to simulate the on board camera motion. To do so
> I've created a kml file with is linked to another kml file which
> contains a <Camera> tag and is updated by the simulator software. The
> result is good at 10Hz. My questions are:
>
> 1) I cannot control the camera field of view: is there any way to
> perform a zoom without changing the camera position?

That IS the FOV, so other than approximating with a PhotoOverlay, or
always keeping the sim at GE's normal FOV (60 deg horizontally), no.

> 2) Is this way (updating a kml file) good or is there any other
> better?

You might not like that it's constantly using the disk but otherwise
it's fine. Alternatives: web server, or perhaps a named pipe on Unix-
like systems. You can also create a named pipe or socket and write the
data to it, and have a script on a web server read it and send KML.

Jonathan

Tiziano Fiorenzani

unread,
Jan 10, 2008, 3:35:49 AM1/10/08
to KML Developer Support - Advanced Support for KML
So, if I understood well, There is no way to control the focal length
of the virtual camera in Google Earth. Because I have not only to
simulate the air vehicle but also the on-board camera, which CAN
change its own focal length.

Is it right? Thanks

Jonathan van Tuijl

unread,
Jan 11, 2008, 8:29:57 AM1/11/08
to KML Developer Support - Advanced Support for KML
As I said you can use a PhotoOverlay. It doesn't have to obscure the
view, because it can be made transparent. You can set the camera's
position and orientation with Camera or LookAt, and the FOV with the
elements in ViewVolume. You probably need to decrease the FOV slightly
because at the default zoom GE leaves a small border, but that's easy.
I just don't know how it will hold up under animation, like when the
PhotoOverlay is <Updated> while it's being viewed.

Jonathan

Jonathan van Tuijl

unread,
Jan 22, 2008, 5:38:28 PM1/22/08
to KML Developer Support - Advanced Support for KML
I wrote:
> You probably need to decrease the FOV slightly
> because at the default zoom GE leaves a small border, but that's easy.

Actually, if you leave the visible border intact by not making the
PhotoOverlay completely transparent (using a transparent PNG image so
you can still look through it), that border shows the exact FOV of
whatever you're trying to replicate quite nicely.

> I just don't know how it will hold up under animation, like when the
> PhotoOverlay is <Updated> while it's being viewed.

I tried it myself recently and while the <Update> worked, I had to 're-
enter' the PhotoOverlay to see changes. Sorry, I'm out of ideas now.
At most someone might find an obscure workaround.

I'll put it on the feature requests page (by the looks of it it will
be #105):
http://groups.google.com/group/kml-support/web/kml-feature-requests

Add any comments there if you like.

Jonathan
Reply all
Reply to author
Forward
0 new messages