Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

4
votes
1answer
95 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 ...
2
votes
1answer
86 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 ...
0
votes
0answers
15 views

Move a camera (orbiting camera) togheter with the Earth around the Sun

I modeled, Phong shaded and animated 2 spheres in a simple way to approximate in a naif way the solar system (with Earth and Sun alone). There is the Sun at the center and the Earth that goes around ...
2
votes
1answer
38 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 ...
1
vote
1answer
75 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 ...
4
votes
1answer
82 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....
-2
votes
2answers
74 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 ...
3
votes
1answer
77 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 ...
2
votes
1answer
256 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 ...
3
votes
2answers
188 views

How to get camera Right vector when Front vector and WorldUp vector are collinear

Get the title problem when implementing a walkthrough camera. I use normlize(cross(WorldUp, Front)) to get Right vector. And when they are collinear, I get a zero vector. Is there any more robust ...
5
votes
1answer
419 views

Render with camera perspective off-center

So ordinarily we have this But I'm after this! Is it possible to do this? Ideally by changing the projection matrix? The reasoning is kinda interesting - I am developing for mobile VR, and I have ...
4
votes
0answers
68 views

Calculate Camera parameters and HandEyeCalibration

I'm trying to calculate camera paramters and a hand eye calibration (Transformation from camera to eye (display) coordinates) for rendering on a see-through HMD. I have already calculated a ...
1
vote
1answer
222 views

Understanding camera() settings in Processing

I have trouble understanding the way a camera is set in Processing (according to the reference this shoudn't be very different from OpenGl). For starters, when I set the eye position of the camera I ...
1
vote
0answers
68 views

With OpenGL, is it correct to apply model transformation to rotate the camera?

Having taken a basic CG course, I remember that transformations are relative, so rotating the camera is identical to rotating the view in the opposite direction. Right now I want to implement camera ...
7
votes
1answer
1k views

Depth of Field in Path Tracing: What do I do with the secondary ray?

How can I implement Depth of Field in my Path Tracer? I have read this article which explains the theory behind everything & I already have a good understanding of what this effect needs to ...