Questions tagged [camera]

49 questions
7
votes
1 answer

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 think I'm close, but when passing the same values…
6
votes
1 answer

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 achieve based on previous experience with a DSLR but I am a…
Arjan Singh
  • 2,463
  • 3
  • 20
  • 37
4
votes
1 answer

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 similar to the one generated by glm::lookAt function)…
4
votes
1 answer

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 higher" resolution than the viewport. Here's an…
Facundo
  • 41
  • 2
4
votes
1 answer

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 aware of the Zeiss formula for my desired…
4
votes
1 answer

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 able to implement is a system which takes the…
チーズパン
  • 27
  • 2
  • 14
4
votes
1 answer

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 found that putting my phone (and surely many…
Hamish Todd
  • 143
  • 4
4
votes
0 answers

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 given image. I've been able to programatically…
Chris
  • 41
  • 3
3
votes
1 answer

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 remains constant in screen space (it becomes bigger…
Makogan
  • 1,584
  • 8
  • 27
3
votes
1 answer

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. Is it possible the generate a depth map even if…
Virange
  • 131
  • 2
3
votes
1 answer

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 transformation matrix and my camera seems to rotate in…
Roadmap
  • 31
  • 2
3
votes
0 answers

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 Projection matrix P (using SPAAM) which transforms points…
2
votes
1 answer

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 the camera view covers the entire region to be…
2
votes
1 answer

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, centered around the point C. In this type of camera the…
Makogan
  • 1,584
  • 8
  • 27
2
votes
1 answer

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 learned, the reason behind it has to do with…
1
2 3 4