Comments (10)
Hi,
our PLY reader and writer is currently limited to built-in attributes only (positions, colors, ..). Any custom attributes are ignored on load. At this moment, generic attributes can be compressed only when the draco::Mesh is constructed through our API directly, but we plan to add support for more attributes to our PLY decoder in near future.
from draco.
Is this an area where contributions would be welcome?
from draco.
@ataber We always welcome contributions, but depending on what you are planning to do, this project may benefit from a closer cooperation with us.
What we are planning to do is to add support for generic metadata for meshes and attributes. This metadata can be then used to hold for example a property name that could be then preserved during the decoding step.
Adding support for metadata would be certainly a relatively big change to our framework which would require some input from our team.
On the other hand, if the scope would be more narrow.. let's say you would be interested in extending our PlyDecoder to support loading of arbitrary PLY properties as GENERIC attributes, then we would definitely welcome this contribution and it would most likely not require our oversight.
from draco.
I think the more narrow change would fit my application's needs. What do GENERIC attributes look like when decoded in JS? I assume they're exposed as a map from attribute name -> list of values?
from draco.
They are just like any other attribute .. just an array of values for all points of the mesh.
But as I mentioned earlier, we currently don't store attribute names... that's why we cannot preserve general attributes that can be found in ply files (and that's what we want to solve with the added metadata).
What you can do to differentiate GENERIC attributes is to use different custom_ids for each attribute (see GeometryAttribute::set_custom_id()
method). Custom id is preserved during encoding and it can be used by the javascript client app .. e.g.:
for (let i = 0; i < dracoGeometry.num_attributes(); i++) {
const attribute = wrapper.GetAttribute(dracoGeometry, i)
if (attribute.attribute_type() === Module.GENERIC) {
if (attribute.custom_id() === 0) {
// attribute is X (e.g. material ids)
}
if (attribute.custom_id() === 1) {
// attribute is Y (e.g. vertex weights)
}
...
}
}
from draco.
Okay, thanks for the hint :)
Looking through the code it looks like it would require another large change to store face properties - is that assessment correct?
from draco.
Not necessarily. We already do have support for storing per-face attributes. You can check our TriangleSoupMeshBuilder
class for an example. It has a method SetAttributeValuesForFace()
that can be used to set per-face attribute values. The similar approach can be applied in the PlyDecoder
as well.
from draco.
I'm closing this issue. If you are still having problems please re-open.
from draco.
This issue seems not be fixed yet in the latest master branch.
Is there any plan recently?
from draco.
Hi @ondys @FrankGalligan I'm trying to do something similar, in that I also need to encode other properties like property float scalar_Scalar_field
. Is there any support for this kind of situation now?
from draco.
Related Issues (20)
- Compilation Error Involving StatusOr and Status Classes in Draco Library HOT 2
- Gstatic, CDNs, and per-domain caching policy HOT 1
- Download links are broken HOT 1
- Support for quads HOT 1
- C++ Documentation Improvement
- Severity Code Description The project file line does not display status Error C2440 "Initialize" : Unable to transfer from "void *" to "tinygltf: : GetFileSizeFunction draco_decoder F: \ resource \ Draco - 1.5.6 \ SRC \ Draco \ IO \ gltf_decoder.cc 489 HOT 2
- Optimizing 3D data with Draco Geometry Compression HOT 1
- Android Studio Build Error
- tex_coord data has no compression
- A problem about pointcloudsequentialencoder HOT 1
- I failed to compress the downsampled point cloud file with draco_encoder. HOT 1
- ld: unknown option: --start-group
- Apple new Privacy manifest files In May HOT 2
- How to open a gltf/glb file, then compress and save it, in C++
- OSS-Fuzz issue 68890
- Only the positions of the point cloud data in the ply file got compressed
- Large amounts of dynamic memory allocation.
- Encoding speed issue when using draco_encoder.js in web browser environment.
- The status.h header file is not compiled HOT 1
- Build Failure of Draco 1.3.6 on red hat 8 with gcc-11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from draco.