diff --git a/src/tydra/render-data.cc b/src/tydra/render-data.cc index 4b04fd31..979eac37 100644 --- a/src/tydra/render-data.cc +++ b/src/tydra/render-data.cc @@ -3909,6 +3909,8 @@ bool RenderSceneConverter::ConvertMesh( } } + dst.is_single_indexable = is_single_indexable; + dst.prim_name = mesh.name; dst.abs_path = abs_path.full_path_name(); dst.display_name = mesh.metas().displayName.value_or(""); diff --git a/src/tydra/render-data.hh b/src/tydra/render-data.hh index 5042a59e..2f1ee36d 100644 --- a/src/tydra/render-data.hh +++ b/src/tydra/render-data.hh @@ -810,6 +810,7 @@ struct MaterialSubset { // Currently normals and texcoords are converted as facevarying attribute. struct RenderMesh { +#if 0 // deprecated. // // Type of Vertex attributes of this mesh. // @@ -825,14 +826,19 @@ struct RenderMesh { // Facevaring(no VertexArray indices). This would impact // rendering performance. }; +#endif std::string prim_name; // Prim name std::string abs_path; // Absolute Prim path in Stage std::string display_name; // `displayName` Prim metadataum - VertexArrayType vertexArrayType{VertexArrayType::Facevarying}; + // true: all vertex attributes are 'vertex'-varying. i.e, an App can simply use faceVertexIndices to draw mesh. + // false: some vertex attributes are 'facevarying'-varying. An app need to decompose 'points' and 'vertex'-varying attribute to 'facevarying' variability to draw a mesh. + bool is_single_indexable{false}; + + //VertexArrayType vertexArrayType{VertexArrayType::Facevarying}; - std::vector points; // varying is 'vertex'. + std::vector points; // varying is always 'vertex'. /// /// Initialized with USD faceVertexIndices/faceVertexCounts in GeomMesh. diff --git a/src/tydra/usd-export.cc b/src/tydra/usd-export.cc index fbc41c7c..df203850 100644 --- a/src/tydra/usd-export.cc +++ b/src/tydra/usd-export.cc @@ -492,15 +492,15 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std:: uint64_t target_id = target_idMap.at(target.first); std::vector &weights = ts_weights.at(float_to_double(tc)); - DCOUT("weights.size " << weights.size() << ", target_id " << target_id); + //DCOUT("weights.size " << weights.size() << ", target_id " << target_id); weights[size_t(target_id)] = target.second[t].value; } } - DCOUT("ts_weights.cbegin " << ts_weights.cbegin()->first); - DCOUT("ts_weights.cbegin isnan" << std::isnan(ts_weights.cbegin()->first)); + //DCOUT("ts_weights.cbegin " << ts_weights.cbegin()->first); + //DCOUT("ts_weights.cbegin isnan" << std::isnan(ts_weights.cbegin()->first)); if ((ts_weights.size() == 1) && (std::isnan(ts_weights.cbegin()->first))) { - DCOUT("static blendshape weights"); + //DCOUT("static blendshape weights"); // Author as static(default) value. std::vector ts(blendShapes.size()); for (size_t i = 0; i < ts_weights.cbegin()->second.size(); i++) { @@ -509,7 +509,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std:: dst->blendShapeWeights.set_value(ts); } else { - DCOUT("timeSampled blendshape weights"); + //DCOUT("timeSampled blendshape weights"); Animatable> ts; for (const auto &s : ts_weights) { ts.add_sample(s.first, s.second);