SHARE
TWEET

Mtl Tf extraction

a guest Jul 3rd, 2017 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Output:
  2. leftSphere: 0 0 0
  3. rightSphere: 0 0 0  <-- Error
  4. floor: 0 0 0
  5. ceiling: 0 0 0
  6. backWall: 0 0 0
  7. rightWall: 0 0 0
  8. leftWall: 0 0 0
  9. light: 0 0 0        <-- Error?
  10.  
  11. Code:
  12.         aiString name;
  13.         mat->Get(AI_MATKEY_NAME, name);
  14.         aiColor3D transparent;
  15.         mat->Get(AI_MATKEY_COLOR_TRANSPARENT, transparent);
  16.         cout << name.C_Str() << ": " << transparent.r << " " << transparent.g << " " << transparent.b << endl;
  17.        
  18. Source .mtl:
  19.         # The sphere Cornell Box as seen in Henrik Jensen's
  20. # "Realistic Image Synthesis Using Photon Mapping" (Page 107 Fig. 9.10) in OBJ format.
  21. # Note that the real box is not a perfect cube, so
  22. # the faces are imperfect in this data set.
  23. #
  24. # Created by Guedis Cardenas and Morgan McGuire at Williams College, 2011
  25. # Released into the Public Domain.
  26. #
  27. # http://graphics.cs.williams.edu/data
  28. # http://www.graphics.cornell.edu/online/box/data.html
  29. # http://www.cs.cmu.edu/~djames/15-864/pics/cornellBox.jpg
  30. #
  31.  
  32.  
  33. newmtl leftSphere
  34.     Ka 0.01 0.01 0.01
  35.     Kd 0.01 0.01 0.01
  36.     Ks 0.95 0.95 0.95
  37.     Ns 1000
  38.     illum 5
  39.    
  40. newmtl rightSphere
  41.     Ka 0.01 0.01 0.01
  42.     Kd 0.01 0.01 0.01
  43.     Ks 0.30 0.30 0.30
  44.     Tf 0.10 0.10 0.10
  45.     Ns 200
  46.     Ni 2.5
  47.     illum 7
  48.    
  49. newmtl floor
  50.     Ns 10.0000
  51.     Ni 1.5000
  52.     illum 2
  53.     Ka 0.7250 0.7100 0.6800
  54.     Kd 0.7250 0.7100 0.6800
  55.     Ks 0 0 0
  56.  
  57. newmtl ceiling
  58.     Ns 10.0000
  59.     Ni 1.5000
  60.     illum 2
  61.     Ka 0.7250 0.7100 0.6800
  62.     Kd 0.7250 0.7100 0.6800
  63.     Ks 0.0000 0.0000 0.0000
  64.  
  65. newmtl backWall
  66.     Ns 10.0000
  67.     Ni 1.5000
  68.     illum 2
  69.     Ka 0.7250 0.7100 0.6800
  70.     Kd 0.7250 0.7100 0.6800
  71.     Ks 0.0000 0.0000 0.0000
  72.     Ke 0.0000 0.0000 0.0000
  73.  
  74. newmtl rightWall
  75.     Ns 10.0000
  76.     illum 2
  77.     Ka 0.161 0.133 0.427 # Blue
  78.     Kd 0.161 0.133 0.427
  79.     Ks 0 0 0
  80.    
  81. newmtl leftWall
  82.     Ns 10.0000
  83.     illum 2
  84.     Ka 0.6300 0.0650 0.0500
  85.     Kd 0.6300 0.0650 0.0500
  86.     Ks 0 0 0
  87.  
  88. newmtl light
  89.     Ns 10.0000
  90.     Ni 1.5000
  91.     d 1.0000
  92.     Tr 0.0000
  93.     Tf 1.0000 1.0000 1.0000
  94.     illum 2
  95.     Ka 0.7800 0.7800 0.7800
  96.     Kd 0.7800 0.7800 0.7800
  97.     Ke 10 10 10
  98.     Ks 0 0 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top