-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Losing diffuse
settings when using textures
#726
Comments
You need to create a proper diffuse texture. From the information it looks like you want to multiply the original texture with the scalar. Out of curiosity, what tool did you use to generate this gltf? |
The file says
The file seems to be invalid in various ways. The validator prints a whole lot of warnings and error messages. Most of them refer to
There are no Attached is a glTF that uses a fully embedded representation (i.e. the mesh and the texture are embedded, together with some "default" shaders). But it's true: If you want to take a diffuse texture and a diffuse color into account, this will likely only be possible with custom shaders. |
Time for conformance test of various exporters ? On Thu, Sep 22, 2016 at 10:30 AM, Marco Hutter [email protected]
|
I have been fixing up the THREE.js glTF loaders to the point that they can successfully render this current conversion output and using the latest As you saw, the file was converted via the Open Asset Import Library (https://github.com/assimp/assimp). I haven't been running output through the glTF validator but it feels like that would be a good thing to do while continuing to developing glTF export within that convertor.
Both |
When materials extension (such as KHR_materials_common or FRAUNHOFER_materials_pbr, both are drafts for now) is not used, |
Thanks so much for your contributions!
Do you know if there is a roadmap or tasklist of glTF features that still need to be implemented in assimp. We could help spread the word and I may even be able to find a student interested in working on it. Also, do you have any glTF projects we could showcase with the master list: https://github.com/KhronosGroup/glTF#gltf-tools |
No problem! FWIW, I have now rewritten the existing THREE.js glTF loader if anyone would like to review it: mrdoob/three.js#9786. Maybe I will follow up with a PR to this repo if/when that is merged to point
If a tasklist of glTF features missing from assimp did exist it would look something as follows :)
I'm not aware of any roadmap for the features but I do know that the glTF import/export code in assimp is getting some much needed attention right now.
Both of these things would be great! I think there are a lot of interesting things to work on wrt assimp code. If we can bring that library up to glTF v1.0 standards then we should be able to import from other formats in to glTF consistently and reliably.
Not yet but I may have soon! If anyone wants to spin any of this off in to other Github issues I would be happy to do that. |
Yes, please!
I have a student who will work on gltf-pipeline, and I will be looking for more in October (the project would start in January). Thanks for the task list; I agree it could be a great project. If/when I have an interested student, I will follow-up with you to learn the current assimp glTF state. |
@pjcozzi I have been working on the assimp glTF export. Recently I have been able to update some v1.0 validator issues, exported Can you explain to me more the purpose of the Maybe this discussion can be moved to a more appropriate place. |
gltf-pipeline is about processing glTF models, e.g., glTF goes in and glTF goes out. It overlaps with assimp in some ways since it does optimizations like removing unused meshes, combining meshes, reordering for vertex cache, etc, but it is also glTF-specific in many ways since it, for example, converts glTF to Binary glTF, can add the WEB_quantized_attributes extension, etc. We haven't fully packaged it up yet, but it is still in good enough shape to use; we are already using it as part of the online COLLADA to glTF converter. If you want to discuss gltf-pipeline more, just submit an issue in its repo. |
I think this can be closed? glTF2.0 has distinct |
Agree with @donmccurdy |
The example in the spec for adding textures is as follows:
A number of formats allow adding of both a texture map and separate
diffuse
vec4 values.Is the only way to set textures in glTF to override one of the material attributes (e.g.
diffuse
)? How should we compensate for the loss ofdiffuse
values from the input here?Original model example:
Epona-obj.zip
Same model converted to glTF (adding a texture overwrites the
diffuse
settings in the output):Epona-gltf.zip
The text was updated successfully, but these errors were encountered: