Datasets:

Languages:
English
ArXiv:
License:
mattdeitke commited on
Commit
bbe71f1
1 Parent(s): f634f76

Update README.md

Browse files
Files changed (1) hide show
  1. scripts/rendering/README.md +46 -2
scripts/rendering/README.md CHANGED
@@ -39,11 +39,55 @@ cd ../.. && \
39
 
40
  ## 📸 Example Usage
41
 
42
- After setup, you can render objects using the `main.py` script:
43
 
44
  ```bash
45
  python3 main.py
46
  ```
47
 
48
- USDZ support is experimental. Since Blender does not natively support usdz, we use [this Blender addon](https://github.com/robmcrosby/BlenderUSDZ), but it doesn't work with all types of USDZs. If you have a better solution, PRs are very much welcome 😄!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
 
39
 
40
  ## 📸 Example Usage
41
 
42
+ After setup, we can start to render objects using the `main.py` script:
43
 
44
  ```bash
45
  python3 main.py
46
  ```
47
 
48
+ After running this, you should see 10 zip files located in `~/.objaverse/github/renders`, which correspond to renders of objects from [our example 3D objects repo](https://github.com/mattdeitke/objaverse-xl-test-files):
49
+
50
+ ```bash
51
+ > ls ~/.objaverse/github/renders
52
+ 0fde27a0-99f0-5029-8e20-be9b8ecabb59.zip 54f7478b-4983-5541-8cf7-1ab2e39a842e.zip 93499b75-3ee0-5069-8f4b-1bab60d2e6d6.zip
53
+ 21dd4d7b-b203-5d00-b325-0c041f43524e.zip 5babbc61-d4e1-5b5c-9b47-44994bbf958e.zip ab30e24f-1046-5257-8806-2e346f4efebe.zip
54
+ 415ca2d5-9d87-568c-a5ff-73048a084229.zip 5f6d2547-3661-54d5-9895-bebc342c753d.zip
55
+ 44414a2a-e8f0-5a5f-bb58-6be50d8fd034.zip 8a170083-0529-547f-90ec-ebc32eafe594.zip
56
+ ```
57
+
58
+ If we unzip one of the zip files:
59
+
60
+ ```bash
61
+ > cd ~/.objaverse/github/renders
62
+ > unzip 0fde27a0-99f0-5029-8e20-be9b8ecabb59.zip
63
+ ```
64
+
65
+ we will see that there is a new `0fde27a0-99f0-5029-8e20-be9b8ecabb59` directory. If we look in that directory, we'll find the following files:
66
+
67
+ ```bash
68
+ > ls 0fde27a0-99f0-5029-8e20-be9b8ecabb59
69
+ 000.npy 001.npy 002.npy 003.npy 004.npy 005.npy 006.npy 007.npy 008.npy 009.npy 010.npy 011.npy metadata.json
70
+ 000.png 001.png 002.png 003.png 004.png 005.png 006.png 007.png 008.png 009.png 010.png 011.png
71
+ ```
72
+
73
+ Here, we see that there are 12 renders `[000-011].png`. Each render will look something like one of the 4 images shown below, but likely with the camera at a different location as its location is randomized during rendering:
74
+
75
+ ![temp](https://github.com/allenai/objaverse-xl/assets/28768645/69d79e26-4df1-4bd2-854c-7d3c888adae7)
76
+
77
+ Additionally, there are 12 npy files `[000-011].npy`, which information about the cameras pose for a given render. We can read the npy files using:
78
+
79
+ ```python
80
+ import numpy as np
81
+ array = np.load("000.npy")
82
+ ```
83
+
84
+ where array is now a 3x4 [camera matrix](https://en.wikipedia.org/wiki/Camera_matrix) that looks something like:
85
+
86
+ ```python
87
+ array([[6.07966840e-01, 7.93962419e-01, 3.18103019e-08, 2.10451518e-07],
88
+ [4.75670159e-01, -3.64238620e-01, 8.00667346e-01, -5.96046448e-08],
89
+ [6.35699809e-01, -4.86779213e-01, -5.99109232e-01, -1.66008198e+00]])
90
+ ```
91
+
92
+ **Note.** USDZ support is experimental. Since Blender does not natively support usdz, we use [this Blender addon](https://github.com/robmcrosby/BlenderUSDZ), but it doesn't work with all types of USDZs. If you have a better solution, PRs are very much welcome 😄!
93