3. The <map channel> In dmax stores a total of 100 numbers ranging from 0 to 99. In Max, these channels can be used to obtain the vertex color channel and each UV coordinate channel information. Channel 0 of the map channel usually represents the vertex color of the model.
; Channel 1 is the default UV texture channel, and other users with other texture channels are activated.
1. The meshop. getnumcpvverts function obtains the number of color vertices in a model mesh. <Channel 0> corresponding to the Mapping Methods model. The premise is that the model specifies the vertex color. If the vertex color is not specified, getnumcpvverts throws <runtime error>.
2. The meshop. getnummaps function returns the maximum value of the model map channel. Generally, the value of map channel is 0-, and the 0 channel is the vertex color channel, and the 1-99 channel is the texture UV channel.
When an object is created in a scenario without any texture pasters or vertex colors, when applied to the model using meshop. getnummaps, the minimum value 2 is returned, indicating that the two channels are enabled. One is channel 0 (vertex color), and the other is Channel 1 (default UV channel ). If you add a UV modifier such as uvw mapping to the model, if the map channel applied to the modifier is set to 1, the function returns 2 (0 and 1 ), because Channel 1 is the default texture channel. If set to 2, 3 (0, 1, 2) is returned ). If it is set to 5 directly, 6 is returned. But! It does not mean that all channels 2 to 5 Except channel 0 and channel 1 are activated (the Resolution channel is enabled in getmapsupport ).
3. meshop. getmapsupport queries whether a map channel is activated. By default, Channel 1 (default UV channel) is always activated. Channel 0 is activated only when vertex color is specified, therefore, when writing a script to export color vertex data, you can use this function to query whether channel 0 returns true to determine whether the vertex color is specified.
Maxscript map channel notes