Skip to content

ISET3d V4

David Cardinal edited this page Oct 6, 2021 · 23 revisions

Operating systems

The installation on Linux and Macs is fairly similar. There are signifcant differences with Windows (see the inserted notes) throughout. At some point we will separate out the install instructions by OS type.

In particular, for Windows Users: A number of the Linux commands on this page require su permission, so if you get a permission error, try them with sudo. Similarly, some of the Windows commands that install software require elevated permissions. In that case you'll either need an elevated Command Prompt or if you are running within Visual Studio, you will need to run it as Administrator (which makes the terminal windows you launch admin-capable).

Here we go

To get ready for ISET3D-V4 you need three things.

  1. The Docker container, which you can get using: docker pull camerasimulation/pbrt-v4-cpu

Windows Users: You will need to install Docker with support for Linux containers that run using WSL (preferably WSL 2)

  1. You need to make a special version of assimp for your computer.

Binaries can be found at: https://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1-win-binaries.zip/download

If you place the tree in c:\program files (x86)\assimp, then the iset code will find them. If you place them somewhere else, you'll need to change the path in iset, at least for now.

For Mac/Linux or if you want to build the binaries on Windows: To build assimp from source you can clone the repo using:

git clone https://github.com/Zhenyi-Liu/assimp.git

To build the binaries: Change to the assimp directory and install using:

`mkdir build`
`cd build`
`cmake ..`
`make`
`make install`

Windows Users Windows does not come with a pre-installed set of build tools, so this can be a bit tricky. You'll need to download using something like Visual Studio Community Edition (Free) with C++ support. So far we have only built using the Linux cross-compiler, so the tool can be used from the Linux VM (where the Linux Docker container can find it). However, Windows support is definitely still a work in progress.

Note that even after installing Visual Studio cmake and make may not be in your path unless you launch a Terminal session from VS. On Linux 'make install' may require being launched with sudo.

  1. We need the proper version of OpenExr libraries. [NOTE: We are now using python bindings via OpenEXR. You'll need Python, the openexr package for python, and pyexr, which comes from the package OpenEXR. This is a work in progress, but avoids having to build the Matlab .mex binaries].

NOTE: As of the current (:latest) version of the docker container it should be possible not to have to do anything directly with OpenEXR, as the needed functionality should be in the docker container. So we think this step is not currently necessary.

To install this version of openexr on a Mac, you can

% Use this version openexr2.5.3:
%
% https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.3.zip
%
% To install, download and unzip and in a terminal run
%   mkdir build
%   cd build
%   cmake ../
%   make
%   make install
%
% Then go to ISET3d-v4/external/openexr and create the MEX file running
%
%   make
%
% This produces several mex files that we use for reading the rendered data
%
%  exrinfo.mexmaci64            exrreadchannels.mexmaci64
%  exrwritechannels.mexmaci64   exrread.mexmaci64
%  exrwrite.mexmaci64   

Windows Users: Since Matlab itself is running under Windows, you need to download and build OpenEXR for Windows -- using a Windows C+ toolchain like the version in Visual Studio Community (or Pro) Editions, or another one you download. In principle, the basic steps are the same as for Mac/Linux, but you may also need to install both ZLib and Boost that are not distributed by default. However, because this is seriously-fraught with peril, we have made the Matlab bindings for OpenEXR (which include the OpenEXR libraries) part of this repo (the .mexw64 files in external\openexr).

Clone this wiki locally