Questions tagged [camera]
The camera tag has no usage guidance.
4
votes
1answer
51 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 ...
1
vote
1answer
100 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 ...
0
votes
0answers
20 views
How to rotate camera in CAD package application
I can rotate camera to change the view for the first person. But as I am working
on a camera object for a cad package this isn't a first person or walk-through.
I am not sure how to rotate the camera ...
1
vote
1answer
133 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 ...
0
votes
1answer
63 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 ...
1
vote
0answers
61 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 ...
1
vote
1answer
52 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 ...
4
votes
1answer
104 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 ...
3
votes
1answer
277 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 ...
2
votes
1answer
39 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
112 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
193 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
76 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
105 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 ...
3
votes
1answer
436 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
336 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 ...
2
votes
0answers
59 views
Why does the camera not remain child of the other camera after adding it in osg?
I am writing an OpenSceneGraph based program that uses two cameras, one to render the preview for the user and one that uses a callback to make screenshots with MRT. The exporter camera is using an ...
6
votes
1answer
649 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
108 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
448 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 ...
2
votes
0answers
108 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
2k 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 ...