Camera

Started by
7 comments, last by maheshbinny 13 years, 6 months ago
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?
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]
There's no "hard", and "the impossible" takes just a little time.
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.
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)

There's no "hard", and "the impossible" takes just a little time.
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)
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.
You are both correct. I got confused. Been spending too long working on my own camera system. :P My apologies.
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...
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.

This topic is closed to new replies.

Advertisement