Material vector: Difference between revisions
Jump to navigation
Jump to search
NvC DmN CH (talk | contribs) m (an RGB... -> a RGB) |
Deprecated (talk | contribs) (Define vector2, vector3, vector4 for linking) |
||
Line 1: | Line 1: | ||
A '''material vector''' is a collection of values used with some [[material]] commands. They most often represent a [[RGB]] color. | A '''material vector''' is a collection of values used with some [[material]] commands. They most often represent a [[RGB]] color. | ||
__NOTOC__ | |||
== Syntax == | == Syntax == | ||
Line 12: | Line 12: | ||
* Values inside <code>[</code>square brackets<code>]</code> are used as-is, often for [[normal]]s . For colours this normally ranges from 0-1. | * Values inside <code>[</code>square brackets<code>]</code> are used as-is, often for [[normal]]s . For colours this normally ranges from 0-1. | ||
* Values inside <code>{</code>curly brackets<code>}</code> are divided by 255, so that standard RGB 0-255 values can be used. | * Values inside <code>{</code>curly brackets<code>}</code> are divided by 255, so that standard RGB 0-255 values can be used. | ||
* Between | * Between two to four values can be used, depending on the requirements of the parameter. Listed below: | ||
====vector2==== | |||
: A vector with two values. | |||
====vector3==== | |||
: A vector with three values. | |||
====vector4==== | |||
: A vector with four values. | |||
== Accessing == | == Accessing == |
Revision as of 11:33, 7 June 2019
A material vector is a collection of values used with some material commands. They most often represent a RGB color.
Syntax
$scale "[1 1]" $color "[1 1 1]" $color "{255 255 255}" $envmaptint "{100 0 58}" $vec4 "[1 2 3 4]"
- Quotes are always required, because there are spaces in the value.
- Values inside
[
square brackets]
are used as-is, often for normals . For colours this normally ranges from 0-1. - Values inside
{
curly brackets}
are divided by 255, so that standard RGB 0-255 values can be used. - Between two to four values can be used, depending on the requirements of the parameter. Listed below:
vector2
- A vector with two values.
vector3
- A vector with three values.
vector4
- A vector with four values.
Accessing
Access an individual component of a material vector like this:
$my_vector[0] $my_vector[1] // etc.