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

Thank you, it’s a good new from the twitter. :smile:

Thanks steven,

Where did you capture this picture? Is it the editor interface?
Why is it different with mine? I don’t know how to get the above menus in my editor.

That is part of my dev tools that I use to debug runtime issues: yaustar.github.io/playcanvas-devtools at master · yaustar/yaustar.github.io · GitHub

1、Should we use your dev tools to do?
2、I have found the following project, it used the js to load the model and use js to contral the exchaging of the material. The only difference is the model in it is json file no glb. Please have a look if the function of the js is similar?
https://playcanvas.com/project/1020966/overview/carconfiguratorbmw1

Completely optional. I use them because it makes my life easier when dealing with runtime issues.

It depends because some parts would be similar and some parts would be different. Without you being more specific, I can’t answer.

I recommend starting from the project I linked and just trying to change the material of the heart at runtime.

Yes, I’m study that project these days, and I found your uber tools and have a problem posted here:

BTW, I’m not programmer, just do first round reserch, and pass the job to our coder :smile:

One more question,if we import a draco glb with fully textured models with material settings, how could we to compress(basis) the textures in the glb? Does them need to be compress basis?

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