Rust library for parsing COLLADA files

Notice: This library is built around files exported from Blender 2

piston_collada

.

.74

Issues

Collection of the latest Issues

zraktvor

zraktvor

0

Expectation

The COLLADA-Specification lists different ways to reference nodes. Among them are the elements IDREF_array(page 5-44), Name_array(page 5-94) and SIDREF_array(page 5-130). To correctly treat them, piston_collada should use their values as references to the attributes id, name and sid respectively.

Problem

Currently piston_collada loads a Name_array with the joint_names here: https://github.com/PistonDevelopers/piston_collada/blob/591b66761c0c9a12a98e700b7a0d39edb649f9fc/src/document.rs#L508-L509

and then later compares them with Joint.name here: https://github.com/PistonDevelopers/piston_collada/blob/591b66761c0c9a12a98e700b7a0d39edb649f9fc/src/document.rs#L667-L678

But Joint.name was set the id attribute here: https://github.com/PistonDevelopers/piston_collada/blob/591b66761c0c9a12a98e700b7a0d39edb649f9fc/src/document.rs#L460

This bug is not caught by the existing cache files, because name and id are the same there. The incorrect handling is not only a derivation from the spec, but leads to incorrect handling of actual exported collada files. In the following examples from other projects, is visible that both Blender and ColladaMaya may set the the name attribute to a different value then the idattribute and mean the name attribute in Name_array.

Example1

In three.js is the following example, where the Name_array with the joints here: https://github.com/mrdoob/three.js/blob/c7d06c02e302ab9c20fe8b33eade4b61c6712654/examples/models/collada/skin_and_morph.dae#L385-L393

refers to the node here, where the referenced name joint1 is in the name attribute and not the id attribute: https://github.com/mrdoob/three.js/blob/c7d06c02e302ab9c20fe8b33eade4b61c6712654/examples/models/collada/skin_and_morph.dae#L552-L555

Example2

As a more complex example, where blender does this, serves the following file from the game 0AD, where the Name_array here: https://github.com/0ad/0ad/blob/412f1d0da275a12df16e140fca7523590e5f7cfe/binaries/data/mods/public/art/meshes/skeletal/elephant_asian_male.dae#L86-L88

references the nodes from here onwards always by there name: https://github.com/0ad/0ad/blob/412f1d0da275a12df16e140fca7523590e5f7cfe/binaries/data/mods/public/art/meshes/skeletal/elephant_asian_male.dae#L449-L474

bmatthieu3

bmatthieu3

0

Hello,

I would like to know if it can be possible to obtain for each animation the translation & scaling vectors + the quaternion instead of the final matrix4x4. Maybe we could create an enum

I propose this because I think it is more easy to interpolate between keyframes if we have 2 LocRotScale than 2 Matrix4. I suppose there may be some problems when directly interpolating the coeffs of a Matrix4 or maybe I am wrong ?

best,

schell

schell

discussion
0

Is this field ever used? I can't find anything in the collada spec that mentions it. Maybe it's left over from where this library was ported from?

emberian

emberian

1

This issue was automatically generated. Feel free to close without ceremony if you do not agree with re-licensing or if it is not possible for other reasons. Respond to @cmr with any questions or concerns, or pop over to #rust-offtopic on IRC to discuss.

You're receiving this because someone (perhaps the project maintainer) published a crates.io package with the license as "MIT" xor "Apache-2.0" and the repository field pointing here.

TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that license is good for interoperation. The MIT license as an add-on can be nice for GPLv2 projects to use your code.

Why?

The MIT license requires reproducing countless copies of the same copyright header with different names in the copyright field, for every MIT library in use. The Apache license does not have this drawback. However, this is not the primary motivation for me creating these issues. The Apache license also has protections from patent trolls and an explicit contribution licensing clause. However, the Apache license is incompatible with GPLv2. This is why Rust is dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for GPLv2 compat), and doing so would be wise for this project. This also makes this crate suitable for inclusion and unrestricted sharing in the Rust standard distribution and other projects using dual MIT/Apache, such as my personal ulterior motive, the Robigalia project.

Some ask, "Does this really apply to binary redistributions? Does MIT really require reproducing the whole thing?" I'm not a lawyer, and I can't give legal advice, but some Google Android apps include open source attributions using this interpretation. Others also agree with it. But, again, the copyright notice redistribution is not the primary motivation for the dual-licensing. It's stronger protections to licensees and better interoperation with the wider Rust ecosystem.

How?

To do this, get explicit approval from each contributor of copyrightable work (as not all contributions qualify for copyright, due to not being a "creative work", e.g. a typo fix) and then add the following to your README:

and in your license headers, if you have them, use the following boilerplate (based on that used in Rust):

It's commonly asked whether license headers are required. I'm not comfortable making an official recommendation either way, but the Apache license recommends it in their appendix on how to use the license.

Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these from the Rust repo for a plain-text version.

And don't forget to update the license metadata in your Cargo.toml to:

I'll be going through projects which agree to be relicensed and have approval by the necessary contributors and doing this changes, so feel free to leave the heavy lifting to me!

Contributor checkoff

To agree to relicensing, comment with :

Or, if you're a contributor, you can check the box in this repo next to your name. My scripts will pick this exact phrase up and check your checkbox, but I'll come through and manually review this issue later as well.

  • @stjahns
  • @bvssvni
  • @Potpourri

Information - Updated May 01, 2022

Stars: 24
Forks: 20
Issues: 5

Rust library for Self Organising Maps (SOM)

Add rusticsom as a dependency in Cargo

Rust library for Self Organising Maps (SOM)

Rust library for parsing configuration files

The 'option' can be any string with no whitespace

Rust library for parsing configuration files

Rust library for the Pimoroni Four Letter pHAT

This library aims to port ht16k33 (or rather a fork, as of right now) so credit goes to ht16k33-diet

Rust library for the Pimoroni Four Letter pHAT

Rust library for emulating 32-bit RISC-V

This library can execute instructions against any memory and register file that implements

Rust library for emulating 32-bit RISC-V

Rust library for connecting to the IPFS HTTP API using Hyper/Actix

You can use actix-web as a backend instead of hyper

Rust library for connecting to the IPFS HTTP API using Hyper/Actix

Rust library to manipulate file system access control lists (ACL) on macOS, Linux, and FreeBSD

This module provides two high level functions, getfacl and setfacl

Rust library to manipulate file system access control lists (ACL) on macOS, Linux, and FreeBSD

Rust library translation (rust-src/rust-std/stdlib/rustlib translation)

This is the place to translate Having a documentation in your native language is essential if you don't speak English, and still enjoyable even if...

Rust library translation (rust-src/rust-std/stdlib/rustlib translation)

Rust library for using Infrared hardware decoders (For example a Vishay TSOP* decoder),

enabling remote control support for embedded project

Rust library for using Infrared hardware decoders (For example a Vishay TSOP* decoder),

Rust library for interaction with the OriginTrail Decentralized Knowledge Graph

open up an issue on this repository and let us know

Rust library for interaction with the OriginTrail Decentralized Knowledge Graph

Rust library for low-level abstraction of MIPS32 processors

This project is licensed under the terms of the MIT license

Rust library for low-level abstraction of MIPS32 processors
Facebook Instagram Twitter GitHub Dribbble
Privacy