atteneder / glTFast

Efficient glTF 3D import / export package for Unity
Other
1.22k stars 249 forks source link

Unable to export draco compressed GLB file at runtime : DracoUnity package needs to be installed #661

Closed Sov3rain closed 4 days ago

Sov3rain commented 9 months ago

Describe the bug I can't figure out how to export a Draco compressed GLB file. I installed all packages available from the scope registry with the following versions:

I added an assembly definition file in my script folder: image

My export script looks like this:

var exportSettings = new ExportSettings
{
    Format = GltfFormat.Binary,
    FileConflictResolution = FileConflictResolution.Overwrite,
    Compression = Compression.Draco,
    DracoSettings = new()
    {
        positionQuantization = 12
    }
};

var exporter = new GameObjectExport(exportSettings, logger: logger);
exporter.AddScene(exportables);

bool success = await exporter.SaveToFileAndDispose(Application.persistentDataPath + "/export.glb");

I still get the following error: DracoUnity package needs to be installed in order to support glTF extension KHR_draco_mesh_compression!

I can export non-compressed files with no issue.

Expected behavior I would like to be able to export draco-compressed GLB files at runtime.

Desktop (please complete the following information):

Muhammad079 commented 7 months ago

Did you find any solutions there? @Sov3rain ?

Sov3rain commented 7 months ago

Did you find any solutions there? @Sov3rain ?

Unfortunately, no. Draco compression is not our top priority right now and we clearly need help on this one.

monkyver commented 6 months ago

hello, is meshoptimizer supported instead?

atteneder commented 4 days ago

You need to install Draco for Unity 5.0.0 or newer (generally the latest version is recommended).

Note: If you still use the original DracoUnity package (com.atteneder.draco), transition to the one in the link above.

hth

atteneder commented 4 days ago

hello, is meshoptimizer supported instead?

Meshopt compression is supported for import only atm. No immediate plans to do export/compression.