Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:syoyo/tinyusdz into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Sep 19, 2023
2 parents 7382d19 + 3c38014 commit 743e6e8
Show file tree
Hide file tree
Showing 46 changed files with 3,664 additions and 859 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
* Tydra: Handy data structure converter for rendering https://github.com/syoyo/tinyusdz/issues/31
* MaterialX https://github.com/syoyo/tinyusdz/issues/86
* USD + MateriralX + PBR rendering example using https://github.com/lighttransport/pbrlab
* Improve support for Blender USD export/import
* Improve interoperability with Blender USD export/import
* tusdview(TinyUSDZ version of usdview)

## "What if" Experimental feature

* Gaussian Splatting support? https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/

## Build status

| | Linux | Windows | macOS | iOS | Android |
Expand Down Expand Up @@ -81,8 +85,9 @@ Remaining tasks for v0.8.0 release are writing examples, demos and utility funct
* [ ] Basic C API(`c-tinyusd`) for language bindings
* [ ] [examples/c_api_example](examples/c_api_example)
* [ ] Basic Python binding
* [ ] Write simple SDL viewer example(2023 Summer expected)
* [ ] Write iOS and Android example(2023 Summer expected)
* [ ] Write simple SDL viewer example(2023 Winter expected)
* [ ] Write iOS and Android example(2023 Winter expected)
* [ ] Write Vision OS example?(2024 expected)
* [ ] Vulkan or OptiX/HIP RT raytracing viewer example
* [ ] USD <-> glTF converter example
* There is an independent work of USD to glTF binary GLB converter: https://github.com/fynv/usd2glb
Expand Down Expand Up @@ -290,8 +295,8 @@ Edit path to MSVC SDK and Windows SDK in `bootstrap-clang-cl-win64.bat`, then
### Tools and Examples

