Skip to content

Commit

Permalink
Merge branch 'dev' into rendermesh-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Apr 17, 2024
2 parents 934b7f1 + 3e808fc commit ff84bf4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* MaterialX https://github.com/syoyo/tinyusdz/issues/86
* USD + MateriralX + PBR rendering example using https://github.com/lighttransport/pbrlab
* Improve interoperability with Blender USD export/import https://github.com/syoyo/tinyusdz/issues/98
* Example viewer
* Example viewer(work in progress)
* [examples/openglviewer](examples/openglviewer) OpenGL viewer
* [examples/sdlviewer](examples/sdlviewer) Software raytracing viewer

Expand Down Expand Up @@ -80,9 +80,10 @@ NOTE: Windows ARM64 binary is provided using cross-compiling. Its not well teste

TinyUSDZ is in v0.8.0 release candidate.
Core loading feature(both USDA and USDC) is now working and production-grade(And no seg fault for corrupted USDA/USDC/USDZ input).
Somewhat working Tydra framwork for rendering USD model with OpenGL/Vulkan-like renderer. https://github.com/syoyo/tinyusdz/issues/148

v0.8.0 is Flattened scene only(i.e, USDA/USDC generated by using pxrUSD's `usdcat --flatten` or USDZ scene).
Composition features are work-in-progress(experimental Composition feature support in v0.8.0. Better composition feature in next major release v0.9.0(Q4/2023 expected) planned)
Composition features are work-in-progress(experimental Composition feature support in v0.8.0. Better composition feature in next major release v0.9.0(Q3/2024 expected) planned)

Remaining tasks for v0.8.0 release are writing examples, demos and utility functions(Tydra. Especially access to Material/Shader attributes).

Expand All @@ -105,9 +106,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 Winter expected)
* [ ] Write iOS and Android example(2023 Winter expected)
* [ ] Write Vision OS example?(2024 expected)
* [ ] Write simple SDL viewer example(2024 Summer expected)
* [ ] Write iOS and Android example(2024 Winter expected)
* [ ] Write Vision OS example?
* [ ] 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
17 changes: 11 additions & 6 deletions src/pprinter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ std::string print_prim_metas(const PrimMeta &meta, const uint32_t indent) {

// TODO: deprecate meta.meta and remove it.
for (const auto &item : meta.meta) {
ss << print_meta(item.second, indent + 1, item.first);
ss << print_meta(item.second, indent + 1, true, item.first);
}

// for (const auto &item : meta.stringData) {
Expand Down Expand Up @@ -704,7 +704,8 @@ std::string print_attr_metas(const AttrMeta &meta, const uint32_t indent) {

// other user defined metadataum.
for (const auto &item : meta.meta) {
ss << print_meta(item.second, indent, item.first);
// attribute meta does not emit type_name
ss << print_meta(item.second, indent, /* emit_type_name */false, item.first);
}

for (const auto &item : meta.stringData) {
Expand Down Expand Up @@ -1981,14 +1982,14 @@ std::string print_customData(const CustomDataType &customData,
ss << "{\n";
}
for (const auto &item : customData) {
ss << print_meta(item.second, indent + 1, item.first);
ss << print_meta(item.second, indent + 1, true, item.first);
}
ss << pprint::Indent(indent) << "}\n";

return ss.str();
}

std::string print_meta(const MetaVariable &meta, const uint32_t indent,
std::string print_meta(const MetaVariable &meta, const uint32_t indent, bool emit_type_name,
const std::string &varname) {
std::stringstream ss;

Expand All @@ -2013,11 +2014,15 @@ std::string print_meta(const MetaVariable &meta, const uint32_t indent,
}
ss << pprint::Indent(indent) << "dictionary " << name << " = {\n";
for (const auto &item : pv.value()) {
ss << print_meta(item.second, indent + 1, item.first);
ss << print_meta(item.second, indent + 1, /* emit_type_name */true, item.first);
}
ss << pprint::Indent(indent) << "}\n";
} else {
ss << pprint::Indent(indent) << meta.type_name() << " " << name << " = "
ss << pprint::Indent(indent);
if (emit_type_name) {
ss << meta.type_name() << " ";
}
ss << name << " = "
<< pprint_value(meta.get_raw_value()) << "\n";
}

Expand Down
2 changes: 1 addition & 1 deletion src/pprinter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ std::string print_xformOps(const std::vector<XformOp> &xformOps,
std::string print_attr_metas(const AttrMeta &meta, const uint32_t indent);

// varname = optional variable name which is used when meta.get_name() is empty.
std::string print_meta(const MetaVariable &meta, const uint32_t indent,
std::string print_meta(const MetaVariable &meta, const uint32_t indent, bool emit_type_name,
const std::string &varname = std::string());
std::string print_prim_metas(const PrimMeta &meta, const uint32_t indent);
std::string print_customData(const CustomDataType &customData,
Expand Down

0 comments on commit ff84bf4

Please sign in to comment.