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

Converter generates invalid texture coordinates #253

Closed
pjcozzi opened this issue Mar 20, 2014 · 4 comments
Closed

Converter generates invalid texture coordinates #253

pjcozzi opened this issue Mar 20, 2014 · 4 comments

Comments

@pjcozzi
Copy link
Member

pjcozzi commented Mar 20, 2014

Using collada.zip from https://groups.google.com/forum/#!topic/cesium-dev/WKndeTmqEW8

This model loads OK in Mac preview:

image

But once converted to glTF, it is a solid color:

image

A quick tweak to the shader:

gl_FragColor = vec4(v_texcoord0, 0.0, 1.0);

shows that the texture coordinates are black.

This is because the generated semantics between the attributes and parameters are mismatched.

                "texcoord0": {
                    "semantic": "TEXCOORD_2",
                    "type": 35664
                }

TEXCOORD_2 should be TEXCOORD_0.

@fabrobinet
Copy link
Contributor

@pjcozzi There are at least 2 issues with the DAE:

  • <effect id="Effect"> contains in the diffuse slot 2 texture slot, I am not sure what it is supposed to mean, I don't think that is valid.
  • multiple UV sets are referenced as here:
<bind_vertex_input semantic="cityengine_colormap" input_semantic="TEXCOORD" input_set="0"/>
 <bind_vertex_input semantic="cityengine_colormap" input_semantic="TEXCOORD" input_set="1"/>
<bind_vertex_input semantic="cityengine_colormap" input_semantic="TEXCOORD" input_set="2"/>
<bind_vertex_input semantic="cityengine_colormap" input_semantic="TEXCOORD" input_set="3"/>
<bind_vertex_input semantic="cityengine_colormap" input_semantic="TEXCOORD" input_set="4"/>
<bind_vertex_input semantic="cityengine_colormap" input_semantic="TEXCOORD" input_set="5"/>

but only one UV set is defined in the mesh.

@fabrobinet
Copy link
Contributor

I'll dig a bit more and see how to handle this situation in a better way...

@fabrobinet
Copy link
Contributor

Implemented a work-around in dev-6. Model displays correctly now in my viewer.
@pjcozzi just to close the loop, you probably want to the originator of this DAE the issues reported in the comment just above.

@pjcozzi
Copy link
Member Author

pjcozzi commented Apr 23, 2014

OK, thanks @fabrobinet

@pjcozzi pjcozzi added this to the converter v1.0 milestone Apr 30, 2014
@pjcozzi pjcozzi closed this as completed May 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants