Closed benjaminralex closed 3 years ago
Hi Alex,
Sorry for this. We are in the midst of a large set of edits, and this will cause some pain for a while. We hope to be clean in master and dev about two weeks from now.
For now, please checkout out the ‘dev’ branch of the repository. The script runs in that branch. It will use a different PBRT file (Numbers at depth), but I don’t think that will matter for you.
Let me know if you have any trouble after checking out ‘dev’ and running the script again.
Brian
From: Alex Benjamin @.> Date: Thursday, May 13, 2021 at 7:56 PM To: ISET/iset3d @.> Cc: Subscribed @.***> Subject: [ISET/iset3d] Error when rendering scene with optics (#44)
Hello,
I am currently running the t_rayTracingIntroduction.m script. When I run the following block:
`% Now tell PBRT to use the lens theScene.set('use optics',true);
% % Focus on the numbers at 200 mm theScene.set('accommodation',1/0.2); % Diopters
% The lens rendering benefits from adding a few more rays per pixel theScene.set('rays per pixel',128);
% Summarizing is always nice theScene.summary;
% Render and show. We use 'oi' to refer to optical image, the spectral % irradiance at the retina (also retinal irradiance). oi = theScene.render; oiWindow(oi);`
I get the following error during execution:
checkerboard.pbrt:16:33: Error: unexpected escaped character "i" terminate called without an active exception
The pbrt file is as follows:
`# PBRT file created with piWrite on 2021/5/13 22:51:33.49
PBRT version = 3
LookAt 0.000000 0.000000 10.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
camera
Camera "realisticEye" "string lensfile" "lens/navarro.dat" "float retinaDistance" [16.320000] "float retinaRadius" [12.000000] "float retinaSemiDiam" [4.357983] "float pupilDiameter" [4.000000] "float focusdistance" [0.100000] "bool mmUnits" "false" "bool chromaticAberrationEnabled" "false" "spectrum ior1" "lens\ior1.spd" "spectrum ior2" "lens\ior2.spd" "spectrum ior3" "lens\ior3.spd" "spectrum ior4" "lens\ior4.spd" "bool noweighting" "true"
sampler
Sampler "stratified" "bool jitter" "false" "integer xsamples" [1] "integer ysamples" [1]
film
Film "image" "integer xresolution" [320] "integer yresolution" [320] "float diagonal" [10.000000] "string datatype" "depth"
filter
PixelFilter "box" "float xwidth" [0.500000] "float ywidth" [0.500000]
integrator
Integrator "metadata" "string strategy" "depth"
WorldBegin
Include "checkerboard_depth_materials.pbrt" Include "checkerboard_depth_geometry.pbrt"
Include "checkerboard_depth_lights.pbrt" WorldEnd `
Any help would be appreciated. Thank you!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWIRO2P5TIHBSJYOEA3TNSGMVANCNFSM443UHHPA.
The problems may be worse than I thought. The script runs, but it doesn’t seem right (to me).
I am headed out of town for a couple of days, back a week from tomorrow. I will get it running correctly when I return. Unless someone else gets to it before me.
Sorry again, Brian
From: Brian A Wandell @.> Date: Thursday, May 13, 2021 at 9:49 PM To: ISET/iset3d @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44) Hi Alex,
Sorry for this. We are in the midst of a large set of edits, and this will cause some pain for a while. We hope to be clean in master and dev about two weeks from now.
For now, please checkout out the ‘dev’ branch of the repository. The script runs in that branch. It will use a different PBRT file (Numbers at depth), but I don’t think that will matter for you.
Let me know if you have any trouble after checking out ‘dev’ and running the script again.
Brian
From: Alex Benjamin @.> Date: Thursday, May 13, 2021 at 7:56 PM To: ISET/iset3d @.> Cc: Subscribed @.***> Subject: [ISET/iset3d] Error when rendering scene with optics (#44)
Hello,
I am currently running the t_rayTracingIntroduction.m script. When I run the following block:
`% Now tell PBRT to use the lens theScene.set('use optics',true);
% % Focus on the numbers at 200 mm theScene.set('accommodation',1/0.2); % Diopters
% The lens rendering benefits from adding a few more rays per pixel theScene.set('rays per pixel',128);
% Summarizing is always nice theScene.summary;
% Render and show. We use 'oi' to refer to optical image, the spectral % irradiance at the retina (also retinal irradiance). oi = theScene.render; oiWindow(oi);`
I get the following error during execution:
checkerboard.pbrt:16:33: Error: unexpected escaped character "i" terminate called without an active exception
The pbrt file is as follows:
`# PBRT file created with piWrite on 2021/5/13 22:51:33.49
PBRT version = 3
LookAt 0.000000 0.000000 10.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
camera
Camera "realisticEye" "string lensfile" "lens/navarro.dat" "float retinaDistance" [16.320000] "float retinaRadius" [12.000000] "float retinaSemiDiam" [4.357983] "float pupilDiameter" [4.000000] "float focusdistance" [0.100000] "bool mmUnits" "false" "bool chromaticAberrationEnabled" "false" "spectrum ior1" "lens\ior1.spd" "spectrum ior2" "lens\ior2.spd" "spectrum ior3" "lens\ior3.spd" "spectrum ior4" "lens\ior4.spd" "bool noweighting" "true"
sampler
Sampler "stratified" "bool jitter" "false" "integer xsamples" [1] "integer ysamples" [1]
film
Film "image" "integer xresolution" [320] "integer yresolution" [320] "float diagonal" [10.000000] "string datatype" "depth"
filter
PixelFilter "box" "float xwidth" [0.500000] "float ywidth" [0.500000]
integrator
Integrator "metadata" "string strategy" "depth"
WorldBegin
Include "checkerboard_depth_materials.pbrt" Include "checkerboard_depth_geometry.pbrt"
Include "checkerboard_depth_lights.pbrt" WorldEnd `
Any help would be appreciated. Thank you!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWIRO2P5TIHBSJYOEA3TNSGMVANCNFSM443UHHPA.
Hi Brian,
Thank you for the quick reply. I did pull the dev branch and have the same error when optically rendering the scene. It produces this error:
pbrt version 3 (built Jul 20 2019 at 00:27:47) [Detected 16 cores] Copyright (c)1998-2018 Matt Pharr, Greg Humphreys, and Wenzel Jakob. The source code to pbrt (but *not* the book contents) is covered by the BSD License. See the file LICENSE.txt for the conditions of the license. numbersAtDepth_depth.pbrt:8:97: Error: unexpected escaped character "U" terminate called without an active exception
Looking forward to the updates/fixes and the clean master branch. BTW, this seems like an exceptional tool. Thank you to you and your team for making it open source!
Best,
Alex
Hi All,
I just tried this on my system, on the dev branch. Ran just fine for me with a fresh pull of iset3d, isetbio and the various other dependencies. I am running 2021a on a Mac. I doubt it is a Matlab version issue unless you are using a very hold version. But it has a little bit the feel of a Mac/Windows/Linux issue, where some aspect of a text file has an OS incompatibility. So, what OS and what version of Matlab are you using?
Best,
David
Hi David,
I am running 2020a on Windows 10. I have a fresh pull of iset3d and isetbio and the dependencies. Has this been tested on a Windows machine?
Thanks a lot!
Alex
It has. Dave Cardinal (now copied) might have learned something special about running on Windows. He does this all the time, but perhaps there was a tweak that is not on the wiki page?
Brian
From: Alex Benjamin @.> Date: Friday, May 14, 2021 at 11:47 AM To: ISET/iset3d @.> Cc: Brian A Wandell @.>, Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Hi David,
I am running 2020a on Windows 10. I have a fresh pull of iset3d and isetbio and the dependencies. Has this been tested on a Windows machine?
Thanks a lot!
Alex
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-841433915, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWPADQOG7PRCAVVLQVDTNVV5VANCNFSM443UHHPA.
Thank you. I really appreciate the help. Any chance the error might have something to do with the pbrt v3 compilation? Or any other dependencies? I could double check those on my end as well.
Please check that you have the latest version of the container. I think that is described on the wiki page.
Brian Wandell Stein Family Chair Stanford University Http://www.stanford.edu/~wandell
From: Alex Benjamin @.> Sent: Friday, May 14, 2021 12:12:36 PM To: ISET/iset3d @.> Cc: Brian A Wandell @.>; Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Thank you. I really appreciate the help. Any chance the error might have something to do with the pbrt v3 compilation? Or any other dependencies? I could double check those on my end as well.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-841448342, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWMTUFYHBDNRIAK745DTNVY2JANCNFSM443UHHPA.
A quick update. I did ensure that I have the latest prtbv3-spectral docker and is running. When I run the following lines in the t_rayTracingIntroduction.m
theScene.set('use pinhole',true); theScene.set('fov',33); scene = theScene.render; sceneWindow(scene);
it displays the following docker command:
docker run -ti --rm -w /NumbersAtDepth -v /iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth.dat numbersAtDepth.pbrt
and renders the scene successfully! (thank you for all the help).
However, when I run the following lines:
theScene.set('use optics',true); theScene.set('accommodation',1/0.2); oi = theScene.render; oiWindow(oi);
it displays the following docker command:
docker run -ti --rm -w /NumbersAtDepth -v /iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth_depth.dat numbersAtDepth_depth.pbrt
but fails to render unfortunately. The error is still:
numbersAtDepth_depth.pbrt:16:33: Error: unexpected escaped character "i" terminate called without an active exception
Traveling, but will attempt to reproduce when I can
On May 14, 2021, 2:10 PM, at 2:10 PM, Brian A Wandell @.***> wrote:
It has. Dave Cardinal (now copied) might have learned something special about running on Windows. He does this all the time, but perhaps there was a tweak that is not on the wiki page?
Brian
From: Alex Benjamin @.> Date: Friday, May 14, 2021 at 11:47 AM To: ISET/iset3d @.> Cc: Brian A Wandell @.>, Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Hi David,
I am running 2020a on Windows 10. I have a fresh pull of iset3d and isetbio and the dependencies. Has this been tested on a Windows machine?
Thanks a lot!
Alex
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-841433915, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWPADQOG7PRCAVVLQVDTNVV5VANCNFSM443UHHPA.
Tornado warnings here, so took a quick look. I really haven’t used isetbio much at all, so I’m not sure I ever ran this particular tutorial. What it appears though, is if you go back up the command window the initial error is a permission error on one of the .pbrt files. So I suspect that maybe a figure or function or something has one of the pbrt files open from the first rendering of NumbersatDepth & NumbersAtDepth_depth (which work correctly), so the second one fails. Could well be unique to Windows. If true, restarting Matlab and just running one example or the other should be a workaround, just not both in a row until we can sort it out.
FWIW, I’m running the dev branches of iset3d & isetcam, and the master branch of isetbio, under Matlab 2020b (I don’t have 2020a installed, but doesn’t seem like that is the issue. Here is my full output:
t_rayTracingIntroduction
Warning: Setting film diagonal to 10 mm. Previously unspecified
In recipe/recipeGet (line 861)
In recipe/get (line 70)
In piRead (line 114)
In piRecipeDefault (line 556)
In sceneEye (line 122)
In t_rayTracingIntroduction (line 90)
Scene will not be parsed.
sceneEye with properties:
name: 'numbersAtDepth'
modelName: 'navarro'
usePinhole: 0
recipe: [1×1 recipe]
lensDensity: 1
recipe with properties:
camera: [1×1 struct]
sampler: [1×1 struct]
film: [1×1 struct]
filter: [1×1 struct]
integrator: [1×1 struct]
renderer: []
lookAt: [1×1 struct]
scale: []
world: {77×1 cell}
lights: []
transformTimes: []
inputFile: 'C:\iset\iset3d\data\V3\NumbersAtDepth\numbersAtDepth.pbrt'
outputFile: 'C:\iset\iset3d\local\NumbersAtDepth\numbersAtDepth.pbrt'
renderedFile: ''
version: 3
materials: []
textures: []
assets: []
exporter: 'Copy'
media: []
metadata: []
recipeVer: 2
verbose: 2
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\D65.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior1_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior2_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior3_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior4_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\navarroAccomodated_5.00.dat
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\resources
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\scenes
Copied resources from:
C:\iset\iset3d\data\V3\NumbersAtDepth
to
C:\iset\iset3d\local\NumbersAtDepth
Overwriting PBRT file C:\iset\iset3d\local\NumbersAtDepth\numbersAtDepth.pbrt
Docker container vistalab/pbrt-v3-spectral:latest
Overwriting PBRT file C:\iset\iset3d\local\NumbersAtDepth\numbersAtDepth_depth.pbrt
Docker command
docker run -ti --rm -w /NumbersAtDepth -v C:/iset/iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth.dat numbersAtDepth.pbrt
Rendering time for numbersAtDepth: 9.8 sec
Reading image h=320 x w=320 x 31 spectral planes.
Docker command
docker run -ti --rm -w /NumbersAtDepth -v C:/iset/iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth_depth.dat numbersAtDepth_depth.pbrt
Rendering time for numbersAtDepth_depth: 8.4 sec
Reading image h=320 x w=320 x 31 spectral planes.
125 theScene.set('use optics',true);
Warning: Escaped character '\i' is not valid. See 'doc sprintf' for supported special characters.
In addText (line 33)
In sceneEye/summary (line 43)
In t_rayTracingIntroduction (line 134)
Warning: Error reading lens file radius
In lensC/fileRead (line 95)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In sceneEye/summary (line 47)
In t_rayTracingIntroduction (line 134)
Bad indices 11
Bad indices 12
Warning: Error reading lens file offset
In lensC/fileRead (line 113)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In sceneEye/summary (line 47)
In t_rayTracingIntroduction (line 134)
Bad indices 12
Warning: Error reading lens file aperture
In lensC/fileRead (line 127)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In sceneEye/summary (line 47)
In t_rayTracingIntroduction (line 134)
Bad indices 2
Bad indices 4
Bad indices 6
Bad indices 8
Bad indices 10
Bad indices 11
Bad indices 12
Eye Model: realisticEye
Lens: navarro
Rays per pixel: 192
Ray bounces: 1
Integrator: path
Rendering an optical image
Input: numbersAtDepth
Docker dir: C:---------------
Focal distance: 0.20 (m), 5.00 (diopters)
Pupil diameter: 4.0 mm
FOV: 31.4 deg
Spatial samples: 320 320
Lens pigment density: 1.0
Chromatic aberration: Disabled
Diffraction: Disabled
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\D65.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior1_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior2_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior3_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\ior4_5.00dp.spd
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\navarroAccomodated_5.00.dat
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\resources
Copying C:\iset\iset3d\data\V3\NumbersAtDepth\scenes
Copied resources from:
C:\iset\iset3d\data\V3\NumbersAtDepth
to
C:\iset\iset3d\local\NumbersAtDepth
Overwriting PBRT file C:\iset\iset3d\local\NumbersAtDepth\numbersAtDepth.pbrt
Warning: File not found or permission denied
In piWrite>piWriteCopy (line 286)
In piWrite (line 161)
In sceneEye/render (line 86)
In t_rayTracingIntroduction (line 138)
Warning: Error reading lens file radius
In lensC/fileRead (line 95)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In recipe/recipeGet (line 509)
In recipe/get (line 70)
In navarroWrite (line 44)
In piWrite>piWriteLens (line 334)
In piWrite (line 170)
In sceneEye/render (line 86)
In t_rayTracingIntroduction (line 138)
Bad indices 11
Bad indices 12
Warning: Error reading lens file offset
In lensC/fileRead (line 113)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In recipe/recipeGet (line 509)
In recipe/get (line 70)
In navarroWrite (line 44)
In piWrite>piWriteLens (line 334)
In piWrite (line 170)
In sceneEye/render (line 86)
In t_rayTracingIntroduction (line 138)
Bad indices 12
Warning: Error reading lens file aperture
In lensC/fileRead (line 127)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In recipe/recipeGet (line 509)
In recipe/get (line 70)
In navarroWrite (line 44)
In piWrite>piWriteLens (line 334)
In piWrite (line 170)
In sceneEye/render (line 86)
In t_rayTracingIntroduction (line 138)
Bad indices 2
Bad indices 4
Bad indices 6
Bad indices 8
Bad indices 10
Bad indices 11
Bad indices 12
Wrote lens file to C:\iset\iset3d\local\NumbersAtDepth\lens\navarro.dat (accomm: 5.00 D)
Docker container vistalab/pbrt-v3-spectral:latest
Overwriting PBRT file C:\iset\iset3d\local\NumbersAtDepth\numbersAtDepth_depth.pbrt
Warning: File not found or permission denied
In piWrite>piWriteCopy (line 286)
In piWrite (line 161)
In piRender (line 223)
In sceneEye/render (line 90)
In t_rayTracingIntroduction (line 138)
Warning: Error reading lens file radius
In lensC/fileRead (line 95)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In recipe/recipeGet (line 509)
In recipe/get (line 70)
In navarroWrite (line 44)
In piWrite>piWriteLens (line 334)
In piWrite (line 170)
In piRender (line 223)
In sceneEye/render (line 90)
In t_rayTracingIntroduction (line 138)
Bad indices 11
Bad indices 12
Warning: Error reading lens file offset
In lensC/fileRead (line 113)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In recipe/recipeGet (line 509)
In recipe/get (line 70)
In navarroWrite (line 44)
In piWrite>piWriteLens (line 334)
In piWrite (line 170)
In piRender (line 223)
In sceneEye/render (line 90)
In t_rayTracingIntroduction (line 138)
Bad indices 12
Warning: Error reading lens file aperture
In lensC/fileRead (line 127)
In lensC (line 174)
In lensFocus (line 59)
In recipe/recipeGet (line 493)
In recipe/get (line 70)
In recipe/recipeGet (line 509)
In recipe/get (line 70)
In navarroWrite (line 44)
In piWrite>piWriteLens (line 334)
In piWrite (line 170)
In piRender (line 223)
In sceneEye/render (line 90)
In t_rayTracingIntroduction (line 138)
Bad indices 2
Bad indices 4
Bad indices 6
Bad indices 8
Bad indices 10
Bad indices 11
Bad indices 12
Wrote lens file to C:\iset\iset3d\local\NumbersAtDepth\lens\navarro.dat (accomm: 5.00 D)
Docker command
docker run -ti --rm -w /NumbersAtDepth -v C:/iset/iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth.dat numbersAtDepth.pbrt
Warning: Docker did not run correctly
In piRender (line 383)
In sceneEye/render (line 90)
In t_rayTracingIntroduction (line 138)
Status:
139
Result:
pbrt version 3 (built Jul 20 2019 at 00:27:47) [Detected 16 cores]
Copyright (c)1998-2018 Matt Pharr, Greg Humphreys, and Wenzel Jakob.
The source code to pbrt (but not the book contents) is covered by the BSD License.
See the file LICENSE.txt for the conditions of the license.
numbersAtDepth.pbrt:8:74: Error: unexpected escaped character "i"
terminate called without an active exception
From: Brian Wandell @.> Sent: Friday, May 14, 2021 8:26 PM To: ISET/iset3d @.> Cc: Subscribed @.***> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Traveling, but will attempt to reproduce when I can
On May 14, 2021, 2:10 PM, at 2:10 PM, Brian A Wandell @. <mailto:@.> > wrote:
It has. Dave Cardinal (now copied) might have learned something special about running on Windows. He does this all the time, but perhaps there was a tweak that is not on the wiki page?
Brian
From: Alex Benjamin @. <mailto:@.> > Date: Friday, May 14, 2021 at 11:47 AM To: ISET/iset3d @. <mailto:@.> > Cc: Brian A Wandell @. <mailto:@.> >, Comment @. <mailto:@.> > Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Hi David,
I am running 2020a on Windows 10. I have a fresh pull of iset3d and isetbio and the dependencies. Has this been tested on a Windows machine?
Thanks a lot!
Alex
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-841433915, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWPADQOG7PRCAVVLQVDTNVV5VANCNFSM443UHHPA.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-841591777 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3GSJEWAEEMT36I5BELTNXSUZANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3CJYTCLSPGKNRN7HOLTNXSUZA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGIU2XYI.gif
A quick update. The above replicated output is exactly what I get on my end as well. Per the suggestion I tried:
1) Running either 'pinhole' or 'optics'. Independently rather than sequentially. That did not fix the issue either.
I have however tracked down the specific error to a particular line in the .pbrt files. When the optical rendering is executed, the code creates the following in the 'local' folder:
numbersAtDepth.pbrt numbersAtDepth_depth.pbrt.
both files have these lines:
"spectrum ior1" "lens\ior1.spd" "spectrum ior2" "lens\ior2.spd" "spectrum ior3" "lens\ior3.spd" "spectrum ior4" "lens\ior4.spd"
unlike the other path locations in both files, these have backslash operators. I altered these to be forwardslash to match the rest of both files. I then ran the specific docker commands through the cmd line:
First
run -ti --rm -w /NumbersAtDepth -v C:/Users/3dpai/Documents/eyFul/iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth.dat numbersAtDepth.pbrt
and then
docker run -ti --rm -w /NumbersAtDepth -v C:/Users/3dpai/Documents/eyFul/iset3d/local/NumbersAtDepth:/NumbersAtDepth vistalab/pbrt-v3-spectral:latest pbrt --outfile renderings/numbersAtDepth_depth.dat numbersAtDepth_depth.pbrt
They seem to run okay!
Might this be the issue? A cross OS file path syntax?
Also, is there a way to view the renderings other than through MATLAB?
Ah, super info. Typically this happens when someone hardcodes an OS specific '\' or '/', rather than using the fullfile() function to create the path, or the filesep function to get the correct file separator for the current OS. We should be able to do a global search for '\' and '/' and fix these up.
There is a way to get the actual image data and save it out. I will send an example when I get a chance if no on beats me to it.
Ah, yes. Actually I think the problem is the “opposite”😊 When I first started working with iset3d on Windows last year I fixed up a bunch of the pathing, but one tricky bit is that while Windows uses “\” the Docker container is a Linux container and requires “/” – so I worked on making sure the ispc branch forces “/” in that case for paths that are sent to the Docker container. I don’t know any other great way to solve it, but I never touched isetbio, and there might be some unfixed places in iset3d – since it sounds like a “\” (the correct Windows separator) is being passed, when the docker container wants “/”.
To make things more confusing, I also compiled a Windows-native version of pbrt (in the mistaken believe it would be faster), and in the process added an optional “isnative” flag since in that case the pbrt binary does indeed want the same separator as the OS.
In any case, it sounds like we are a line or two of code away from solving Alex’s issue!
From: David Brainard @.> Sent: Saturday, May 15, 2021 4:21 PM To: ISET/iset3d @.> Cc: David Cardinal @.>; Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Ah, super info. Typically this happens when someone hardcodes an OS specific '' or '/', rather than using the fullfile() function to create the path, or the filesep function to get the correct file separator for the current OS. We should be able to do a global search for '' and '/' and fix these up.
There is a way to get the actual image data and save it out. I will send an example when I get a chance if no on beats me to it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-841738502 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3DI6AFAO7V6RFEM4Q3TN36XLANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3DNLPUMNBBPPMZRC3LTN36XLA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGIV6SBQ.gif
Aha. I see. Maybe someone (could be me) changed things back at some point - I can be a bit compulsive about switching to fullfile/filesep when I see a '\' or '/' in a path. This would have been some time ago if I did such. I don't think any docker paths get set up in isetbio, almost surely somewhere in iset3d.
Seems like piWrite or piRender might be the files to look in. There is a commit from March 21 in piRender where David C. changed a '\' to a filesep to make something work on Windows, but that might not be something that gets to Docker.
Seems like the right track. I fixed (I think) the generic lens branch when I had an issue with it, but there is another branch for “ior” that I didn’t deal with?
fileName = strcat(name,ext);
if strcmp(ifn,'specfile') || strcmp(ifn,'lensfile')
% It is a lens, so just update the name. It
% was already copied
% This should work.
% currValue = strcat('lens',[filesep, strcat(name,ext)]);
if ispc()
currValue = strcat('lens/',strcat(name,ext));
else
currValue = fullfile('lens',strcat(name,ext));
end
elseif piContains(ifn,'ior')
% The the innerfield name contains the ior string,
% then we change it to this
currValue = strcat('lens',[filesep, strcat(name,ext)]);
else
[success,~,id] = copyfile(currValue,workingDir);
if ~success && ~strcmp(id,'MATLAB:COPYFILE:SourceAndDestinationSame')
warning('Problem copying %s\n',currValue);
end
% Update the file for the relative path
currValue = fileName;
end
From: David Brainard @.> Sent: Saturday, May 15, 2021 6:23 PM To: ISET/iset3d @.> Cc: David Cardinal @.>; Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Seems like piWrite or piRender might be the files to look in. There is a commit from March 21 in piRender where David C. changed a '' to a filesep to make something work on Windows, but that might not be something that gets to Docker.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-841749862 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3AYMLSGHMYWCYIW33LTN4M7HANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3DG266KYKSCHQWAPG3TN4M7HA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGIWBKZQ.gif
Thank you all for the help! It is much appreciated. Looking forward to the fixes.
Please do let me know if there is anything I can do in the meantime to view the rendered data using the cmd line (without MATLAB). As it stands now, I need to run the rendering through the command line after manually fixing the file path issue.
I am traveling just now, returning on Friday. I will try to find the specific code with Zheng when I return.
At the moment, I am a bit uncertain where the / vs \ issues arise. I will try to catch up next weekend.
Brian
From: Alex Benjamin @.> Date: Monday, May 17, 2021 at 10:03 AM To: ISET/iset3d @.> Cc: Brian A Wandell @.>, Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Thank you all for the help! It is much appreciated. Looking forward to the fixes.
Please do let me know if there is anything I can do in the meantime to view the rendered data using the cmd line (without MATLAB). As it stands now, I need to run the rendering through the command line after manually fixing the file path issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-842351281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWLGNDE6Q7JIHT3GOBDTOEO3DANCNFSM443UHHPA.
Okay, after some mildly-painful tracing, I think I found what is happening. The code that writes the file paths for the lens files and ior* in the eye models uses the system native file separator, instead of somehow intuiting that the docker container uses Linux😊 For example it occurs in Navarrowrite line 114, among other places. Unfortunately, I think there are a lot of instances.
I’m not familiar with any of the bio/eye code, so I’m hesitant to mess with it, but I’m wondering if we had a common “chokepoint” for writing file paths into a recipe that could provide a single place for the path separator to be determined if that might be one not-entirely-awful solution.
In the meantime I can code a quick hack to look for filepaths in the pbrt files before we pass them to docker, and flip the slashes. No clue if it’ll work, but it’ll be behind ispc, so it shouldn’t break anything that is already working. – David C.
From: Brian Wandell @.> Sent: Monday, May 17, 2021 7:15 AM To: ISET/iset3d @.> Cc: David Cardinal @.>; Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
I am traveling just now, returning on Friday. I will try to find the specific code with Zheng when I return.
At the moment, I am a bit uncertain where the / vs \ issues arise. I will try to catch up next weekend.
Brian
From: Alex Benjamin @. <mailto:@.> > Date: Monday, May 17, 2021 at 10:03 AM To: ISET/iset3d @. <mailto:@.> > Cc: Brian A Wandell @. <mailto:@.> >, Comment @. <mailto:@.> > Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Thank you all for the help! It is much appreciated. Looking forward to the fixes.
Please do let me know if there is anything I can do in the meantime to view the rendered data using the cmd line (without MATLAB). As it stands now, I need to run the rendering through the command line after manually fixing the file path issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-842351281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWLGNDE6Q7JIHT3GOBDTOEO3DANCNFSM443UHHPA.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-842360054 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3CMBMU4H2J2373NZ5DTOEQEPANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3EC6SAGDFPZP3SU7DDTOEQEPA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGI2WJ5Q.gif
I’ve pushed what could generously be called a workaround to the dev branch of iset3d that adds some code to piRender to fix up paths when running pbrt in docker under Windows (since the docker container we use is Linux).
It turns out more needed tweaking than separators since (doh!) there isn’t a “C” drive at all. So I remove piRootPath and ‘local’ from the path, so the new path is relative to the working directory we pass the container. That’s super-ugly, but was quick to implement.
In any case, the new code is behind ispc() so it shouldn’t cause any new problems, and the troublesome tutorial now works for me on Windows. – David C.
From: David Cardinal @.> On Behalf Of @. Sent: Monday, May 17, 2021 9:27 AM To: 'ISET/iset3d' @.>; 'ISET/iset3d' @.> Cc: 'David Cardinal' @.>; 'Comment' @.> Subject: RE: [ISET/iset3d] Error when rendering scene with optics (#44)
Okay, after some mildly-painful tracing, I think I found what is happening. The code that writes the file paths for the lens files and ior* in the eye models uses the system native file separator, instead of somehow intuiting that the docker container uses Linux😊 For example it occurs in Navarrowrite line 114, among other places. Unfortunately, I think there are a lot of instances.
I’m not familiar with any of the bio/eye code, so I’m hesitant to mess with it, but I’m wondering if we had a common “chokepoint” for writing file paths into a recipe that could provide a single place for the path separator to be determined if that might be one not-entirely-awful solution.
In the meantime I can code a quick hack to look for filepaths in the pbrt files before we pass them to docker, and flip the slashes. No clue if it’ll work, but it’ll be behind ispc, so it shouldn’t break anything that is already working. – David C.
From: Brian Wandell @. @.> > Sent: Monday, May 17, 2021 7:15 AM To: ISET/iset3d @. @.> > Cc: David Cardinal @. @.> >; Comment @. @.> > Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
I am traveling just now, returning on Friday. I will try to find the specific code with Zheng when I return.
At the moment, I am a bit uncertain where the / vs \ issues arise. I will try to catch up next weekend.
Brian
From: Alex Benjamin @. <mailto:@.> > Date: Monday, May 17, 2021 at 10:03 AM To: ISET/iset3d @. <mailto:@.> > Cc: Brian A Wandell @. <mailto:@.> >, Comment @. <mailto:@.> > Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Thank you all for the help! It is much appreciated. Looking forward to the fixes.
Please do let me know if there is anything I can do in the meantime to view the rendered data using the cmd line (without MATLAB). As it stands now, I need to run the rendering through the command line after manually fixing the file path issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-842351281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWLGNDE6Q7JIHT3GOBDTOEO3DANCNFSM443UHHPA.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-842360054 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3CMBMU4H2J2373NZ5DTOEQEPANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3EC6SAGDFPZP3SU7DDTOEQEPA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGI2WJ5Q.gif
Thanks, Dave. Nice of you to swing into action.
Brian
From: David Cardinal @.> Date: Monday, May 17, 2021 at 2:06 PM To: ISET/iset3d @.> Cc: Brian A Wandell @.>, Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44) I’ve pushed what could generously be called a workaround to the dev branch of iset3d that adds some code to piRender to fix up paths when running pbrt in docker under Windows (since the docker container we use is Linux).
It turns out more needed tweaking than separators since (doh!) there isn’t a “C” drive at all. So I remove piRootPath and ‘local’ from the path, so the new path is relative to the working directory we pass the container. That’s super-ugly, but was quick to implement.
In any case, the new code is behind ispc() so it shouldn’t cause any new problems, and the troublesome tutorial now works for me on Windows. – David C.
From: David Cardinal @.> On Behalf Of @. Sent: Monday, May 17, 2021 9:27 AM To: 'ISET/iset3d' @.>; 'ISET/iset3d' @.> Cc: 'David Cardinal' @.>; 'Comment' @.> Subject: RE: [ISET/iset3d] Error when rendering scene with optics (#44)
Okay, after some mildly-painful tracing, I think I found what is happening. The code that writes the file paths for the lens files and ior* in the eye models uses the system native file separator, instead of somehow intuiting that the docker container uses Linux😊 For example it occurs in Navarrowrite line 114, among other places. Unfortunately, I think there are a lot of instances.
I’m not familiar with any of the bio/eye code, so I’m hesitant to mess with it, but I’m wondering if we had a common “chokepoint” for writing file paths into a recipe that could provide a single place for the path separator to be determined if that might be one not-entirely-awful solution.
In the meantime I can code a quick hack to look for filepaths in the pbrt files before we pass them to docker, and flip the slashes. No clue if it’ll work, but it’ll be behind ispc, so it shouldn’t break anything that is already working. – David C.
From: Brian Wandell @. @.> > Sent: Monday, May 17, 2021 7:15 AM To: ISET/iset3d @. @.> > Cc: David Cardinal @. @.> >; Comment @. @.> > Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
I am traveling just now, returning on Friday. I will try to find the specific code with Zheng when I return.
At the moment, I am a bit uncertain where the / vs \ issues arise. I will try to catch up next weekend.
Brian
From: Alex Benjamin @. <mailto:@.> > Date: Monday, May 17, 2021 at 10:03 AM To: ISET/iset3d @. <mailto:@.> > Cc: Brian A Wandell @. <mailto:@.> >, Comment @. <mailto:@.> > Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Thank you all for the help! It is much appreciated. Looking forward to the fixes.
Please do let me know if there is anything I can do in the meantime to view the rendered data using the cmd line (without MATLAB). As it stands now, I need to run the rendering through the command line after manually fixing the file path issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-842351281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWLGNDE6Q7JIHT3GOBDTOEO3DANCNFSM443UHHPA.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-842360054 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3CMBMU4H2J2373NZ5DTOEQEPANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3EC6SAGDFPZP3SU7DDTOEQEPA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGI2WJ5Q.gif
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ISET/iset3d/issues/44#issuecomment-842525413, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOAQWMB4HXM25CAEXLDT6DTOFLIXANCNFSM443UHHPA.
Thanks a lot! Just a quick point:
The fix looks for "C:\" in the lines of the pbrt file. This doesn't fix the issue because even on a windows, it defaults to a relative path.
I modified it to
if contains(thisline, "\")
instead and that does it.
Thanks again for all the help. I really appreciate it.
A more functionality question: does this model allow the user to modify the retina shape?
Glad you got it to work! Interestingly, I get full paths when I run it. I don’t know if I set something or why there is a difference.
I was hesitant to correct all “\” to “/” because I don’t know if they might occur in pbrt files for some other reason. Either way, we definitely need a better fix😊
From: Alex Benjamin @.> Sent: Monday, May 17, 2021 11:58 AM To: ISET/iset3d @.> Cc: David Cardinal @.>; Comment @.> Subject: Re: [ISET/iset3d] Error when rendering scene with optics (#44)
Thanks a lot! Just a quick point:
The fix looks for "C:" in the lines of the pbrt file. This doesn't fix the issue because even on a windows, it defaults to a relative path.
I modified it to
if contains(thisline, "\")
instead and that does it.
Thanks again for all the help. I really appreciate it.
A more functionality question: does this model allow the user to modify the retina shape?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISET/iset3d/issues/44#issuecomment-842555605 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ4N3CSNXH4COOFNDQ5Q2TTOFRJZANCNFSM443UHHPA . https://github.com/notifications/beacon/ABJ4N3CO2F2IOB5WNGGGYFDTOFRJZA5CNFSM443UHHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGI4GBVI.gif
Thank you for all the help!
Hello,
I am currently running the t_rayTracingIntroduction.m script. When I run the following block:
`% Now tell PBRT to use the lens theScene.set('use optics',true);
% % Focus on the numbers at 200 mm theScene.set('accommodation',1/0.2); % Diopters
% The lens rendering benefits from adding a few more rays per pixel theScene.set('rays per pixel',128);
% Summarizing is always nice theScene.summary;
% Render and show. We use 'oi' to refer to optical image, the spectral % irradiance at the retina (also retinal irradiance). oi = theScene.render; oiWindow(oi);`
I get the following error during execution:
checkerboard.pbrt:16:33: Error: unexpected escaped character "i" terminate called without an active exception
The pbrt file is as follows:
`# PBRT file created with piWrite on 2021/5/13 22:51:33.49
PBRT version = 3
LookAt 0.000000 0.000000 10.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
camera
Camera "realisticEye" "string lensfile" "lens/navarro.dat" "float retinaDistance" [16.320000] "float retinaRadius" [12.000000] "float retinaSemiDiam" [4.357983] "float pupilDiameter" [4.000000] "float focusdistance" [0.100000] "bool mmUnits" "false" "bool chromaticAberrationEnabled" "false" "spectrum ior1" "lens\ior1.spd" "spectrum ior2" "lens\ior2.spd" "spectrum ior3" "lens\ior3.spd" "spectrum ior4" "lens\ior4.spd" "bool noweighting" "true"
sampler
Sampler "stratified" "bool jitter" "false" "integer xsamples" [1] "integer ysamples" [1]
film
Film "image" "integer xresolution" [320] "integer yresolution" [320] "float diagonal" [10.000000] "string datatype" "depth"
filter
PixelFilter "box" "float xwidth" [0.500000] "float ywidth" [0.500000]
integrator
Integrator "metadata" "string strategy" "depth"
WorldBegin
Include "checkerboard_depth_materials.pbrt" Include "checkerboard_depth_geometry.pbrt"
Include "checkerboard_depth_lights.pbrt" WorldEnd `
Any help would be appreciated. Thank you!