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

Custom semantics in morph targets? #1363

Closed
lexaknyazev opened this issue Jun 6, 2018 · 12 comments
Closed

Custom semantics in morph targets? #1363

lexaknyazev opened this issue Jun 6, 2018 · 12 comments

Comments

@lexaknyazev
Copy link
Member

The spec says:

Application-specific semantics must start with an underscore, e.g., _TEMPERATURE.

The spec should be more explicit whether this applies to morph targets (I'd say yes).

/cc @bghgary @donmccurdy @emackey

@donmccurdy
Copy link
Contributor

donmccurdy commented Jun 29, 2018

I would say yes as well; that seems to follow from the requirement that morph target names match the vertex attribute semantics. The requirement should apply to semantics in general, regardless of their use.

@lexaknyazev
Copy link
Member Author

@bghgary @emackey any objections?

@emackey
Copy link
Member

emackey commented Jun 30, 2018 via email

@bghgary
Copy link
Contributor

bghgary commented Jul 2, 2018

Sounds right to me.

@donmccurdy
Copy link
Contributor

Oh, the spec also states:

Each target ... is a dictionary mapping a primitive attribute to an accessor containing Morph Target displacement data, currently only three attributes (POSITION, NORMAL, and TANGENT) are supported.

So, morph targets on COLOR and application-specific semantics would not be allowed without an extension.

@lexaknyazev
Copy link
Member Author

It says "supported", not "allowed". As far as I remember, there wasn't any intention to disallow custom attributes in morph targets. Could we check with implementations?

@donmccurdy
Copy link
Contributor

Ah, I see. three.js will ignore unknown morph target attributes, but the asset will load fine.

@donmccurdy donmccurdy added the needs pull request Issue requires spec clarification or implementation note, and is ready for someone to open a PR. label Oct 10, 2018
@donmccurdy donmccurdy removed the needs pull request Issue requires spec clarification or implementation note, and is ready for someone to open a PR. label Oct 11, 2018
@donmccurdy
Copy link
Contributor

Opened #1464.

@donmccurdy
Copy link
Contributor

donmccurdy commented Oct 11, 2018

It says "supported", not "allowed". As far as I remember, there wasn't any intention to disallow custom attributes in morph targets.

Maybe I'm picking nits here, but how would you define "supported"? If an implementation is allowed but not required to write/read morph targets on application-specific semantics, would an implementation be allowed but not required to write/read morph targets on COLOR?

If the meaning was simply that implementations don't have to support COLOR morphing I'd implement it in a second. 😇

@lexaknyazev
Copy link
Member Author

Morphed COLOR is definitely interesting.
Current spec language could be interpreted the same way as the case with having three UVs (which is technically allowed but not widely supported).

@emackey
Copy link
Member

emackey commented Oct 11, 2018

currently only three attributes (POSITION, NORMAL, and TANGENT) are supported.

So, "supported" is a reference to existing implementations? Maybe we could clarify that, something along the lines of:

Currently only three attributes (POSITION, NORMAL, and TANGENT) are commonly supported, but others such as COLOR and even application-specific semantics that start with an underscore (e.g., _TEMPERATURE) are allowed.

@donmccurdy
Copy link
Contributor

Copying comment (#1464 (comment)) here:

Similar to TEXCOORD_2, should we go a bit farther than that and say that any attribute may be affected by morph targets, and clients must support at least POSITION?

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

4 participants