How do I edit the draco compressed glb in the editor?

Assuming you would be using the project I linked to above, you would have to compress the textures in the GLB before importing them into PlayCanvas.

You would also have to import the Basis library into the PlayCanvas project.

You mean we could compress(basis) the textures outside the playcanvas? How can we do this? any tool?

I don’t know any tools offhand but you would be looking for something that would do KTX2 texture compression

gltf transform can be used from command line and can apply mesh / texture compressions

2 Likes

Thanks, We will try it.

Thank you Steven,
Please read the question at the post:

To visulize the imported glb in the editor is very important to us :smile:

It was already answered this (UK) morning :slight_smile:

Many thanks, I got it! Just missed it :sweat_smile:

How to change materials of heart at runtime?


With the model loaded by this script, I can get the material using the following method, but I can’t change it at present
image
Is there any good method or case for reference?

What you have done is correct, you will just need to change the material on the meshInstance via https://developer.playcanvas.com/api/pc.MeshInstance.html#material


Is my writing wrong? I get the color of the material but can’t change it

Can you possible a project that shows the issue please?

https://playcanvas.com/project/1021630/overview/loading-draco-compressed-glbs

The issue is that you didn’t parse the loadGlb script for the new color attribute so this.color is null

After parsing, it works as expected

okay,I know what the problem is. thx :slight_smile:

Can the entities added in the script have custom names(entity name)?

You can rename any Entity via https://developer.playcanvas.com/api/pc.Entity.html#name

Does the loaded glb have a callback?I want to use ‘ready’ during initialization, but it doesn’t seem to work
image
I want to konw when this glb loaded

That commented code should work. Can you please post a new project with the issue?

A post was merged into an existing topic: Is there any way to get the callback loaded from a glb?