Code Monkey home page Code Monkey logo

guc's People

Contributors

expenses avatar ix-dcourtois avatar pablode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

guc's Issues

Proper versioning

guc has a version defined in the top-level CMakeLists.txt, but it is not propagated to the library and application. We should

  • introduce a --version flag to the executable
  • #define the major, minor and patch version numbers in the libguc header
  • write the exact guc version string to the asset Documentation metadatum

Furthermore, it might make sense to include the commit hash in non-release version strings.

`UsdGlTFFileFormat::Read` fails to files with non-filesystem `resolvedPath`s.

Hi! I tried to get guc working with the custom resolver I've been working on but unfortunately it fails upon trying to load the file:
Failed to open "iroh://doc/pajzuzssv2l7wg7iruxixkbc7nfcm42gqfqbmzz5hux4im4v2yea/m5wfirrpirqw2ylhmvseqzlmnvsxilthnr2gmaa.gltf" - unable to parse glTF file: file not found

The problem is that this code assumes that resolvedPath is on the local filesystem:

bool UsdGlTFFileFormat::Read(SdfLayer* layer,
const std::string& resolvedPath,
bool metadataOnly) const
{
cgltf_data* gltf_data = nullptr;
if (!load_gltf(resolvedPath.c_str(), &gltf_data))
{
TF_RUNTIME_ERROR("unable to load glTF file %s", resolvedPath.c_str());
return false;
}

Ideally you'd call something like ArGetResolver().OpenAsset(resolvedPath) to get an ArAsset and then use the bytes from ArAsset::GetBuffer to load the glTF data. This is a bit of a hastle not gonna lie, but it would mean that assets using custom URI schemas (iroh:// for me, but also http://) would load perfectly.

Generate displayColors from materials

We can create a displayColor primvar with 'constant' interpolation by taking the base_color factor or average texture color. It might even be possible to extract vertex colors by unwrapping the UV coordinates.

The generated values are not vertex colors and they should not be referenced by the MaterialX shading graph.

Increase error tolerance

Currently, many errors which occur during conversion are fatal. Revisit some of the handling since an asset with a missing material or mesh is more useful than no asset at all.

USD Sdf plugin

Similar to usd_from_gltf, we could provide an Sdf file format plugin which implicitely converts glTF to USD+MaterialX files.

Automated testing

Set up the testing infrastructure for..

Some open questions are:

  • do we put file tests in a separate repo?
  • what reference renderer to use?
    • USD+MaterialX is barely supported; gatling could be used in the future

Calculate prim extents

The USD glossary says:

Gprims are boundable, and should always submit to computing an extent (even if it be an empty extent), and valid UsdGeom scene description should always provide an authored extent on a gprim that captures its changing shape (if its shape is animated).

We therefore should calculate a prim's bounding box and call SetExtentsHint.

Improve error reporting

Currently, libguc prints error messages and returns false on convert(..). But calling applications may want to handle different types of errors differently. Identify error groups and return error codes instead.

Preserve glTF 'extras' field

Translate the 'extras' field of all glTF entities into a corresponding USD representation. Do we want to dump a single metadatum or do we additionally decode key-value dicts?

more detailed build instructions

Do you happen to have more detailed instructions on how to build this for someone who has never used cmake? Unsure how to build it after cloning the repository.

Create test assets for name generation

guc automatically generates unique names for prims, shading nodes and image files. This functionality is not covered by the Khronos validation and sample models. Custom test assets need to be created.

Subtree instancing

Currently, meshes, cameras, lights and materials are instanced. But the glTF scenegraph is a DAG, which means that hierarchy parts can be instanced, too. Can this behaviour be replicated with USD?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.