Questions tagged [camera]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
63 views

Convert between screen and world coordinates in isometric 3D

I'm working on a a simple 3D scene in WebGL. The purpose is to: Implement an isometric viewing angle in orthographic 3D Translate between XY screen coordinates and XY world coordinates Codepen: ...
Candleout's user avatar
  • 127
-1 votes
1 answer
26 views

How to implement camera translation arround object using gluLookAt?

I'm trying to move my camera around the object, a house, using some keyboard keys and the gluLookAt() function. ...
MasterTJ123's user avatar
1 vote
1 answer
69 views

What is the name for a film overlay where there is an array of crosses?

I've seen this in a lot of animations of spaceships, as well as the intro sequence to The Expanse which I've attached a screenshot of. https://vimeo.com/734114243 is also an example. The above ...
xyz's user avatar
  • 33
0 votes
1 answer
43 views

Position a 3D camera directly above or below the target

I'm trying to setup a 3D camera in WebGL. The camera is setup with the help of a lookAt function. The lookAt function takes cameraTarget, ...
Candleout's user avatar
  • 127
1 vote
1 answer
86 views

Move the camera in orthographic 3D

I'm trying to figure out how to move a camera in orthographic 3D. The scene is orthographic in the sense that an object looks the same regardless of position. The only thing that may affect the size ...
Candleout's user avatar
  • 127
0 votes
0 answers
75 views

How to setup a 3D camera

I'm trying to figure out how to setup a 3D camera in WebGL. This is my first swing at 3D so a lot of the matrix stuff is new to me. Code The code can be reviewed in this CodePen: https://codepen.io/...
Candleout's user avatar
  • 127
1 vote
1 answer
64 views

Unknown array of floating point numbers. View matrix?

I want to control the camera in an old game using head tracking (TrackIR, opentrack, etc.), such control was not provided by the game engine. I'm trying to find the camera coordinates and rotation ...
F4rrell's user avatar
  • 13
1 vote
0 answers
40 views

how to fix this strange effect when editing image?

G'day, I have this strange effect when editing my image. It seems to happen a lot on photos with the sky in it, but in the CR2 file it doesn't show, only when i open it in the software i am using does ...
38Airborne's user avatar
1 vote
0 answers
62 views

Mapping a box to an inverse frustum

I have a non AA, non cubic, box living happily in 3D. I have a frustum defined by 2 squares. one square is the square defined by [-1, 1]^2 and the other square can have any size, there is also a ...
Makogan's user avatar
  • 1,696
0 votes
0 answers
81 views

Trouble getting a raytracer camera representation for different aspect ratios

I am trying to make my camera representation work for images whose aspect ratio isn't 1 (640x480, 1920x1080...), but I am having some trouble getting it to work. The camera model is pretty simple, as ...
Lightsong's user avatar
  • 101
0 votes
1 answer
91 views

OpenGL - How to increase view space coordinate range in X and Y axis

I'm trying to render some objects but apparently X and Y coordinates need to be really small in-order to get something on screen. See this example of 2 lines The world space coordinates for these ...
gallickgunner's user avatar
2 votes
0 answers
129 views

Finding Camera projection matrix from known input and output

Lets say I have a rectangle with known coordinates in 3D scene, and I'm projecting it using pin point camera to the plane (screen). You can imagine it deforms on the screen per camera transformation ...
Eduard Kovalets's user avatar
1 vote
0 answers
185 views

Understanding camera of a CPU raytracer from "Ray tracer challenge"

I am following a book "Ray tracer challenge" by Buck, but it doesn't explain anything. The code works, but I don't properly understand, why. The code is as follows: ...
Ave Milia's user avatar
  • 121
0 votes
0 answers
71 views

Using Perspective Rendering To Render A 3D Point

I am wondering how I can use perspective rendering to render a point onto a screen. An image showing perspective rendering: Say I have a 3d point (with x, y, and z coordinates), a point for the ...
Brendan R.'s user avatar
0 votes
0 answers
160 views

How to get world coordinates from a 4X4 camera matrix

I have Intel T265 camera which has a camera coordinates system like following diagram: The camera system has two cameras and the center of the two cameras is the position of the camera system. The ...
Nick X Tsui's user avatar
0 votes
1 answer
48 views

How to ensure that a randomly-generated velocity vector moves the camera forward within a valid arc?

I spawn a camera in a scene using random coordinates for x and y and setting z=0 and orient ...
Amir's user avatar
  • 241
0 votes
1 answer
123 views

How compute new camera parameters given a velocity vector?

My goal is to update camera parameters given a velocity vector so that the camera points in the direction of the velocity vector. How should one compute the update matrix for the camera parameters?
Amir's user avatar
  • 241
