Jump to content
  • Advertisement
Sign in to follow this  
maheshbinny

Camera

This topic is 2974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've one question regarding to camera projection

consider my object position is at (0,0,0)

my camera position (0,50,0)

Look at (0,0,0)

up vector (0,1,0)

in this case object can be visible in output?

Share this post


Link to post
Share on other sites
Advertisement
Seems you can see the object.

But...
If your object's dimensions are bigger than 50.f, that means your camera is inside the object and maybe it can't be seen :D

It also depends on the projection matrix.

[Edited by - programci_84 on October 21, 2010 6:50:27 AM]

Share this post


Link to post
Share on other sites
I hesitate to agree.

The Look vector is not defined. It should have a magnitude of 1, atm it has a magnitude of zero.

If you were to change the Look vector to (0, -1, 0) and the Up vector to (0, 0, 1), then what progamci_84 wrote would apply.

Share this post


Link to post
Share on other sites
Quote:
Original post by forsandifs
The Look vector is not defined. It should have a magnitude of 1, atm it has a magnitude of zero.

There's no need to define look vector here, because it equals to Normalize (targetPos - cameraPos).

targetPos = (0, 0, 0), cameraPos = (0, 50, 0)

Share this post


Link to post
Share on other sites
Quote:
Original post by maheshbinny
in this case object can be visible in output?
That depends on the values of:
1. The near clip plane
2. The far clip plane
3. The camera FOV
4. The object size (As programci_84 said)

Share this post


Link to post
Share on other sites
Quote:
Original post by forsandifs
I hesitate to agree.

The Look vector is not defined. It should have a magnitude of 1, atm it has a magnitude of zero.
A 'look' vector and a 'look at' vector (or point) are not the same thing.

A 'look at' vector of (0, 0, 0) is perfectly valid.

Share this post


Link to post
Share on other sites
Quote:

my camera position (0,50,0)

LookAt(0,0,0)
Up Vector(0,1,0)


Your up vector is y, and your camera forward vector is -y(<0,0,0> - <0,50,0>, Not sure if that's the issue, but as they are colinear, they might be fudging the view matrix...

Share this post


Link to post
Share on other sites
Thanks everyone for ur replies

Actually the object is visible only if I say up vector is positve/negative z. I don't know i'm really messed up with camera projections. Can someone can tell where i can get best tutorial regarding to camera projections.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!