-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
MaterialX: Add normal, tangent, texcoord, geomcolor, position space support #27456
MaterialX: Add normal, tangent, texcoord, geomcolor, position space support #27456
Conversation
It would be compatible in any case, if we proceed it would be interesting to support index as we did in |
Thanks! Could you point me in the right direction for getting the UV index so I can remove the comment? |
I think that if ( element === 'texcoord' ) {
const index = this.getChildByName( 'index' );
const indexValue = parseInt( index.value );
node = uv( indexValue );
} |
It seems positive to me to do this implementation. I added something like. class VertexColorNode extends AttributeNode {
constructor( index = 0 ) {
super( null, 'vec4' );
this.isVertexColorNode = true;
this.index = index;
}
getAttributeName( /*builder*/ ) {
const index = this.index;
return 'color' + ( index > 0 ? index : '' );
}
...
} |
OK, added both. I unfortunately don't have a file at hand to test multi-UV and also none for testing multi-color (seems Blender only exports the first color channel). |
…upport rename to VertexColorNode move vertex color fallback to VertexColorNode remove unused Vector4 import add index support to UV and color nodes linting another rename
605a78c
to
b6b703f
Compare
…upport (mrdoob#27456) rename to VertexColorNode move vertex color fallback to VertexColorNode remove unused Vector4 import add index support to UV and color nodes linting another rename
Description
Adds support for geometry attributes and (partial) parsing of geometry attribute space as described in the title.
There are two
// TODO
comments in the code:cc @sunag
This contribution is funded by Needle