0 votes
0 answers
155 views

Ray casting and rasterization 101

Recently I've became an intern in company-name and my internship task is(for now) create rasterization using rays. I'm mostly interested in pure math, so basic ...
Paul Snopov's user avatar
1 vote
1 answer
221 views

How to use trackball for rotating an camera matrix in eye frame

I have a QOpenGLWidget where I use camera transformation matrix(4,4), FOV and vectors Position(4), Up(4), Forward(4). I also have an ArcBall which I can use. I managed to implement zoom and pan by ...
nocturne's user avatar
  • 111
0 votes
1 answer
2k views

Given two 3d vectors, find the rotation matrix between the two

So I am making a raytracer following the very helpful online book of Gabriel Gambetta but I stumble on the rotation matrix part. My linear algebra background is 3Blue1Brown video series "The ...
cassepipe's user avatar
  • 103
0 votes
1 answer
110 views

Magic number meaning in smallpt's camera ray calculation

In smallpt's source at line 90 the direction is multiplied by 140 and I was wondering where that number is coming from. I was hoping for it to be explained in the ...
Alexandru Ica's user avatar
1 vote
1 answer
53 views

Does angular diameter to FoV ratio equal object's image to total image ratio?

If we have an object at certain distance D in front of a camera. The object has a horizontal diameter d, giving us an angular diameter theta (2*arctan(d/2D)) of 50 degrees (converted from radians). ...
Physician's user avatar
  • 115
0 votes
4 answers
144 views

Does an object spanning percentage of the Camera's FoV correlate with the object's image percentage?

I am working on a virtual camera inside a game engine, which provides me with an FoV control, but no Focal length control (and no filming sensor dimensions short of aspect ratio), and I am less than a ...
Physician's user avatar
  • 115
4 votes
0 answers
152 views

Project grid on 2d plane based on camera perspective

Unsure if this is the right network to post this, but maybe someone can help... I'm working on a personal project where, with the help of AI, I want to automatically estimate the perspective of a ...
Chris's user avatar
  • 41
1 vote
0 answers
44 views

What's the name of the transformation that can remove horizontal convergence from a picture?

Say that you are taking pictures from a street like this one: As you can see, the picture is taken perpendicular to the direction of the street. The problem is that cars at the left look as if they ...
Lay González's user avatar
0 votes
1 answer
108 views

Sensor size of Sony HDR-HC7e

I want to motion track a shot from my Sony HDR-HC7e camcorder and I am not quite sure about the horizontal sensor size(width). I set the focal length to minimum and the recording to HDV 16:9 This ...
Phönix 64's user avatar
2 votes
1 answer
110 views

Calculate the position and rotation needed to have a camera look at a certain region

I have a 2D region defined by 4 points in 3D space. I want to position my camera so that it looks at the region, with a settable variable determining which side it looks at, where looks at means that ...
GenRincewind's user avatar
4 votes
1 answer
2k views

How to keep an object constant in screen space?

If you open the modern Blender UI and select for example scaling, and then you use the scroll wheel to "zoom" (move the camera along the radial axis). You will notice that the size of the 3D widget ...
Makogan's user avatar
  • 1,696
0 votes
1 answer
143 views

Apply Projective Transformation 2D Rectangle

I want to write code from scratch about Projective Transformation in order to apply this transformation to 2d rectangular. I searched about this transformation, but I could not figure out completely. ...
user avatar
1 vote
0 answers
83 views

How to Pan Zoom a spherical camera?

I asked this in regular SO but I think people are not understanding the question so i will try here: So, for anyone familiar with Google Maps, when you zoom, it does it around the cursor. That is to ...
Makogan's user avatar
  • 1,696
0 votes
1 answer
896 views

Perspective Raytracing

Given the up and focal vector of the perspective camera, the position of the camera and the vertical and horizontal opening angle of the FOV. How can I calculate a ray for given screen space ...
Yamahari's user avatar
  • 115
0 votes
1 answer
121 views

How can I reproduce the MatchMoving/MotionTracking technique from Just Dance?

I'm a software engineer student with a big projet idea but low graphic knowledge. My goal is to compare two people dancing. One person would be the teacher with perfect moves and the other would be a ...
Nicolas K.'s user avatar
2 votes
1 answer
638 views

Difference between a spherical camera and a trackball camera

A spherical camera is pretty easy to define. We have an anchor point C the camera always looks at and a relative position P where the camera is, which can be expressed in spherical coordinates, ...
Makogan's user avatar
  • 1,696
2 votes
1 answer
293 views

Camera Implementation without Limitations

I've developed a simple (Third-Person) Perspective Camera with Orbit controls. However, my implementation doesn't handle the case where if the pitch goes over 90º it flips upside down. From what I've ...
Daniel Marques's user avatar
0 votes
1 answer
709 views

