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 975, Mon Apr 25 23:18:20 2011 UTC revision 976, Tue Apr 26 00:26:08 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;
 int imgResU = 480;  
 int imgResV = 345;  
 real rayStep = 0.1;  
 real valOpacMin = 0.15;          // highest value with opacity 0.0  
 real valOpacMax = 0.20;          // lowest value with opacity 1.0  
   
 //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;  
18  //int imgResU = 480;  //int imgResU = 480;
19  //int imgResV = 345;  //int imgResV = 345;
20  //real rayStep = 0.1;  //real rayStep = 0.1;
21  //real valOpacMin = 400.0;        // 400.0 for skin, 1150.0 for bone  // real valOpacMin = 0.15;          // highest value with opacity 0.0
22  //real valOpacMax = 700.0;        // 700.0 for skin, 1450.0 for bone  // 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;
32    int imgResV = 345;
33    real rayStep = 1.0;
34    real valOpacMin = 400.0;        // 400.0 for skin, 1150.0 for bone
35    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                // contrived assignment of RGB from XYZ, only sensible                vec3 matRGB = [1.0, 1.0, 1.0];
               // for txs-pad3.nrrd, not for vfrhand-nohip.nhdr!!  
               vec3 matRGB = [lerp(0.2, 1.0, 1.0, rayPos[0], 8.0),  
                              lerp(0.2, 1.0, 1.0, rayPos[1], 8.0),  
                              lerp(0.2, 1.0, 1.0, rayPos[2], 8.0)];  
87                vec3 pntRGB = (phongKa*matRGB                vec3 pntRGB = (phongKa*matRGB
88                               + phongKd*ld*modulate(matRGB, lightRGB)                               + phongKd*ld*modulate(matRGB, lightRGB)
89                               + phongKs*hd^phongSp*lightRGB);                               + phongKs*hd^phongSp*lightRGB);

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

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