google / google/draco

Assigning .mtl to .drc local object decoded at Runtime

Open
#589 0 comments 1 reaction 0 assignees View on GitHub
help wanted Unity
Dominant language
C++
Stars
7.5k
Forks
1.1k
Avg merge
47m
Merged PRs (30d)
1

Description

Hi!
I have an example.drc.bytes which is a result of a Draco compression via Draco-encoder through command shell, the command I run was:
`draco_endoder -i example.obj -o example.drc --metadata`
I used --metadata hoping that the compressed version of my obj would save the informations about the material to point to:
`mtllib example.mtl`
And it actually does ( if I decompress it via draco_decoder ) the line is still there.

Then I followed [the Draco tutorial](https://github.com/google/draco/tree/master/unity) in order to add the .dll and the scripts needed for the Runtime Decompression ( DracoDecodingObjects.cs ), so, I added in the Assets/Resources the files I thought I needed for this purpose: example.drc.bytes, example.mtl, example.jpg(the texture prova.mtl links to). The object is correctly shown but only the Geometry is visible, no textures or anything.

I thought that the problem is that the function called by DracoDecodingObjects.cs converts a .drc file directly into a mesh for unity, and without being a .obj file the Object can never retrieve the mtllib link in his body.

If you need more details about it please tell me, but I hope I explained myself.. Basically I need a way to use the .mtl file once the .drc file is decoded and ready to be shown in my scene.

Thank you in advance :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.