-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement: use the PLY model files for various scenes
- Loading branch information
Showing
16 changed files
with
353 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ply/**/*.ply binary linguist-generated | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# gltf | ||
# glTF models | ||
|
||
Models borrowed from [glTF Sample Models](https://github.com/KhronosGroup/glTF-Sample-Models) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# PLY models | ||
|
||
These famous objects are from the [Large Geometric Models Archive at Georgia Tech](https://sites.cc.gatech.edu/projects/large_models/index.html). | ||
|
||
| Model | Faces | Vertices | | ||
| --------------- | --------- | -------- | | ||
| Stanford Bunny | 69,451 | 35,947 | | ||
| Stanford Dragon | 871,414 | 437,645 | | ||
| Happy Buddha | 1,087,716 | 543,652 | | ||
|
||
The files were converted from the ASCII ply format to the binary ply format using the `ply2binary` program, built from the sources available [here](https://sites.cc.gatech.edu/projects/large_models/ply.html). To quote from the README of that repository: | ||
|
||
> These geometry filters have been developed on a Silicon Graphics | ||
> workstation using the native C compiler. The code may very well run | ||
> unmodified on other platforms but this has not yet been verified. | ||
Indeed, the code assumes a different endianness from the running operating system. As a workaround, after running `./ply2binary < ~/example.ascii.ply > ~/example.binary.ply`, you need to edit the header in the binary file: | ||
|
||
```diff | ||
- format binary_big_endian 1.0 | ||
+ format binary_little_endian 1.0 | ||
``` | ||
|
||
After this change, the binary file can be read correctly by compliant parsers. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"time_0": 0, | ||
"time_1": 1, | ||
"background_color": [0.025, 0.025, 0.025], | ||
"camera": { | ||
"look_from": [0, 200, -800], | ||
"look_at": [0, 200, 0], | ||
"up": [0, 1, 0], | ||
"vertical_fov": 40, | ||
"aperture": 30, | ||
"focus_distance": 650 | ||
}, | ||
"objects": [ | ||
{ | ||
"kind": "PLY", | ||
"comment": "bunny", | ||
"path": "ply/bunny.binary.ply", | ||
"scale": 2500, | ||
"center": [-45, -85, 0], | ||
"rotation": [0, 200, 0], | ||
"material": "white lambertian" | ||
}, | ||
{ | ||
"kind": "Quad", | ||
"comment": "floor", | ||
"q": [-2000, 0.01, -500], | ||
"u": [4000, 0, 0], | ||
"v": [0, 0, 1000], | ||
"material": "checkerboard" | ||
}, | ||
{ | ||
"kind": "Quad", | ||
"comment": "back wall", | ||
"q": [-2000, 0, 500], | ||
"u": [4000, 0, 0], | ||
"v": [0, 1000, 0], | ||
"material": "checkerboard" | ||
}, | ||
{ | ||
"kind": "Sphere", | ||
"center": [0, 800, -300], | ||
"radius": 300, | ||
"material": "lamp", | ||
"comment": "big ceiling light", | ||
"priority": true | ||
} | ||
], | ||
"materials": [ | ||
{ | ||
"name": "dark lambertian", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": [0.3, 0.3, 0.3] | ||
} | ||
}, | ||
{ | ||
"name": "white lambertian", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": [0.8, 0.8, 0.8] | ||
} | ||
}, | ||
{ | ||
"name": "checkerboard", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SpatialChecker", | ||
"even": [0.8, 0.8, 0.8], | ||
"odd": [0.3, 0.3, 0.3], | ||
"density": 0.01 | ||
} | ||
}, | ||
{ | ||
"name": "lamp", | ||
"kind": "DiffuseLight", | ||
"emit": { | ||
"kind": "SolidColor", | ||
"color": [5, 5, 5] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,93 @@ | ||
{ | ||
"time_0": 0, | ||
"time_1": 1, | ||
"background_color": [0, 0, 0], | ||
"background_color": [0.025, 0.025, 0.025], | ||
"camera": { | ||
"look_from": [0, 250, -800], | ||
"look_at": [0, 250, 0], | ||
"look_from": [0, 200, -800], | ||
"look_at": [0, 200, 0], | ||
"up": [0, 1, 0], | ||
"vertical_fov": 40, | ||
"aperture": 10, | ||
"focus_distance": 800 | ||
"aperture": 30, | ||
"focus_distance": 650 | ||
}, | ||
"objects": [ | ||
{ | ||
"kind": "Quad", | ||
"comment": "back wall", | ||
"q": [-2000, 0, 800], | ||
"u": [4000, 0, 0], | ||
"v": [0, 1000, 0], | ||
"material": { | ||
"kind": "Lambertian", | ||
"albedo": { "kind": "SolidColor", "color": [1, 1, 1] } | ||
} | ||
}, | ||
{ | ||
"kind": "STL", | ||
"kind": "PLY", | ||
"comment": "dragon", | ||
"path": "stl/dragon.stl", | ||
"scale": 12, | ||
"center": [0, 240, 250], | ||
"rotation": [-90, -40, 0], | ||
"material": { | ||
"name": "Dense flint glass SF10", | ||
"kind": "Dispersive", | ||
"cauchy_a": 1.728, | ||
"cauchy_b": 0.01342 | ||
} | ||
"path": "ply/dragon.binary.ply", | ||
"scale": 2500, | ||
"center": [-45, -135, -100], | ||
"rotation": [0, 200, 0], | ||
"material": "white lambertian" | ||
}, | ||
{ | ||
"kind": "Quad", | ||
"q": [-2000, 0, -200], | ||
"comment": "floor", | ||
"q": [-2000, 0.01, -500], | ||
"u": [4000, 0, 0], | ||
"v": [0, 0, 1000], | ||
"comment": "floor", | ||
"priority": false, | ||
"material": { | ||
"kind": "Lambertian", | ||
"albedo": { "kind": "SolidColor", "color": [1, 1, 1] } | ||
} | ||
"material": "checkerboard" | ||
}, | ||
{ | ||
"kind": "Quad", | ||
"q": [-200, 800, 100], | ||
"u": [400, 0, 0], | ||
"v": [0, 0, 400], | ||
"material": { | ||
"kind": "DiffuseLight", | ||
"emit": { "kind": "SolidColor", "color": [7, 7, 7] } | ||
}, | ||
"comment": "back wall", | ||
"q": [-2000, 0, 500], | ||
"u": [4000, 0, 0], | ||
"v": [0, 1000, 0], | ||
"material": "checkerboard" | ||
}, | ||
{ | ||
"kind": "Sphere", | ||
"center": [0, 800, -300], | ||
"radius": 300, | ||
"material": "lamp", | ||
"comment": "big ceiling light", | ||
"priority": true | ||
} | ||
], | ||
"priority_objects": [ | ||
"materials": [ | ||
{ | ||
"kind": "Quad", | ||
"q": [-200, 800, 100], | ||
"u": [400, 0, 0], | ||
"v": [0, 0, 400], | ||
"material": { | ||
"kind": "DiffuseLight", | ||
"emit": { "kind": "SolidColor", "color": [7, 7, 7] } | ||
"name": "dark lambertian", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": [0.3, 0.3, 0.3] | ||
} | ||
}, | ||
{ | ||
"name": "white lambertian", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": [0.8, 0.8, 0.8] | ||
} | ||
}, | ||
{ | ||
"name": "checkerboard", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SpatialChecker", | ||
"even": [0.8, 0.8, 0.8], | ||
"odd": [0.3, 0.3, 0.3], | ||
"density": 0.01 | ||
} | ||
}, | ||
{ | ||
"name": "lamp", | ||
"kind": "DiffuseLight", | ||
"emit": { | ||
"kind": "SolidColor", | ||
"color": [5, 5, 5] | ||
} | ||
}, | ||
{ | ||
"name": "copper", | ||
"kind": "Metal", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": { "hex": "#b87333" } | ||
}, | ||
"comment": "big ceiling light", | ||
"priority": true | ||
"fuzz": 0.35 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"time_0": 0, | ||
"time_1": 1, | ||
"background_color": [0.025, 0.025, 0.025], | ||
"camera": { | ||
"look_from": [0, 200, -800], | ||
"look_at": [0, 200, 0], | ||
"up": [0, 1, 0], | ||
"vertical_fov": 40, | ||
"aperture": 30, | ||
"focus_distance": 650 | ||
}, | ||
"objects": [ | ||
{ | ||
"kind": "PLY", | ||
"comment": "happy buddha", | ||
"path": "ply/happy.binary.ply", | ||
"scale": 2200, | ||
"center": [-18.5, -112, -130], | ||
"rotation": [0, 200, 0], | ||
"material": "white lambertian" | ||
}, | ||
{ | ||
"kind": "Quad", | ||
"comment": "floor", | ||
"q": [-2000, 0.01, -500], | ||
"u": [4000, 0, 0], | ||
"v": [0, 0, 1000], | ||
"material": "checkerboard" | ||
}, | ||
{ | ||
"kind": "Quad", | ||
"comment": "back wall", | ||
"q": [-2000, 0, 500], | ||
"u": [4000, 0, 0], | ||
"v": [0, 1000, 0], | ||
"material": "checkerboard" | ||
}, | ||
{ | ||
"kind": "Sphere", | ||
"center": [0, 800, -300], | ||
"radius": 300, | ||
"material": "lamp", | ||
"comment": "big ceiling light", | ||
"priority": true | ||
} | ||
], | ||
"materials": [ | ||
{ | ||
"name": "dark lambertian", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": [0.3, 0.3, 0.3] | ||
} | ||
}, | ||
{ | ||
"name": "white lambertian", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SolidColor", | ||
"color": [0.8, 0.8, 0.8] | ||
} | ||
}, | ||
{ | ||
"name": "checkerboard", | ||
"kind": "Lambertian", | ||
"albedo": { | ||
"kind": "SpatialChecker", | ||
"even": [0.8, 0.8, 0.8], | ||
"odd": [0.3, 0.3, 0.3], | ||
"density": 0.01 | ||
} | ||
}, | ||
{ | ||
"name": "lamp", | ||
"kind": "DiffuseLight", | ||
"emit": { | ||
"kind": "SolidColor", | ||
"color": [5, 5, 5] | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.