3MFConsortium/spec_core

Vertex color spec is unclear.

Closed this issue · 2 comments

JC3 commented

Section 1.3 of the Materials Extension spec reads:

The 3MF core specification (4.1.4 Triangles) describes properties e.g. color to be specified for each vertex of a triangle. Specifically, an sRGB triplet can be assigned to each vertex of a triangle.

Section 4.1.4 of the core spec reads:

The property group is specified by the pid attribute, if different than the property group defined at the object-level.
...
The properties applied to each vertex (p1, p2, p3) allow property gradients to be defined across the triangle, where interpolation of the property is defined as the linear convex combination.
...
If the properties defined on the triangle are from a group (see Chapter 5), they MUST NOT form gradients, as interpolation of base materials is not defined in this core specification. Therefore p1, p2 and p3 MUST be equal or unspecified.


I can't make any sense of this because:

  • The Materials spec explicitly states that the Core spec allows for vertex colors, as sRGB triplets assigned to each vertex of a face.
  • The Core spec mentions "property groups", but the term "property group" has no definition in the spec (not even in the glossary), and so it is not clear what a "property group" is.
  • The only occurrences of the phrase "property group" in the Core spec seem to be in the context of <basematerials>, which is implied to be a "property group". It is the only thing the Core spec identifies as such.
  • The Core spec also says that if the properties defined on a triangle are from the <basematerials> group, then all three property group indices must be the same if specified.
  • However, since the only "property group" seems to be <basematerials>, and since all three property indices in a face must be the same if they are in <basematerials>, then this implies that all three property indices in a face must always be the same, as there doesn't seem to be any other type of "property group" to choose from.
  • Additionally, the only use of an sRGB color (ST_ColorValue) in the core spec is as the displaycolor attribute of a base material. When taken with the above, this implies that sRGB colors can't be assigned per vertex in a face (as I can't see any other place where a color could appear besides a base material, which restricts p1/p2/p3 to be identical).
  • Therefore, the statement in the Materials spec that "Specifically, an sRGB triplet can be assigned to each vertex of a triangle" in the Core spec seems false: Not only does the Core spec not define anything that could assign sRGB triplets to individual vertices, it doesn't even allow for general materials to be supplied per vertex -- the restriction on p1==p2==p3 means that materials are per face in the Core spec.
  • It also makes the statement in the Core spec regarding "property" (also undefined) gradients and interpolation a bit confusing, as there doesn't seem to be any "property" defined that can have a gradient or be interpolated.

What am I missing? Where does the Core spec define sRGB triplets that can be assigned to each vertex of a triangle?

Also, if p1, p2, and p3 must always be identical (since they must refer to a "property group", of which there is only one: base materials -- for which they must be identical), why are there three separate p's and what is it referring to when it mentions interpolation?

The core spec only defines the BaseMaterials as property group. Since that is a material property, it can't be interpolated, since it defines the material. This is just for using the core spec alone.
However when extended with the materials spec, other property groups could be define. For example the ColorGroup, which defines the surface color as being "painted". In this case interpolation between vertex properties is allowed.
The core spec just set the based for a behaviour that is defined in the materials spec.

JC3 commented