LWJGL
May 25, 2013, 01:39:26 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Camera zoom?  (Read 1936 times)
dangerdoc
Regular nerd
**
Posts: 71


Thats right... Nikola Tesla


« on: April 04, 2012, 18:14:26 »

How do you zoom the camera in?
Logged

“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
Longarmx
Newbie
*
Posts: 1


« Reply #1 on: April 05, 2012, 10:35:02 »

Are you talking about 3D or 2D? Could you provide us with a little more information? Huh
Logged
dangerdoc
Regular nerd
**
Posts: 71


Thats right... Nikola Tesla


« Reply #2 on: April 05, 2012, 11:02:30 »

I am sorry, I forgot that there is even a 2-D when I posted.... I meant 3-d. I just want to zoom a 3-d camera in. Thanks, and sorry for not giving more info.
Logged

“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
CodeBunny
Nerdus Imperius
*****
Posts: 561



WWW
« Reply #3 on: April 05, 2012, 11:35:29 »

Highly dependent on your rendering system.

How do you manage the camera?
Logged
Fool Running
Nerdus Imperius
*****
Posts: 742


« Reply #4 on: April 11, 2012, 05:35:45 »

There are multiple ways you could do this. You could actually move the camera forward to "look" like it's zooming in. However, I assume you want a more realistic way. I think you could accomplish this by changing your frustrum to be smaller on the far-z axis (i.e. shaped more like a 2D frustrum). That would counter-act the usual further-objects-get-smaller effect to make it zoom in.
Logged

Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option Grin
dangerdoc
Regular nerd
**
Posts: 71


Thats right... Nikola Tesla


« Reply #5 on: April 13, 2012, 06:29:07 »

Hello,
Thank you for replying, I have learned a lot on this forum thanks to the friendly replies! Now, I don't know about frustrum, but I found this on google. So, your saying to change the farplane so that it is basically thicker? I do not know much about frustrum. If I was right about changing the farplane in my understanding, then how do you change the z-axis? In reply to codebunny, I don't quite know yet, but I think that I will be using this. Thanks for your replies!
Logged

“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
Fool Running
Nerdus Imperius
*****
Posts: 742


« Reply #6 on: April 16, 2012, 05:51:23 »

Now, I don't know about frustrum, but I found this on google. So, your saying to change the farplane so that it is basically thicker? I do not know much about frustrum. If I was right about changing the farplane in my understanding, then how do you change the z-axis?
Sorry, I meant change the further away frustrum plane (i.e. the far plane in the image) so that it is smaller. If you are using GLU.gluPerspective(), I think you can just change the fovy (field of view) parameter to make it smaller.
Logged

Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option Grin
dangerdoc
Regular nerd
**
Posts: 71


Thats right... Nikola Tesla


« Reply #7 on: April 17, 2012, 14:54:58 »

Thank you for your help. I have learned what I wanted, and will be experimenting on it!!! I went to google, found which parameters for glu.gluperspective were which and that fixed it for me!!! Thank you also codebunny!
Logged

“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
dangerdoc
Regular nerd
**
Posts: 71


Thats right... Nikola Tesla


« Reply #8 on: June 19, 2012, 15:31:28 »

Does GLU.gluPerspective work with GL11 rendering? In my game I am using GL11 for the camera and the rendering. If it is not compatible, what is the GL11 way to zoom in 3-d?
Logged

“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
matheus23
Regular nerd
**
Posts: 62


« Reply #9 on: June 20, 2012, 10:32:18 »

Does GLU.gluPerspective work with GL11 rendering? In my game I am using GL11 for the camera and the rendering. If it is not compatible, what is the GL11 way to zoom in 3-d?
It is Smiley
Logged

My github account and currently active project: https://github.com/matheus23/UniverseEngine
dangerdoc
Regular nerd
**
Posts: 71


Thats right... Nikola Tesla


« Reply #10 on: June 22, 2012, 08:09:49 »

Does GLU.gluPerspective work with GL11 rendering? In my game I am using GL11 for the camera and the rendering. If it is not compatible, what is the GL11 way to zoom in 3-d?
It is Smiley
Thanks!!!  Smiley
Logged

“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!