Skip to content

Commit 0dde7ec

Browse files
authored
- Add "-ra" render args argument to allow for non-default render delegate to be passed in. (#21)
- Rerun examples to apply some recent render fixes.
1 parent 8ac1f10 commit 0dde7ec

11 files changed

Lines changed: 234 additions & 226 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Some initial utilities are provided with more coming on-line as the site / requi
2121
attempt to produce valid USD shading network (See Support Utilities)
2222
- Input geometry (USD file)
2323
- Input camera (USD file)
24-
- Skydome like (A latlong HDR file)
24+
- Skydome light (A latlong HDR file)
2525
- Perform USD validation
2626
- Export just the materials to a USD file.
27-
- Render the corresponding USD file. This uses `usdrecord` currently.
27+
- Render the corresponding USD file. This uses `usdrecord` currently. Render arguments can be passed in to specify the render delegate to use for instance. The default is GL.
2828
- Misc options for output for test
2929
suite compatibility:
3030
- Use material name for file name
-724 KB
Binary file not shown.

documents/html/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ <h2><a class="anchor" id="autotoc_md1"></a>
126126
<li>Preprocess the MaterialX file to attempt to produce valid USD shading network (See Support Utilities)</li>
127127
<li>Input geometry (USD file)</li>
128128
<li>Input camera (USD file)</li>
129-
<li>Skydome like (A latlong HDR file)</li>
129+
<li>Skydome light (A latlong HDR file)</li>
130130
<li>Perform USD validation</li>
131131
<li>Export just the materials to a USD file.</li>
132-
<li>Render the corresponding USD file. This uses <code>usdrecord</code> currently.</li>
132+
<li>Render the corresponding USD file. This uses <code>usdrecord</code> currently. Render arguments can be passed in to specify the render delegate to use for instance. The default is GL.</li>
133133
<li>Misc options for output for test suite compatibility:<ul>
134134
<li>Use material name for file name</li>
135135
<li>Create in subfolder with name being the input MaterialX name</li>

documents/html/mtlx2usd_8py_source.html

Lines changed: 224 additions & 220 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ <h3>Available Components</h3>
125125
attempt to produce valid USD shading network (See Support Utilities)</li>
126126
<li>Input geometry (USD file)</li>
127127
<li>Input camera (USD file)</li>
128-
<li>Skydome like (A latlong HDR file)</li>
128+
<li>Skydome light (A latlong HDR file)</li>
129129
<li>Perform USD validation</li>
130130
<li>Export just the materials to a USD file.</li>
131-
<li>Render the corresponding USD file. This uses <code>usdrecord</code> currently.</li>
131+
<li>Render the corresponding USD file. This uses <code>usdrecord</code> currently. Render arguments can be passed in to specify the render delegate to use for instance. The default is GL. </li>
132132
<li>Misc options for output for test
133133
suite compatibility:<ul>
134134
<li>Use material name for file name</li>

source/materialxusd/mtlx2usd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def main():
7777
parser.add_argument("-sf", "--subfolder", action="store_true", help="Save output to subfolder named <input materialx file> w/o extension.")
7878
parser.add_argument("-pp", "--preprocess", action="store_true", help="Attempt to pre-process the MaterialX file.")
7979
parser.add_argument("-ip", "--imagepaths", default="", help="Comma separated list of search paths for image path resolving. ")
80+
parser.add_argument("-ra", "--renderargs", default="", help="Additional render arguments.")
8081

8182
# Parse arguments
8283
args = parser.parse_args()
@@ -263,6 +264,9 @@ def main():
263264
if camera_prim:
264265
render_command += f' --camera "{camera_prim.GetName()}"'
265266
logger.info(f"> Rendering using command: {render_command}")
267+
if args.renderargs:
268+
render_command += f' {args.renderargs}'
269+
print('>'*20, render_command)
266270
sys.stdout.flush()
267271
os.system(f"{render_command} > nul 2>&1" if os.name == "nt" else f"{render_command} > /dev/null 2>&1")
268272
#os.system(render_command)
277 KB
Loading
305 KB
Loading

tests/examples/starfield/material_starfield_out_float_glslfx.png renamed to tests/examples/starfield/starfield_out_float_glslfx.png

File renamed without changes.

tests/examples/starfield/material_starfield_out_glslfx.png renamed to tests/examples/starfield/starfield_out_glslfx.png

File renamed without changes.

0 commit comments

Comments
 (0)