Use alpha channel as an mask for an other image.
More...
#include <ProceduralTextureModifiers.h>
Use alpha channel as an mask for an other image.
Can take normal, height or quaternion map as second input.
Map translations
-
Alpha channel: a(0, 255) -> angle(0, 2pi)
-
Coords: r(0,255) -> x(-1, 1)
-
Height map: luminance(0, 255) -> angle(0, 2pi) (axis is Z)
-
Normal map: is blended with the source
Options
-
Rotation: w(0, 1) -> angle(0, 2pi), rest are axis direction coordinates
-
Sensitivity: (0, 255) -> angle(0, 2pi) * map alpha
-
Compensation: How to deal with map
-
Mirror: For broken normal maps
Example:
- Todo:
- Need bugfix
◆ ABNORMALS_COMPENSATION
Methods how to work with parameter map.
Enumerator |
---|
COMPENSATION_NORMAL | Use as a normal map.
|
COMPENSATION_HEIGHT | Use as a height map.
|
COMPENSATION_QUATERNION | Use as a list of quaternion.
|
◆ ABNORMALS_MIRROR
Methods how to fix broken normal maps.
Enumerator |
---|
MIRROR_NONE | None.
|
MIRROR_X_YZ | X : YZ.
|
MIRROR_Y_XZ | Y : XZ.
|
MIRROR_X_Y_Z | X+Y : Z.
|
◆ Abnormals()
Default constructor.
- Parameters
-
pBuffer | Image buffer where to modify the image. |
◆ getName()
Get name of the filter as string.
◆ logMsg()
void Procedural::TextureProcessing::logMsg |
( |
Ogre::String |
msg | ) |
|
|
protectedinherited |
◆ process()
◆ setAxis() [1/2]
Set rotation axis.
- Parameters
-
x | New x coordinate of rotation axis (default 0.0) |
y | New y coordinate of rotation axis (default 0.0) |
z | New z coordinate of rotation axis (default 1.0) |
◆ setAxis() [2/2]
Set rotation axis.
- Parameters
-
◆ setCompensation()
Set compensation method.
- Parameters
-
compensation | Compensation method to use (default COMPENSATION_NORMAL) |
◆ setLog()
void Procedural::TextureProcessing::setLog |
( |
bool |
enable = true | ) |
|
|
inherited |
Enable/Disable logging.
- Parameters
-
enable | true enables logging of filter actions |
◆ setMirror()
Set mirror method.
- Parameters
-
mirror | Compensation method to use (default MIRROR_NONE) |
◆ setParameterImage()
Set parameter image for compensation.
- Parameters
-
image | Pointer to second image (default NULL) |
- Note
- If the parameter image is set to NULL there won't be any compensation.
◆ setRotation() [1/3]
Set rotation angle.
- Parameters
-
rotation | New rotation angle [0, 360] degree (default 0) |
◆ setRotation() [2/3]
Set rotation angle.
- Parameters
-
◆ setRotation() [3/3]
Set rotation angle.
- Parameters
-
rotation | New rotation angle [0.0, 1.0] (default 0.0) |
◆ setSensitivity()
Set sensitivity.
- Parameters
-
sensitivity | New sensitivity value [0, 255] (default 127) |
◆ mBuffer
◆ mLog
bool Procedural::TextureProcessing::mLog |
|
protectedinherited |
◆ mName
The documentation for this class was generated from the following file:
- ProceduralTextureModifiers.h
Gradient & setColours(Ogre::ColourValue colourA, Ogre::ColourValue colourB, Ogre::ColourValue colourC, Ogre::ColourValue colourD)
Sets the colours of the image corners.
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50