Can pixels on the image plane be mapped to world space coordinates?

I'm trying to learn the fundamentals of 3d computer graphics by writing a toy framework in WebGL. I'm currently working on mouse based camera controls. There are plenty of good resources in the ACM ...
oorst's user avatar
  • 103
4 votes
1 answer
769 views

Camera Model View transformation in Ray Tracing

I am implementing my own simple ray tracing and I came across some sort of confusion. When defining the verticies in the world I multiply them by the modelView transformation system (the matrix ...
Abdullah Emad's user avatar
4 votes
1 answer
253 views

Modify camera matrix so that it renders a "chunk" of the frustum

Given a perspective projection matrix. How can one from it derive a set of matrices representing "chunks" of the viewport? So that the rendered chunks can be "stiched" to form an image "chunk times ...
Facundo's user avatar
  • 41
0 votes
1 answer
653 views

Translate an arcball camera upwards or left-right

This problem is giving me a really hard time. I'm always looking at the origin and have a camera that moves around it in an arcball mode. That part works beautifully: I'm calculating the camera ...
Marcel Hansemann's user avatar
7 votes
1 answer
650 views

How to match Blenders polynomial lens distortion model with GLSL?

I'm trying to re-implement Blenders (libmv) polynomial lens distortion model using shadertoy, in order to apply the lens distortion in another application ideally by generating a STMap for that. I ...
brockmann's user avatar
0 votes
1 answer
3k views

Understanding of Camera Up Vector

Assume eye position e, gaze direction g, view-up vector t, right-handed base. As the graphs shows: $w=-\frac{g}{||g||}$ $u=\frac{t\times w}{||t\times w||}$ $v=w\times u$ I am really confused ...
AlexWei's user avatar
  • 237
1 vote
0 answers
129 views

Compute emitted importance of a pinhole camera

In section 16.1.1 of Physically Based Rendering the authors describe how we can check, if a given ray $r$ corresponds to one starting from the film area. They implement this check such that it works ...
0xbadf00d's user avatar
  • 193
1 vote
1 answer
80 views

Equation for camera projection

I am trying to find an equation for a camera projection. The goal is to map the point $P(P_x, P_y, P_z)$ from the world coordinates onto the window coordinates $Q(Q_x, Q_y)$. The eye of viewing is ...
raindrop's user avatar
  • 113
4 votes
1 answer
305 views

Deriving blur from real optical formulae

Looking at the Wikipedia page for Circle of Confusion, and at such posts as this one, I completely understand how to calculate the values for near, far, focal planes and hyperfocal distance. I am also ...
SgerbwdGwyn's user avatar
4 votes
1 answer
731 views

Computing a lookAt matrix by passing a vec3 to a camera object

I am following this tutorial on how to implement a first person camera. So far I was able to implement the entire (C++) class in TypeScript and it works as it is supposed to. Problem What I was not ...
チーズパン's user avatar
2 votes
1 answer
53 views

Correctness or otherwise of the procedure for generating an orbiting camera in WebGl

I have to create a orbiting camera. I created the model of sun (a sphere) around (0,0,0) , triangulated and Phong shaded it. I would have a camera that goes around the sun thus an orbiting camera and ...
Nick's user avatar
  • 321
0 votes
1 answer
983 views

How to rotate a camera?

So I am doing a simple FPS camera with openGL. I store the camera as 4 vector, a position vector, a lookAt vector, an up vector and a right vector. When the user presses a key, I create a rotation ...
Manh Nguyen Huu's user avatar
3 votes
1 answer
555 views

Creating depth map from a 2-D image?

My question is oriented towards the generation of depth map using any of the state of the art depth sensor. However, each of these method required the presence of an 3-D object in front of the sensor....
Virange's user avatar
  • 131
-3 votes
2 answers
104 views

How does cell phone display image or video even before you start to capture?

When a cell phone is used to take a photo or capture video the display continuously displays what a camera can see, does that mean the ccd/cmos device is exposed to light continuously? or is it ...
Charan K's user avatar
2 votes
1 answer
496 views

How to calculate camera distance so that after projective transformation a quad is filling the whole screen

First of all, I'm using OpenGL and GLM. Now, I have a square perpendicular to the z-axis and centered around it. Let's say that it has Z-value (offset along the Z-axis) X. Now, I want to set up a ...
thefunkyjunky's user avatar
3 votes
1 answer
2k views

Please, help me to understand why my raytracing camera rotates in wrong directions?

I'm trying to build a raytracer and I use this article on how to build camera system. The problem is that when, after calculating ray direction in camera space, I multiply it by camera-to-world ...
Roadmap's user avatar
  • 31