×
Menu

NiVertexColorProperty - notes

 
Настройки.
Флаг - по видимости, роли не играет. После экспорта из МАХ всегда 0. SSG также ничего не показывает от смены.
Экстра дата и контроллер - всегда пусто. Это стандартные, наследованные слоты для всех свойств.
 
Vertex Mode — возможные значения.
VERT_MODE_SRC_EMISSIVE
VERT_MODE_SRC_AMB_DIF
VERT_MODE_SRC_IGNORE
 
Lighting Mode — возможные значения.
LIGHT_MODE_EMISSIVE и
LIGHT_MODE_EMI_AMB_DIF.
 
Vertex Mode
VERT_MODE_SRC_EMISSIVE
VERT_MODE_SRC_EMISSIVE
VERT_MODE_SRC_IGNORE
Lighting Mode
VERT_MODE_SRC_EMISSIVE
LIGHT_MODE_EMI_AMB_DIF
LIGHT_MODE_EMISSIVE
 
Объект всегда светлый, вне зависимости от внешнего освещения.
Внешние освещение влияет обычно.
Объект всегда темный, вне зависимости от внешнего освещения.
Освещение в ячейке выключено.
Скриншот из редактора.
Пустая ячейка с темным освещением.
Освещение включено.
Хорошо заметно, что плоскость с лева полностью непрозрачна.
Т.е. альфа свойства полностью блокированы.
 
Обычное значение:
Vertex Mode: VERT_MODE_SRC_IGNORE
Lighting Mode: LIGHT_MODE_EMI_AMB_DIF
Что фактически не играет роли.
Т.е. поведение объекта с этими свойствами = поведению объекта без NiVertexColorProperty.
 
Примечание.
Может создавать проблемы с альфой модели!
Особенно в режиме _EMISSIVE&_EMISSIVE!
Т.е. при наличии этих свойств, прозрачность, на уровне вертексов и на уровне свойств может (и будет) отвалиться!
 
Hrnchamd писал:
Yes, that last one is because it's reading alpha from vertex colour instead of material alpha.
Т.е. этот режим считывает свойства альфы из настроек вертексов, а не из альфа свойств материала!
 
Примечание.
NiVertexColorProperty создаются в МАХе посредством установки в свойствах материала флага "vertex color = on"
Однако, для правильной работы вертексного освещения объектов, эти свойства в качестве отдельного объекта, не нужны вовсе.
Модели без оных работают исправно.
Отчего и возникло предположение, что это рудимент.
Тем более, что модуль беседки имеет флаг блокирующий создание этих свойств при экспорте в ниф файл.
 
Примечание.
Встречается в оригинальных мешах, возможно в виде "нагрузки" т.е. мог быть добавлен ранней версией модуля экспорта.
ФФЕ экспортер, автоматически сообщает эти свойства всем моделям при экспорте.
Возможно здесь это необходимо для правильной работы моделей в игре (Фридом Форсе). (?)
ТЕСэкспортер - режет их на корню.
 
Примечание.
Взаимодействие PPL МГЕ, NiVertexColorProperty и niLight эффектов - не изучалось.
Правильным решением будет удалять эти свойства, кроме особых случаев, где они необходимы по Творческим соображениям.
 

 Выдержка из оригинальной справки. (NDL Gamebryo 1.1)
 
NiVertexColorProperty specifies how each vertex in a piece of geometry is assigned a color. These colors may come from material values, application-supplied vertex colors, dynamic lighting, or a combination thereof. Specific vertex-color generation modes are described in the NiMain reference manual and in the Programming for Special Effects manual section on per-vertex lighting.
 
 NiVertexColorProperty allows the application to control the method used to compute colors for each vertex in a geometry object.  This class enables effects such as static pre-lighting, dynamic lighting, etc.  Note that the Vertex Color Modes from predecessors of Gamebryo have been broken up into two independent controls:  source vertex routing and lighting control.  Source vertex routing indicates whether the source color will be specified by the current NiMaterialProperty or by the object's source vertex colors.  Lighting control indicates which components of the lighting equation are used to determine the final vertex color.
 
Supported Source Vertex Modes
The following source vertex modes are supported by Gamebryo. Note that all source vertex modes are declared in the scope of NiVertexColorProperty, and the names must be qualified as such.
Vertex Mode
Description
SOURCE_IGNORE
Emissive, ambient, and diffuse colors are all specified by the corresponding colors in the NiMaterialProperty.
SOURCE_EMISSIVE
The emissive colors are supplied by the source vertex colors, and ambient and diffuse colors are all specified by the corresponding colors in the NiMaterialProperty.
SOURCE_AMB_DIFF
The ambient and diffuse colors are supplied by the source vertex colors, and emissive colors are all specified by the emissive color in the NiMaterialProperty.
 
Texture and Vertex Color Apply Modes
The final step in texturing is to merge the selected texture color and the vertex colors, if any. The inputs to this process are the selected texture color and alpha for the pixel, the interpolated vertex color and vertex alpha, and the texture apply mode. Notice that we have not mentioned how the vertex colors are computed. This is entirely independent of texturing and is set using NiVertexColorProperty. The texture apply modes, their actions and usage are listed in the table below. Note that for the following table, CR represents the final color, AR represents the final alpha, CT represents the texture color, AT represents the texture alpha, CV represents the vertex color, and AV represents the vertex alpha. Note also that, unless otherwise stated, if a texture has no alpha channel, the alpha channel is assumed to be 1.0 (fully opaque):
Apply Mode
Resulting Color
Alpha
Common Application
APPLY_REPLACE
CR = CT
AR = AT
Basic texturing without any dynamic or static vertex-based lighting
APPLY_DECAL
CR = CT * AT + CV * (1-AT)
AR = AV
Decal or bullet-hole textures on a base untextured surface
APPLY_MODULATE
CR = CT * CV
AR = AT * AV
Texture and final vertex colors and alpha values are multiplied component-by-component.
APPLY_HILIGHT
Platform specific
Platform specific
See renderer manual for details
APPLY_HILIGHT2
Platform specific
Platform specific
See renderer manual for details
 
Supported Lighting Modes
The following lighting modes are supported by Gamebryo. Note that all lighting modes are declared in the scope of NiVertexColorProperty, and the names must be qualified as such.
Lighting Mode
Description
LIGHTING_E
Only the emissive component of the lighting equation is used. No dynamic lights are considered in the lighting process.
LIGHTING_E_A_D
The emissive, ambient, and diffuse components of the lighting equation are all used.