Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Output:
- leftSphere: 0 0 0
- rightSphere: 0 0 0 <-- Error
- floor: 0 0 0
- ceiling: 0 0 0
- backWall: 0 0 0
- rightWall: 0 0 0
- leftWall: 0 0 0
- light: 0 0 0 <-- Error?
- Code:
- aiString name;
- mat->Get(AI_MATKEY_NAME, name);
- aiColor3D transparent;
- mat->Get(AI_MATKEY_COLOR_TRANSPARENT, transparent);
- cout << name.C_Str() << ": " << transparent.r << " " << transparent.g << " " << transparent.b << endl;
- Source .mtl:
- # The sphere Cornell Box as seen in Henrik Jensen's
- # "Realistic Image Synthesis Using Photon Mapping" (Page 107 Fig. 9.10) in OBJ format.
- # Note that the real box is not a perfect cube, so
- # the faces are imperfect in this data set.
- #
- # Created by Guedis Cardenas and Morgan McGuire at Williams College, 2011
- # Released into the Public Domain.
- #
- # http://graphics.cs.williams.edu/data
- # http://www.graphics.cornell.edu/online/box/data.html
- # http://www.cs.cmu.edu/~djames/15-864/pics/cornellBox.jpg
- #
- newmtl leftSphere
- Ka 0.01 0.01 0.01
- Kd 0.01 0.01 0.01
- Ks 0.95 0.95 0.95
- Ns 1000
- illum 5
- newmtl rightSphere
- Ka 0.01 0.01 0.01
- Kd 0.01 0.01 0.01
- Ks 0.30 0.30 0.30
- Tf 0.10 0.10 0.10
- Ns 200
- Ni 2.5
- illum 7
- newmtl floor
- Ns 10.0000
- Ni 1.5000
- illum 2
- Ka 0.7250 0.7100 0.6800
- Kd 0.7250 0.7100 0.6800
- Ks 0 0 0
- newmtl ceiling
- Ns 10.0000
- Ni 1.5000
- illum 2
- Ka 0.7250 0.7100 0.6800
- Kd 0.7250 0.7100 0.6800
- Ks 0.0000 0.0000 0.0000
- newmtl backWall
- Ns 10.0000
- Ni 1.5000
- illum 2
- Ka 0.7250 0.7100 0.6800
- Kd 0.7250 0.7100 0.6800
- Ks 0.0000 0.0000 0.0000
- Ke 0.0000 0.0000 0.0000
- newmtl rightWall
- Ns 10.0000
- illum 2
- Ka 0.161 0.133 0.427 # Blue
- Kd 0.161 0.133 0.427
- Ks 0 0 0
- newmtl leftWall
- Ns 10.0000
- illum 2
- Ka 0.6300 0.0650 0.0500
- Kd 0.6300 0.0650 0.0500
- Ks 0 0 0
- newmtl light
- Ns 10.0000
- Ni 1.5000
- d 1.0000
- Tr 0.0000
- Tf 1.0000 1.0000 1.0000
- illum 2
- Ka 0.7800 0.7800 0.7800
- Kd 0.7800 0.7800 0.7800
- Ke 10 10 10
- Ks 0 0 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement