Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Color when downloaded in gltf #16

Closed
lookquad opened this issue Mar 24, 2020 · 5 comments
Closed

No Color when downloaded in gltf #16

lookquad opened this issue Mar 24, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@lookquad
Copy link

lookquad commented Mar 24, 2020

Hi, when we download the derivative in gltf format, there is no color in the model. Is there some way to get the original colors from the dwg file into the gltf or obj file that can be used in on web using libraries like three.js
Thank You

@petrbroz
Copy link
Owner

Hi!

As I mentioned on SO, try the following:

  • open the gltf file, find the "materials" section, and see what color values you see in individual materials
  • if the values are [0,0,0,0], it really is a problem with the conversion
  • if the values are non-zero, perhaps the model has colors but is not lit up properly? What application are you viewing the gltf in? Please note that when viewing a gltf model in a three.js app, you need to use at least an ambient light otherwise the model will stay black
  • if you're still having issues, please consider sharing your DWG file (confidentially) via forge (dot) help (at) autodesk (dot) com, and we'll debug the translation

@lookquad
Copy link
Author

Thank you for considering this.
I saw the values and it is having only two members in "materials" with values [0, 0, 0, 1] and another [1, 1, 1, 1].
I have sent the email with dwg file to the above address. Please have a look.

Thank you

@petrbroz
Copy link
Owner

Thank you for the additional info, and for providing the sample DWG. Here's what's going on:

  • in case of DWG files, the Forge Model Derivative service outputs the colors as vertex colors instead of materials
  • the forge-convert-utils library (used by this vscode extension) does not support meshes with vertex colors yet

I will add support for vertex colors to the library, and then bring the new version into this project.

@petrbroz petrbroz self-assigned this Mar 24, 2020
@petrbroz petrbroz added the enhancement New feature or request label Mar 24, 2020
@petrbroz
Copy link
Owner

petrbroz commented Mar 24, 2020

The fix is now in develop branch and is going live with the next release (1.5.1).

@lookquad
Copy link
Author

lookquad commented Mar 25, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants