Setting 'Top-Down' Camera Perspective Problem
3 posters
Setting 'Top-Down' Camera Perspective Problem
I'm trying to use a simple 'top-down' camera perspective to view my small scene, which is small enough to fit on the screen at once, so I want to be directly centered over the scene.
The Problem I try to set the camera in blender to a 'Top-Down' perspective, that is, viewing the scene from directly above (camera Rot x = 0.0, y= 0.0 z = 180.0), the scene will render as extremely far away, even if my camera is very close to the scene in blender. It also displays some strange perspective behaviour as things move closer and further away on the scene.
I think this must have something to do with the perspective settings in blender or something, because i've noticed that if i move the camera to that it is not quite directly above the scene, ie. facing slightly upwards (camera Rot x=10.0, y=0.0, z=180.0), then the behaviour is nowhere near as bad. It's only as you approach being directly above the scene that the behaviour occurs.
I'm sure someone must have coma across something like this before, while attempting to use a top-down camera perspective? Can anyone shed some light on this for me?
The Problem I try to set the camera in blender to a 'Top-Down' perspective, that is, viewing the scene from directly above (camera Rot x = 0.0, y= 0.0 z = 180.0), the scene will render as extremely far away, even if my camera is very close to the scene in blender. It also displays some strange perspective behaviour as things move closer and further away on the scene.
I think this must have something to do with the perspective settings in blender or something, because i've noticed that if i move the camera to that it is not quite directly above the scene, ie. facing slightly upwards (camera Rot x=10.0, y=0.0, z=180.0), then the behaviour is nowhere near as bad. It's only as you approach being directly above the scene that the behaviour occurs.
I'm sure someone must have coma across something like this before, while attempting to use a top-down camera perspective? Can anyone shed some light on this for me?
monkeys- Posts : 8
Join date : 2009-07-22
Re: Setting 'Top-Down' Camera Perspective Problem
sio2interactive wrote:Just use sio2LookAt, its the same as gluLookAt
How would I go about implementing sio2LookAt? I've found this code on another part of the site:
- Code:
void sio2LookAt( vec3 *_e,
vec3 *_c,
vec3 *_u )
{
float m[ 16 ];
vec3 f,
s,
u;
sio2Vec3Diff( _c, _e, &f );
sio2Normalize( &f, &f );
sio2CrossProduct( &f, _u, &s );
sio2Normalize( &s, &s );
sio2CrossProduct( &s, &f, &u );
memset( &m[ 0 ], 0, 64 );
m[ 0 ] = s.x;
m[ 4 ] = s.y;
m[ 8 ] = s.z;
m[ 1 ] = u.x;
m[ 5 ] = u.y;
m[ 9 ] = u.z;
m[ 2 ] = -f.x;
m[ 6 ] = -f.y;
m[ 10 ] = -f.z;
glMultMatrixf( &m[ 0 ] );
glTranslatef( -_e->x, -_e->y, -_e->z );
}
But I'm not sure where to integrate it into my current application?
monkeys- Posts : 8
Join date : 2009-07-22
Re: Setting 'Top-Down' Camera Perspective Problem
hello, i want to do the same thing, but i cannot figure out how to use sio2lookat.
does somebody have a sample code?
does somebody have a sample code?
skaterazn- Posts : 12
Join date : 2009-07-03
Re: Setting 'Top-Down' Camera Perspective Problem
sio2LookAt( vec3 <pos in worldspace>, vec3 <target in worldspace>, vec3 <normalized up vector> );
Similar topics
» Setting up The Tutorials .blend Files
» Setting Camera Physics in Blender
» problem with camera look down?
» Setting up a new project...
» Setting a timer callback within a class
» Setting Camera Physics in Blender
» problem with camera look down?
» Setting up a new project...
» Setting a timer callback within a class
Permissions in this forum:
You cannot reply to topics in this forum