KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.14k stars 1.14k forks source link

vertex color suggestion - another set - COLOR_0_s, COLOR_1_s, etc #2120

Open JeffGillin opened 2 years ago

JeffGillin commented 2 years ago

I wanted to suggest another set of slots for vertex colors to include a subdivided set of vertices/colors. The general idea is that vertex painting is very very nice for creating masks to use in pbr workflow, for roughness, specular, glossiness, etc, or to tamper a normal map in certain areas. Of course, coming with benefit of no pixels in your masks due to interpolated nature. But, often not used due to limitation of not having enough vertices to work with (mobile game optimized, for instance), thus subd for vertex colors would be great. There would obviously need to be some mapping stored as well, from unsubd to subd. Less overall data sent to gpu. Not sure all the integration points.
Obviously would need to be built into DCC programs as well to be useful. And Subd might not be the right idea here, but in general, some manner of getting textureless interpolated point color data to be used as a mask in shaders, with whatever mapping/intergration necessary, so we can paint masks with finer grained detail without resorting to textures. I guess for display, there's no way getting around simply adding in additional shader code to use it, but that's expected really. If the data is there in some form as part of the mesh data, we can use.

donmccurdy commented 2 years ago

Some prior discussion of subdiv in:

Similarly, a proposal for procedural materials would probably want to be aware of the MaterialX and procedural texture discussions:

I'd be cautious of adding small, individual features in either of these areas: both subdiv and procedural materials are complex topics with a lot of prior work. We'd want to aim for a planned "end state" in either case – I'm not sure if additional vertex color sets and naming conventions like COLOR_#_s would make sense in the long run compared to proper support for these features.