-
Notifications
You must be signed in to change notification settings - Fork 7
Camera position
- tls_Camera.mlx
- t_cameraPosition
Reading in a lens, adjusting the focal length, pointing the camera, and moving the camera are basic manipulations that are illustrated in these tutorial scripts.
Each camera has a position ('from') and looks at a position ('to'). Further, there is a direction that points up ('up'). These three parameters are stored in the lookAt slot of the recipe.
To adjust the position of the camera or the direction that it is looking towards, we vary the lookAt variable. This type of code can be used to create a stereo pair.
%% Make an image with a camera positioned adjacent to the original
% This is the original
lookAt = thisR.get('lookAt');
% We reset the camera position using the 'from' variable
thisR.set('from',lookAt.from + [1 0 0]);
t_cameraMotion. The camera can be assigned a translation or rotation during the simulated 'exposure' opening. This script shows how to set up the camera translation and rotation parameters.
The three ISETCam camera motion scenes, without the labels, that will appear in the sceneWindow are:
You can adjust the camera position. This code fragment illustrates how to generate a stereo pair.
thisR = piRecipeDefault('scene name','SimpleScene');
% Low resolution rendering poarameters
thisR.set('film resolution',[200 150]);
thisR.set('rays per pixel',64);
thisR.set('fov',45);
thisR.set('nbounces',5);
% Let's put in a camera lens
lensname = 'dgauss.22deg.12.5mm.json';
c = piCameraCreate('omni','lens file',lensname);
thisR.set('camera',c);
thisR.set('fov',35);
%% Look at the blue stick figure
blueStick = thisR.get('asset','figure_3m_B','world position');
to = thisR.set('to',blueStick);
oi = piWRS(thisR);
oiWindow(oi);
oiSet(oi,'render flag','hdr');
% Move the camera to the left
thisR = piCameraTranslate(thisR, 'xshift',0.2,'fromto','both');
oi = piWRS(thisR);
oiWindow(oi);
ISET3d development is led by Brian Wandell's Vistalab group at Stanford University and supported by contributors from other research institutions and industry.
- Introduction
- Installation
- Workflow
- Camera
- Assets
- Materials Overview
- Textures
- Lights
- Rendering
- Scene data
- Programming overview
- [General Notes on moving to v4]
- Dockerized pbrt-v4 on the GPU