Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/vr-lite-cam.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/vr-lite-cam.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 976, Tue Apr 26 00:26:08 2011 UTC revision 978, Tue Apr 26 00:55:57 2011 UTC
# Line 8  Line 8 
8  // process output with:  // process output with:
9  // unu reshape -i mip.txt -s 4 480 345 | overrgb -i - -b 0.1 0.15 0.2 -g 1.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-lite-cam.png  // unu reshape -i mip.txt -s 4 480 345 | overrgb -i - -b 0.1 0.15 0.2 -g 1.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-lite-cam.png
10    
11  // string dataFile = "../data/txs-pad3.nrrd";  string dataFile = "../data/txs-pad3.nrrd";
12  // vec3 camEye = [25.0, 15.0, 10.0];  vec3 camEye = [25.0, 15.0, 10.0];
13  // vec3 camAt = [3.0, 3.0, 3.0];  vec3 camAt = [3.0, 3.0, 3.0];
14  // vec3 camUp = [0.0, 0.0, 1.0];  vec3 camUp = [0.0, 0.0, 1.0];
15  // real camNear = -5.0;  real camNear = -5.0;
16  // real camFar = 5.0;  real camFar = 5.0;
17  // real camFOV = 16.0;  real camFOV = 16.0;
18    int imgResU = 480;
19    int imgResV = 345;
20    real rayStep = 0.1;
21    real valOpacMin = 0.15;          // highest value with opacity 0.0
22    real valOpacMax = 0.20;          // lowest value with opacity 1.0
23    
24    //string dataFile = "../data/vfrhand-nohip.nhdr";
25    //vec3 camEye = [127.331, -1322.05, 272.53];
26    //vec3 camAt = [63.0, 82.6536, 98.0];
27    //vec3 camUp = [0.9987, 0.0459166, -0.0221267];
28    //real camNear = -78.0;
29    //real camFar = 78.0;
30    //real camFOV = 5.0;
31  // int imgResU = 480;  // int imgResU = 480;
32  // int imgResV = 345;  // int imgResV = 345;
33  // real rayStep = 0.1;  // real rayStep = 0.1;
34  // real valOpacMin = 0.15;          // highest value with opacity 0.0  //real valOpacMin = 400.0;        // 400.0 for skin, 1150.0 for bone
35  // real valOpacMax = 0.20;          // lowest value with opacity 1.0  //real valOpacMax = 700.0;        // 700.0 for skin, 1450.0 for bone
   
 string dataFile = "../data/vfrhand-nohip.nhdr";  
 vec3 camEye = [127.331, -1322.05, 272.53];  
 vec3 camAt = [63.0, 82.6536, 98.0];  
 vec3 camUp = [0.9987, 0.0459166, -0.0221267];  
 real camNear = -78.0;  
 real camFar = 78.0;  
 real camFOV = 5.0;  
 int imgResU = 480;  
 int imgResV = 345;  
 real rayStep = 1.0;  
 real valOpacMin = 400.0;        // 400.0 for skin, 1150.0 for bone  
 real valOpacMax = 700.0;        // 700.0 for skin, 1450.0 for bone  
36    
37  real camDist = |camAt - camEye|;  real camDist = |camAt - camEye|;
38  real camVspNear = camDist + camNear;  real camVspNear = camDist + camNear;
# Line 83  Line 83 
83                real alpha = min(1.0, lerp(0.0, 1.0, valOpacMin, val, valOpacMax));                real alpha = min(1.0, lerp(0.0, 1.0, valOpacMin, val, valOpacMax));
84                real ld = max(0.0, norm • lightDir);                real ld = max(0.0, norm • lightDir);
85                real hd = max(0.0, norm • normalize(lightDir + normalize(camEye - rayPos)));                real hd = max(0.0, norm • normalize(lightDir + normalize(camEye - rayPos)));
86                vec3 matRGB = [1.0, 1.0, 1.0];                // contrived assignment of RGB from XYZ, only sensible
87                  // for txs-pad3.nrrd, not for vfrhand-nohip.nhdr!!
88                  vec3 matRGB = [lerp(0.2, 1.0, 1.0, rayPos[0], 8.0),
89                                 lerp(0.2, 1.0, 1.0, rayPos[1], 8.0),
90                                 lerp(0.2, 1.0, 1.0, rayPos[2], 8.0)];
91                vec3 pntRGB = (phongKa*matRGB                vec3 pntRGB = (phongKa*matRGB
92                               + phongKd*ld*modulate(matRGB, lightRGB)                               + phongKd*ld*modulate(matRGB, lightRGB)
93                               + phongKs*hd^phongSp*lightRGB);                               + phongKs*hd^phongSp*lightRGB);

Legend:
Removed from v.976  
changed lines
  Added in v.978

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0