Polygons - Vertex attributes

I will encounter models where a single polygon has some vertices with RGB values set, and other vertices with RGB values not set (ie. calculated from lights).

I can’t see from the COLLADA spec how this will be modelled: will it be possible to give the IDs in the

element a value of (for example) -1 to indicate value is not set?

I’ve looked at how the Maya COLLADA plugin currently handles this. For polygons with non-grey materials exporting and then reimporting causes significant changes in visual appearance,

A triangle that has “unset” attributes like color in your example really has some default value supplied by the tool environment. For example the missing colors on those vertices are going to be made white (or possibly black).

COLLADA doesn’t model this use case as stated. The schema for the [b]

[/b] element requires the indices to be non-negative integers. Supporting an “ignore” value such as -1 during data streaming/processing has been brought up before. In this particular case the trick is not going to save any storage as <array> still needs to have a pad value and so it might as well be the proper default value.

On a related note, we have been exploring ways to support sparse vertex attribute data as part of the skinning design in COLLADA 1.1. As an example, skin vertices have a variable number of joint weights that need schema representation.

That is a bug in the Maya plugin then.