* [tusdcat](examples/tusdcat/) Parse USDZ/USDA/USDC and print it as Ascii(similar to `usdcat` in pxrUSD).
* [usda_parser](examples/usda_parser/) Parse USDA and print it as Ascii.
* [usdc_parser](examples/usdc_parser/) Parse USDC and print it as Ascii.
* Deprecated. Use `tusdcat` [usda_parser](examples/usda_parser/) Parse USDA and print it as Ascii.
* Deprecated. Use `tusdcat` [usdc_parser](examples/usdc_parser/) Parse USDC and print it as Ascii.
* [Simple SDL viewer](examples/sdlviewer/)
* Separated CMake build provided: See [Readme](examples/sdlviewer/README.md)
* [api_tutorial](examples/api_tutorial/) Tutorial of TinyUSDZ Core API to construct a USD scene data.
Expand Down
1 change: 1 addition & 0 deletions data/materialx/StandardSurface/chess_set/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
texture files are omitted to save git repo size.
28 changes: 28 additions & 0 deletions data/materialx/StandardSurface/standard_surface_brass_tiled.mtlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<materialx version="1.38" colorspace="lin_rec709" fileprefix="../../../Images/">
<nodegraph name="NG_brass1">
<tiledimage name="image_color" type="color3">
<input name="file" type="filename" value="brass_color.jpg" colorspace="srgb_texture" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
</tiledimage>
<tiledimage name="image_roughness" type="float">
<input name="file" type="filename" value="brass_roughness.jpg" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
</tiledimage>
<output name="out_color" type="color3" nodename="image_color" />
<output name="out_roughness" type="float" nodename="image_roughness" />
</nodegraph>
<standard_surface name="SR_brass1" type="surfaceshader">
<input name="base" type="float" value="1" />
<input name="base_color" type="color3" value="1, 1, 1" />
<input name="specular" type="float" value="0" />
<input name="specular_roughness" type="float" nodegraph="NG_brass1" output="out_roughness" />
<input name="metalness" type="float" value="1" />
<input name="coat" type="float" value="1" />
<input name="coat_color" type="color3" nodegraph="NG_brass1" output="out_color" />
<input name="coat_roughness" type="float" nodegraph="NG_brass1" output="out_roughness" />
</standard_surface>
<surfacematerial name="Tiled_Brass" type="material">
<input name="surfaceshader" type="surfaceshader" nodename="SR_brass1" />
</surfacematerial>
</materialx>
132 changes: 132 additions & 0 deletions data/materialx/StandardSurface/standard_surface_brick_procedural.mtlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0"?>
<materialx version="1.38" colorspace="lin_rec709" fileprefix="../../../Images/">
<nodegraph name="NG_BrickPattern">
<input name="brick_color" type="color3" value="0.661876, 0.19088, 0" uiname="Brick Color" uifolder="Color" />
<input name="hue_variation" type="float" value="0.083" uimin="0" uimax="1" uiname="Hue Variation" uifolder="Color" />
<input name="value_variation" type="float" value="0.787" uimin="0" uimax="1" uiname="Value Variation" uifolder="Color" />
<input name="roughness_amount" type="float" value="0.853" uimin="0" uimax="1" uiname="Roughness Amount" uifolder="Roughness" />
<input name="dirt_color" type="color3" value="0.56372, 0.56372, 0.56372" uiname="Dirt Color" uifolder="Dirt" />
<input name="dirt_amount" type="float" value="0.248" uimin="0" uimax="1" uiname="Dirt Amount" uifolder="Dirt" />
<input name="uvtiling" type="float" value="3" uisoftmin="1" uisoftmax="16" uiname="UV Tiling" uifolder="Texturing" />
<multiply name="node_multiply_5" type="color3">
<input name="in1" type="color3" nodename="node_mix_6" />
<input name="in2" type="float" nodename="node_tiledimage_float_7" />
</multiply>
<mix name="node_mix_8" type="color3">
<input name="fg" type="color3" nodename="node_multiply_5" />
<input name="bg" type="color3" nodename="node_multiply_9" />
<input name="mix" type="float" nodename="node_tiledimage_float_10" />
</mix>
<constant name="node_color_11" type="color3">
<input name="value" type="color3" value="0.263273, 0.263273, 0.263273" />
</constant>
<multiply name="node_multiply_9" type="color3">
<input name="in1" type="color3" nodename="node_color_11" />
<input name="in2" type="float" nodename="node_tiledimage_float_7" />
</multiply>
<rgbtohsv name="node_rgbtohsv_12" type="color3">
<input name="in" type="color3" interfacename="brick_color" />
</rgbtohsv>
<combine3 name="node_combine3_color3_13" type="color3">
<input name="in1" type="float" nodename="node_multiply_14" />
<input name="in2" type="float" value="0" />
<input name="in3" type="float" nodename="node_multiply_15" />
</combine3>
<add name="node_add_16" type="color3">
<input name="in1" type="color3" nodename="node_combine3_color3_13" />
<input name="in2" type="color3" nodename="node_rgbtohsv_12" />
</add>
<hsvtorgb name="node_hsvtorgb_17" type="color3">
<input name="in" type="color3" nodename="node_add_16" />
</hsvtorgb>
<subtract name="node_subtract_18" type="float">
<input name="in1" type="float" nodename="node_add_19" />
<input name="in2" type="float" value="0.35" />
</subtract>
<multiply name="node_multiply_14" type="float">
<input name="in1" type="float" nodename="node_subtract_18" />
<input name="in2" type="float" interfacename="hue_variation" />
</multiply>
<multiply name="node_multiply_15" type="float">
<input name="in1" type="float" nodename="node_add_19" />
<input name="in2" type="float" nodename="node_multiply_20" />
</multiply>
<clamp name="node_clamp_0" type="color3">
<input name="in" type="color3" nodename="node_mix_8" />
</clamp>
<multiply name="node_multiply_1" type="float">
<input name="in1" type="float" nodename="node_divide_21" />
<input name="in2" type="float" nodename="node_tiledimage_float_22" />
</multiply>
<max name="node_max_1" type="float">
<input name="in1" type="float" nodename="node_tiledimage_float_10" />
<input name="in2" type="float" value="0.00001" />
</max>
<divide name="node_divide_21" type="float">
<input name="in1" type="float" interfacename="roughness_amount" />
<input name="in2" type="float" nodename="node_max_1" />
</divide>
<mix name="node_mix_6" type="color3">
<input name="fg" type="color3" interfacename="dirt_color" />
<input name="bg" type="color3" nodename="node_hsvtorgb_17" />
<input name="mix" type="float" nodename="node_multiply_23" />
</mix>
<multiply name="node_multiply_23" type="float">
<input name="in1" type="float" interfacename="dirt_amount" />
<input name="in2" type="float" nodename="node_tiledimage_float_24" />
</multiply>
<multiply name="node_multiply_25" type="float">
<input name="in1" type="float" interfacename="hue_variation" />
<input name="in2" type="float" nodename="node_tiledimage_float_26" />
</multiply>
<add name="node_add_19" type="float">
<input name="in1" type="float" nodename="node_multiply_25" />
<input name="in2" type="float" nodename="node_tiledimage_float_7" />
</add>
<multiply name="node_multiply_20" type="float">
<input name="in1" type="float" interfacename="value_variation" />
<input name="in2" type="float" nodename="node_tiledimage_float_26" />
</multiply>
<normalmap name="node_normalmap_3" type="vector3">
<input name="in" type="vector3" nodename="node_tiledimage_vector3_27" />
</normalmap>
<convert name="node_convert_1" type="vector2">
<input name="in" type="float" interfacename="uvtiling" />
</convert>
<tiledimage name="node_tiledimage_vector3_27" type="vector3">
<input name="file" type="filename" value="brick_normal.jpg" />
<input name="uvtiling" type="vector2" nodename="node_convert_1" />
</tiledimage>
<tiledimage name="node_tiledimage_float_22" type="float">
<input name="file" type="filename" value="brick_roughness.jpg" />
<input name="uvtiling" type="vector2" nodename="node_convert_1" />
</tiledimage>
<tiledimage name="node_tiledimage_float_10" type="float">
<input name="file" type="filename" value="brick_mask.jpg" />
<input name="uvtiling" type="vector2" nodename="node_convert_1" />
</tiledimage>
<tiledimage name="node_tiledimage_float_7" type="float">
<input name="file" type="filename" value="brick_base_gray.jpg" />
<input name="uvtiling" type="vector2" nodename="node_convert_1" />
</tiledimage>
<tiledimage name="node_tiledimage_float_26" type="float">
<input name="file" type="filename" value="brick_variation_mask.jpg" />
<input name="uvtiling" type="vector2" nodename="node_convert_1" />
</tiledimage>
<tiledimage name="node_tiledimage_float_24" type="float">
<input name="file" type="filename" value="brick_dirt_mask.jpg" />
<input name="uvtiling" type="vector2" nodename="node_convert_1" />
</tiledimage>
<output name="base_color_output" type="color3" nodename="node_clamp_0" />
<output name="specular_roughness_output" type="float" nodename="node_multiply_1" />
<output name="normal_output" type="vector3" nodename="node_normalmap_3" />
</nodegraph>
<standard_surface name="N_StandardSurface" type="surfaceshader">
<input name="base_color" type="color3" nodegraph="NG_BrickPattern" output="base_color_output" />
<input name="specular_roughness" type="float" nodegraph="NG_BrickPattern" output="specular_roughness_output" />
<input name="normal" type="vector3" nodegraph="NG_BrickPattern" output="normal_output" />
</standard_surface>
<surfacematerial name="M_BrickPattern" type="material">
<input name="surfaceshader" type="surfaceshader" nodename="N_StandardSurface" />
</surfacematerial>
</materialx>
16 changes: 16 additions & 0 deletions data/materialx/StandardSurface/standard_surface_carpaint.mtlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<materialx version="1.38" colorspace="lin_rec709">
<standard_surface name="SR_carpaint" type="surfaceshader">
<input name="base" type="float" value="0.5" />
<input name="base_color" type="color3" value="0.1037792, 0.59212029, 0.85064936" />
<input name="specular" type="float" value="1.0" />
<input name="specular_color" type="color3" value="1.0, 1.0, 1.0" />
<input name="specular_roughness" type="float" value="0.4" />
<input name="specular_anisotropy" type="float" value="0.5" />
<input name="coat" type="float" value="1" />
<input name="coat_roughness" type="float" value="0" />
</standard_surface>
<surfacematerial name="Car_Paint" type="material">
<input name="surfaceshader" type="surfaceshader" nodename="SR_carpaint" />
</surfacematerial>
</materialx>
Loading

0 comments on commit 743e6e8

Please sign in to comment.