You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add support to try and grab PNG if available instead of EXR.
If not then download EXR and use OIIO to convert if package is installed.
* Make sure to remap the exr references in mtlx to png.
* Fix packaged data for PolyHaven. Extract out all MTLX data during build so it's put into the package.
* Patch up bad PolyHaven files. Will use exr as reference but have a jpg as download.
* Cleanup.
* Update renders and docs for polyhaven.
<p>Query all materials fom PhysicallyBased and convert them to all support shading models. Save the material list and corresponding MaterialX files in the default output location. The build will include this information Python package under the <code>data</code> folder.</p>
<p>Query all materials fom GPUOpen. Extract out a few material packages (zip). Save the material lists, material names and unzipped packages (MaterialX and images) in the default output location. The build will include this information Python package under the <code>data</code> folder.</p>
<p>Note that this does not download any of the content for each asset, but instead<br>
660
+
extract information into a file called <code>polyhaven_materialx_assets.json</code> for later usage.. The build process will include a file with this name under the <code>data</code> as part of the Python package. This avoids having to query the PolyHaven API repeatedly.</p>
661
+
<ul>
662
+
<li>
663
+
<p>The user can either use a local version of this file by specifying the path the file as shown below, where an optional <code>--data_folder</code> argument can be used to specify the location of the file.</p>
<p><code>-x</code> or <code>--extract</code> to extract the content of the package (MaterialX and images) into a folder. By default the package will be downloaded but not extracted.</p>
677
+
</li>
678
+
<li>
679
+
<p><code>-exr</code> or <code>--keep_exr</code> to keep the EXR files if they are included in the package. By default the equivalent PNG files are downloaded or EXR files are converted to PNG files. The latter requires the <code>OpenImageIO</code> package to be installed.</p>
680
+
<ul>
681
+
<li>Note that if EXR images are remapped then the MaterialX file references<br>
682
+
are also remapped in the <code>.mtlx</code> file.</li>
683
+
</ul>
684
+
</li>
685
+
<li>
686
+
<p><code>-r</code> or <code>--download_resolution</code> to specify the resolution of the images to download. By default the lowest resolution images are downloaded. The user can specify "1k", "2k", "4k" or "8k".</p>
687
+
</li>
688
+
</ol>
689
+
<h4>GPUOpen (NodeJS)</h4>
655
690
<p>The utility can be run from the <code>javascript\JsGPUOpenLoaderPackage</code> folder as follows:</p>
@@ -295,7 +296,7 @@ npm run [build/start] # Build distribution or run the package
295
296
296
297
<h3>Command Line Interfaces</h3>
297
298
298
-
<h4>Python</h4>
299
+
<h4>PhysicallyBased</h4>
299
300
300
301
- Query all materials fom PhysicallyBased and convert them to all support shading models. Save the material list and corresponding MaterialX files in the default output location. The build will include this information Python package under the <code>data</code> folder.
301
302
@@ -307,13 +308,16 @@ npm run [build/start] # Build distribution or run the package
307
308
```sh
308
309
materialxMaterials physbased
309
310
```
311
+
<h4>GPUOpen</h4>
310
312
311
313
- Query all materials fom GPUOpen. Extract out a few material packages (zip). Save the material lists, material names and unzipped packages (MaterialX and images) in the default output location. The build will include this information Python package under the <code>data</code> folder.
-or by count. In this case the first 10 assets with MaterialX resources will be extracted.
340
347
```sh
341
-
polyHavenLoaderCmd.py --fetch -c 10
348
+
polyHavenLoaderCmd.py -fe -c 10
342
349
```
343
350
344
-
- Scan locally downloaded MaterialX asset information to download.
351
+
Note that this does not download any of the content for each asset, but instead
352
+
extract information into a file called `polyhaven_materialx_assets.json` for later usage.. The build process will include a file with this name under the <code>data</code> as part of the Python package. This avoids having to query the PolyHaven API repeatedly.
353
+
354
+
- The user can either use a local version of this file by specifying the path the file as shown below, where an optional `--data_folder` argument can be used to specify the location of the file.
1. `-x` or `--extract` to extract the content of the package (MaterialX and images) into a folder. By default the package will be downloaded but not extracted.
369
+
370
+
2. `-exr` or `--keep_exr` to keep the EXR files if they are included in the package. By default the equivalent PNG files are downloaded or EXR files are converted to PNG files. The latter requires the `OpenImageIO` package to be installed.
371
+
- Note that if EXR images are remapped then the MaterialX file references
372
+
are also remapped in the `.mtlx` file.
373
+
374
+
3. `-r` or `--download_resolution` to specify the resolution of the images to download. By default the lowest resolution images are downloaded. The user can specify "1k", "2k", "4k" or "8k".
375
+
376
+
<h4>GPUOpen (NodeJS)</h4>
351
377
352
378
The utility can be run from the `javascript\JsGPUOpenLoaderPackage` folder as follows:
0 commit comments