![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On a whim I spent just a little time poking around with Google to
investigate how difficult it would be to set up a virtual space with a
viewpoint that can be zoomed, dollyed, and panned. This could be in a
browser or in a separate viewer. At first blush it seems that panning
the camera or rotating an object is easy, also zoom, but dollying the
camera not so? Is this true? Does this function present a particlar
hurtle that panning and zooming doesn't? Google maps does it. Does the
difficulty increase linearly or exponentially?
-Jim
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jim Charter wrote:
> On a whim I spent just a little time poking around with Google to
> investigate how difficult it would be to set up a virtual space with a
> viewpoint that can be zoomed, dollyed, and panned. This could be in a
> browser or in a separate viewer. At first blush it seems that panning
> the camera or rotating an object is easy, also zoom, but dollying the
> camera not so? Is this true? Does this function present a particlar
> hurtle that panning and zooming doesn't? Google maps does it. Does the
> difficulty increase linearly or exponentially?
If you wanna look from side to side or turn around, you can just
manipulate a flat 2D image using 2D translations and rotations - just
make sure the edges line up to make a continuous visual. Zooming is a
similar story.
You want to *move* the camera position? Well then... *now* you must have
a *real* 3D environment. (After all, you need paralex and stuff. You can
fake that in 2D to some extent, but if arbitrary camera positions are
possible, there's really no way to avoid a full 3D environment.)
Obviously this is *significantly* more complicated to do.
Google Earth does it because it only draws a spherical planet. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 wrote:
> Jim Charter wrote:
>
>> On a whim I spent just a little time poking around with Google to
>> investigate how difficult it would be to set up a virtual space with a
>> viewpoint that can be zoomed, dollyed, and panned. This could be in a
>> browser or in a separate viewer. At first blush it seems that panning
>> the camera or rotating an object is easy, also zoom, but dollying the
>> camera not so? Is this true? Does this function present a particlar
>> hurtle that panning and zooming doesn't? Google maps does it. Does
>> the difficulty increase linearly or exponentially?
>
>
> If you wanna look from side to side or turn around, you can just
> manipulate a flat 2D image using 2D translations and rotations - just
> make sure the edges line up to make a continuous visual. Zooming is a
> similar story.
>
> You want to *move* the camera position? Well then... *now* you must have
> a *real* 3D environment. (After all, you need paralex and stuff. You can
> fake that in 2D to some extent, but if arbitrary camera positions are
> possible, there's really no way to avoid a full 3D environment.)
> Obviously this is *significantly* more complicated to do.
>
> Google Earth does it because it only draws a spherical planet. ;-)
>
Okay, perhaps, but my findings actually assumed 3d in all cases. For
instance there are applets around which will rotate an object and zoom
the camera. Also on various forums there are little opengl engines that
do same. But for a game engine or something that would do like a game
character walking through rooms,... that seems to be a much bigger deal.
Again, I apologise that I am only beginning to look into this.
The basic Google Maps gives an orthographic-like view with zoom and
unconstrained movement. The zoom also increases the resolution. Also
there is the 'street view' which is like the game thing where the 'car'
drives along a constrained path and the viewer in the car can see
panoramas at any point though the resolution is constant.
Google Earth is more like the camera in a modelling program with
uncontrained movement, pan and zoom, with the added bit where it quite
smoothly replaces low-res with high-res 'textures' as you zoom.
Roughly what I was dreaming of doing was to marry the type of drawn map
info in Google Maps with the camera freedom of Google Earth, but without
any of the sophisticated resolution adjustment in either presentation.
All I was really envisioning was to control the movement of a camera
around say a box with a diagram on it and maybe a coupla other boxes to
mark buildings. But rotating and zooming the object would be a little
underwhelming without being able to dolly the camera too. Because
dollying a character through a game scene seemed such a common thing to
do I was a little surprised at my initial findings.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Roughly what I was dreaming of doing was to marry the type of drawn map
> info in Google Maps with the camera freedom of Google Earth, but without
> any of the sophisticated resolution adjustment in either presentation. All
> I was really envisioning was to control the movement of a camera around
> say a box with a diagram on it and maybe a coupla other boxes to mark
> buildings. But rotating and zooming the object would be a little
> underwhelming without being able to dolly the camera too. Because
> dollying a character through a game scene seemed such a common thing to do
> I was a little surprised at my initial findings.
If you write something that uses a 3D API like OpenGL or DirectX, you
basically can set the camera in exactly the same way as you would in POV.
So in your code you just need to calculate the camera position and "look at"
vector, then pass that on to the API before drawing your scene.
Creating some code to take keyboard/mouse input and generate the camera
vectors is relatively straightforward if you're comfortable working with 3D
vectors and geometry. For example, you could use the arrow keys to move
left/right and forward/back relative to the camera look_at direction, and
the mouse x/y inputs to set the look_at vector.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
scott wrote:
>> Roughly what I was dreaming of doing was to marry the type of drawn
>> map info in Google Maps with the camera freedom of Google Earth, but
>> without any of the sophisticated resolution adjustment in either
>> presentation. All I was really envisioning was to control the movement
>> of a camera around say a box with a diagram on it and maybe a coupla
>> other boxes to mark buildings. But rotating and zooming the object
>> would be a little underwhelming without being able to dolly the camera
>> too. Because dollying a character through a game scene seemed such a
>> common thing to do I was a little surprised at my initial findings.
>
>
> If you write something that uses a 3D API like OpenGL or DirectX, you
> basically can set the camera in exactly the same way as you would in
> POV. So in your code you just need to calculate the camera position and
> "look at" vector, then pass that on to the API before drawing your scene.
>
> Creating some code to take keyboard/mouse input and generate the camera
> vectors is relatively straightforward if you're comfortable working with
> 3D vectors and geometry. For example, you could use the arrow keys to
> move left/right and forward/back relative to the camera look_at
> direction, and the mouse x/y inputs to set the look_at vector.
>
>
That's encouraging, thanks. I think I'm going to give it a shot.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jim Charter <jrc### [at] msn com> wrote:
> On a whim I spent just a little time poking around with Google to
> investigate how difficult it would be to set up a virtual space with a
> viewpoint that can be zoomed, dollyed, and panned. This could be in a
> browser or in a separate viewer. At first blush it seems that panning
> the camera or rotating an object is easy, also zoom, but dollying the
> camera not so? Is this true? Does this function present a particlar
> hurtle that panning and zooming doesn't? Google maps does it. Does the
> difficulty increase linearly or exponentially?
As a disclaimer, I could be totally out in left field here. Are you looking for
an 3D API? I'm not sure if it's headed in the right direction, but I use GLUT
for this type of thing. It's avery simple and completely cross-platform
wrapper for OpenGL so you don't have to worry about all the platform-dependent
details. The OpenGL tutorials at http://nehe.gamedev.net/ are more than enough
to get started. If you want something web-browser-oriented then I can't help
you, but the intended use here is for simple games and interactive simulations.
I've been looking at FLTK (http://www.fltk.org/) to add more of an interface
along with the OpenGL stuff, but that's not really off the ground yet.
Here's a couple examples:
http://rsreusser.googlepages.com/glutApp2.tar.gz
http://rsreusser.googlepages.com/nurbs3d.tar.gz
http://rsreusser.googlepages.com/fluid.tar.gz
The first just draws a rectangle where you can pan and zoom in two dimensions.
The second is the 3D equivalent, with a NURBS curve editor. With some simple
projection math, you can select points, zoom, pan, and rotate. And the last
one, just for fun, is a simple fluid simulation. Click and drag!
I'm not sure if this is what you have in mind, but it met my needs very well for
a similar task. You just define a location for the camera, as in POV-Ray, and
use mouse and keyboard functions to set up the interaction. It's not something
you'd program Google Earth in, but it's a good start for the rest of us.
Hope this could be of any use.
- Ricky
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> That's encouraging, thanks. I think I'm going to give it a shot.
Cool, whether you choose OpenGL or DirectX, there is a huge amount of
resource on the web to help get you started. I don't have any recent
experience with OpenGL, but DirectX has a lot of documentation included in
the download, with lots of tutorials and sample projects.
Both OpenGL and DirectX work with 4x4 matrices for everything, so in the end
your camera is represented by a 4x4 matrix. If you're good at maths you can
program these 16 values directly in your code (as I believe you can in POV
as well), but of course there are built-in functions for creating these
matrices automatically. The parameters they take are similar to the ones
you use in the POV camera block.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
triple_r wrote:
> Jim Charter <jrc### [at] msn com> wrote:
>
>>On a whim I spent just a little time poking around with Google to
>>investigate how difficult it would be to set up a virtual space with a
>>viewpoint that can be zoomed, dollyed, and panned. This could be in a
>>browser or in a separate viewer. At first blush it seems that panning
>>the camera or rotating an object is easy, also zoom, but dollying the
>>camera not so? Is this true? Does this function present a particlar
>>hurtle that panning and zooming doesn't? Google maps does it. Does the
>>difficulty increase linearly or exponentially?
>
>
>
> As a disclaimer, I could be totally out in left field here. Are you looking for
> an 3D API? I'm not sure if it's headed in the right direction, but I use GLUT
> for this type of thing. It's avery simple and completely cross-platform
> wrapper for OpenGL so you don't have to worry about all the platform-dependent
> details. The OpenGL tutorials at http://nehe.gamedev.net/ are more than enough
> to get started. If you want something web-browser-oriented then I can't help
> you, but the intended use here is for simple games and interactive simulations.
> I've been looking at FLTK (http://www.fltk.org/) to add more of an interface
> along with the OpenGL stuff, but that's not really off the ground yet.
>
> Here's a couple examples:
>
> http://rsreusser.googlepages.com/glutApp2.tar.gz
> http://rsreusser.googlepages.com/nurbs3d.tar.gz
> http://rsreusser.googlepages.com/fluid.tar.gz
>
> The first just draws a rectangle where you can pan and zoom in two dimensions.
> The second is the 3D equivalent, with a NURBS curve editor. With some simple
> projection math, you can select points, zoom, pan, and rotate. And the last
> one, just for fun, is a simple fluid simulation. Click and drag!
>
> I'm not sure if this is what you have in mind, but it met my needs very well for
> a similar task. You just define a location for the camera, as in POV-Ray, and
> use mouse and keyboard functions to set up the interaction. It's not something
> you'd program Google Earth in, but it's a good start for the rest of us.
>
> Hope this could be of any use.
>
> - Ricky
>
Yes thanks, there's good stuff there. To be honest I am not sure what
the direction is either. That is part of what I am trying to figure
out. My suspicion is that 'browser-oriented' is what I will need in the
end but in order to try and understand the larger context I am willing
to start anywhere.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jim Charter wrote:
> Yes thanks, there's good stuff there. To be honest I am not sure what
> the direction is either. That is part of what I am trying to figure
> out. My suspicion is that 'browser-oriented' is what I will need in the
> end but in order to try and understand the larger context I am willing
> to start anywhere.
If you decide to go with browser oriented, take a look at Papervision3D
and Away3D, http://www.papervision3d.org/ and http://away3d.com/
respectively. Both are Flash based, but not nearly as confusing as they
could possibly be.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jim Charter wrote:
> On a whim I spent just a little time poking around with Google to
> investigate how difficult it would be to set up a virtual space with a
> viewpoint that can be zoomed, dollyed, and panned. This could be in a
> browser or in a separate viewer. At first blush it seems that panning
> the camera or rotating an object is easy, also zoom, but dollying the
> camera not so? Is this true? Does this function present a particlar
> hurtle that panning and zooming doesn't? Google maps does it. Does the
> difficulty increase linearly or exponentially?
>
> -Jim
Sounds like a job for... VRML!!!
It's amazing the problems that were solved before 1995, and then
forgotten about :)
Actually, in looking at the Wikipedia page, it seems it's been
superseded by another format, X3D, which sounds like a cross between
VRML and XML (why is XML used for *everything* these days?).
http://en.wikipedia.org/wiki/VRML
http://en.wikipedia.org/wiki/X3D
...Chambers
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |