#Applying Draco compression to PLY files
23 messages · Page 1 of 1 (latest)
@sturdy atlas the PLY format cannot contain Draco compressed-data, perhaps what you heard is that the Draco library can take a PLY or OBJ input, and output a compressed .drc file that contains the same geometry? THREE.DRACOLoader would be able to load that file if so.
But .drc doesn't support materials, animation, or scene graphs, it's just a mesh or points as far as I know...
If you have a glTF file containing a point cloud you could use Meshopt compression on that. But Draco integration into glTF does not support point clouds currently.
Interesting thanks @foggy musk, I must have misunderstood then. I’m trying to decide what’s more optimal, a PLY compressed and converted into a .drc, a meshopt compressed .ply, or a PLY converted into a vertices only .gltf with Draco a la blender
But it seems that meshopt is the probably the way to go, it seems faster than Draco files in decode time
Especially on mobile
I’m trying to make it procedural so I can upload a ply, it gets encoded by three with meshopt, perhaps by a button press, and then the scene renders the meshopt encoded ply
gltf-transform can't apply meshopt to ply files though right?
I think I would have to use gltf-pack
glTF Transform can only read glTF files yes. Can gltfpack read PLY?
If you've got the points in Blender (and dissolve any triangles connecting them) then export with the "loose edges" option enabled you'll get a glTF file containing only points. Don't use Blender's compression options in that case. Then you can meshopt-compress it with glTF Transform (or gltfpack, I assume)
There are only two formats that can contain Draco compression today — glTF and USD (not counting .drc). And only one that can contain Meshopt compression – glTF.
So even if your input data is a PLY, it'll have to be something else in its compressed form...
I see, in the Meshopt documentation on github it's not super clear what file format will be output when Point Cloud compression is applied, I couldn't find an example. https://github.com/zeux/meshoptimizer
I think most people using meshopt are either (a) using it in a custom pipeline that outputs custom data (no standard format) for their game, or (b) using it via gltfpack with glTF input and output.
I know the creator is a Roblox dev so I assume it's part of their pipeline.
If he says that it can compress point clouds I would also assume he means the input is PLY files, not GLTF with Loose Edges/Vertices, otherwise that would not be a very efficient/useful but I've asked on the Github for him to clarify further.
a game like roblox would be built on custom data formats, not anything like PLY or GLTF I think
it does look like gltfpack also accepts OBJ input, i don't see anything about PLY though.
not GLTF with Loose Edges/Vertices, otherwise that would not be a very efficient/useful
Hm why wouldn't this be efficient?
The Blender export option happens to be named "loose vertices", but that's a Blender naming. Point clouds are a dedicated geometry type within glTF, and it stores points in compact binary format.
For effiency I mean workflow wise, like you're using an app like Sitescape to produce PLY files from 3d scanning then having to import them into blender everytime to export as gltf isn't as efficient.