-
Notifications
You must be signed in to change notification settings - Fork 29
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
gltf image node is created with incorrect type (color3) when type is vector3. #48
Comments
@kwokcb The reason for that is that QuiltiX didn't detect the node type names from the gltf image node definitions correctly. It works for all nodes that I'm aware of, but it still feels like a dirty workaround. |
Hi @RichardFrangenberg , |
Using the output type doesn't seem like a safe way too. For example there are the |
Hi @RichardFrangenberg , Yes, you are correct. The more general logic is found in Node::getNodeDef() Here it will match by:
For 4. there still exists a problem if you don't specify enough unique inputs on the node instance. There is a logged issue for this I believe. However it is the most complete logic check that I know of in use, except for 5.
|
With this getNodeDef() function I can get the correct definition from a mtlx node, but there is still the problem how QuiltiX should populate the type dropdown for nodes like the Extract node. |
For this context, yes the nodedef names in the std library weren't really intended for user facing parsing. I also do not like exploding all variants and am interested in the solution to this. All I can think of is to allow output type as the primary selection key and where ambiguous input type, version, target, namespace as subsequent keys. If you handle input type that should at least handle extract. You can use On the flip-side would you be interested in looking into a "standardized" naming scheme. I do this for new node definitions myself and reflect this in the output file name. Then there is a sequence of sub-strings that can be parsed. e.g.
(std disclaimer, I had been looking at this for LookdevX before moving on). Yet even with this anyone can create a nodedef name which does not parse well. Thus the suggestion to parse the actual attributes on the nodedef. |
I changed the approach how the nodedefinitions are chosen when a mtlx file gets loaded. The only not so clean code, which is left, is how the displayname is generated from the nodedefname. It would be great if MaterialX would provide displaynames in the future, but for the moment the current implementation in QuiltiX does the job. I would be fine with enforcing a naming convention for nodedefs created in QuiltiX. But as you said, there might be nodedefs coming from other applications, which don't follow this convention. |
Issue
A gltf image node which is of type vector3 ends up being a color3 after load for some reason.
This is an example file:
The errors you get are:
This be because the
gltf_image
type is considered to becolor3
.If you save it out you get:
The text was updated successfully, but these errors were encountered: