Maxscript map channel notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.