×
Меню
Индекс

Vertex Colors & Apply Mode(EN)

 

 Выдержка из оригинальной справки. (NDL Gamebryo 1.1)
 
Vertex Colors
The Vertex Colors sub-panel allows you to enable use of the vertex colors. Note that the "Assign Vertex Colors" utility, "Vertex Paint" modifier, or a third party tool (e.g. Enlight, Luminaire, or Lightscape) must be used to set the vertex colors before they are used in the Gamebryo Shader.
The On checkbox instructs Gamebryo to use the vertex colors assigned by a utility or modifier. The Src Mode field indicates which fields in the Material sub-panel the vertex colors will replace.
· IGNORE -The vertex colors will be ignored and is only used in very specialized situations (such as a programmer requesting it for something that you won't see in the exported scene, but are needed. Like excluding all red vertices from terrain movement for example.
· EMISSIVE - mode the vertex colors replace the Emittance color. Used for static lighting of a scene.
· AMB_DIFF - mode the vertex colors replace both the Ambient and Diffuse colors. Normal method of using vertex colors.
The Light Mode field specifies which components of the lighting equation are used.
· E mode only uses the Emittance color
· E_A_D mode uses the Emittance, Ambient, and Diffuse colors.
If the vertex colors are turned off or the "Src Mode" is set to IGNORE, the vertex colors disappear and only the dynamic lighting remains. If the "Light Mode" is set to "E" then lighting is ignored and only the vertex colors take effect. This is what you would use for completely static lighting.
Another useful setting is changing the "Src Mode" to AMB_DIFF while the "Light Mode" remains E_A_D. This setting causes the vertex colors to override the Ambient and Diffuse colors but both the vertex colors and the dynamic lighting are still used.
The final combination of AMB_DIFF for "Src Mode" and E for "Light Mode" should not be used because the vertex colors do not override the Emittance color, makes the material appear black. In other words, neither vertex colors nor dynamic lighting have an effect.
 
Vertex Colors and Multitexture
 
While multitexturing may be used to simulate very complex lighting, many applications choose to use their "multitexture budget" for complex effects, and use vertex colors for simpler lighting effects. This approach makes sense for many circumstances. However, because of the complexity of the multitexturing pipeline, application developers should understand how Gamebryo applies vertex colors in the presence of multitexturing.
Gamebryo applies vertex colors (if they are specified using SetApplyMode in the NiTexturingProperty) to the stage of the texture pipeline that is marked in the full pipeline diagram above. Frequently, this stage is neither the first nor last stage in the pipeline.
If there is no Base Map, then the texture pipeline applies the vertex colors in such a way that it appears that vertex colors were applied to a white Base Map. In general, this technique does not require the renderer to insert an extra pass with a white texture. In most multitextured situations, the texture pipeline can apply the vertex colors to another pass or set of passes to simulate this effect, though there are occasions where an extra texture stage is required for the vertex colors.
 

Apply Mode
This sub-panel allows the user to specify how textures interact with the lighting and vertex colors. There are three possible modes: REPLACE, DECAL, and MODULATE (HILIGHT and HILIGHT2; are specialized modes for the PlayStation 2 only.)
· In REPLACE mode the lighting and vertex colors are ignored and the texture is just placed on the surface. This mode is appropriate if all lighting effects have been rolled into the texture or no lighting effects are desired.
· The DECAL mode acts like REPLACE mode wherever the texture is opaque but uses the lights and vertex colors in the transparent regions. This mode is useful when a textured decal will be placed over an un-textured surface but its utility is limited since the opaque part of the decal will not be lit.
· Finally, the MODULATE mode causes the texture to be lit by both the dynamic lights and vertex colors and is the default Apply Mode.
 
1.  If the Src Mode is Amb-Dif, then the vertex colors will be modulated onto your textures.
This modulation will make them darker only, since white represents the original texture value.
Dynamic lights (3ds max lights) in your scene will still affect them.
 
2. If the Src Mode is Emissive, the vertex colors are 'self-illuminating' your textures.
They are statically lit by the vertex colors.
This is the mode you would use for a completely static scene.
If they are included in a light list, the vertex colors will be additive to the light color and will eventually wash out to white.
Creating this mode in Max is tricky, as Max likes to include lights.
 
3.  Ignore is a third mode, Ignore should not be used for lighting, as it is for using the vertex colors for
non-visual data.
 
Из справки MaxImmerse.(С)
The “Vertex Colors” sub-panel allows you to enable use of the vertex colors. Note that the “Assign Vertex Colors” utility, “Vertex Paint” modifier, or a third party tool (e.g. Enlight, Luminaire, or Lightscape) must be used to set the vertex colors before they are used. The “On” checkbox instructs NetImmerse to use the vertex colors assigned by a utility or modifier. The “Src Mode” field indicates which fields in the “Material” sub-panel the vertex colors will usurp. In IGNORE mode the vertex colors will be ignored and is only used in very specialized situations (such as a programmer requesting it for something that you won’t see in the exported scene, but need so that something else works). In EMISSIVE mode the vertex colors replace the Emittance color. In AMB_DIFF mode the vertex colors replace both the Ambient and Diffuse colors. The “Light Mode” field specifies which components of the lighting equation are used. The “E” mode only uses the Emittance color while the “E_A_D” mode uses the Emittance, Ambient, and Diffuse colors. The “Common Uses and Examples of the NetImmerse Shader” section details how the vertex color parameters can be set to create some standard lighting effects.