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

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
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

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?

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

Does the loaded glb have a callback?I want to use ‘ready’ during initialization, but it doesn’t seem to work
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?

We made two glb files, the “test1.glb” is the original without compress, and “test1-basis.glb” was compressed basis. Used “” this command line tool.
Pic1, is the test1.glb, the original quality.

Pic2, is the “test1-basis.glb”, the quality is pretty low(I have imported the basis lib):

I know the basis compress will reduce the quality, but we have no more choice by the command line tool, it doesn’t have more option choice.

But it’s very stranges, When I use the playcanvas modelviewer to open the test1-basis.glb, the materials are better(When stop rotating the model), looks like the modelviewer can optimize the basis compressed texture quality.

@yaustar I have added you as a team member to edit the following project, Please check it, thanks

The model viewer has a multi sampler rendering shader that smooths out jagged rendering lines/edges as you can see in your preview.

The Model Viewer is open source: GitHub - playcanvas/model-viewer: glTF 2.0 model viewer and you can read more about the recent release here: glTF Viewer Arrives on Mobile with AR Support | PlayCanvas

I made an Editor version here (might be slightly outdated now):

And I’ve quickly added it to a fork or your project here: <

However, I would recommend compressing the textures using UASTC compression with Basis instead as that gives a higher quality texture.


Thanks,it works. :smiling_face_with_three_hearts: