Create lines that can be randomly cracked or follow a normal map.
More...
#include <ProceduralTextureModifiers.h>
Create lines that can be randomly cracked or follow a normal map.
Number, length and variation of cracked lines can be set; high quality mode is available.
Normal tracking
Lines are drawn where normals look at sides (r, g channels are set tosomething different than 127), and according the difference between alpha channel and normals elevation. By default, normals are rotated 90 degrees with X axis flipped, so that they "wrap" objects.
Example:
◆ CRACK_LENGTH_DECISION
Methods how to create line length.
Enumerator |
---|
LENGTH_DECISION_RANDOM | Use a random number generator.
|
LENGTH_DECISION_CONSTANT | Use a constant value.
|
LENGTH_DECISION_NORMAL_BASED | Use a normal map.
|
◆ CRACK_QUALITY
High quality settings.
Enumerator |
---|
QUALITY_HIGH_OFF | Switch high quality off.
|
QUALITY_ALPHA | Use alpha channel.
|
QUALITY_SUBPIXEL | Use sub pixel block.
|
◆ Crack()
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()
◆ setColour() [1/2]
Set the colour to draw.
- Parameters
-
◆ setColour() [2/2]
Set the colour to draw.
- Parameters
-
red | Red value of drawing colour [0.0, 1.0] (default 1.0) |
green | Green value of drawing colour [0.0, 1.0] (default 1.0) |
blue | Blue value of drawing colour [0.0, 1.0] (default 1.0) |
alpha | Alpha value of drawing colour [0.0, 1.0] (default 1.0) |
◆ setCount()
Set the number of generated lines.
- Parameters
-
count | New number of lines to generate (default 100) |
◆ setLength()
Set the minimum length of generated line segments.
- Parameters
-
length | New minimal length of the generated line segments (default 255) |
◆ setLengthDecision()
Set method for calculating the line segments length.
- Parameters
-
lengthdecision | New decision length (default LENGTH_DECISION_RANDOM) |
◆ setLog()
void Procedural::TextureProcessing::setLog |
( |
bool |
enable = true | ) |
|
|
inherited |
Enable/Disable logging.
- Parameters
-
enable | true enables logging of filter actions |
◆ setParameterImage()
Set parameter image for normal mapping.
- Parameters
-
image | Pointer to second image (default NULL) |
- Note
- If the parameter image is set to NULL there won't be any compensation.
◆ setQuality()
Set method for high quality painting.
- Parameters
-
quality | New high quality setting (default QUALITY_HIGH_OFF) |
◆ setSeed()
Set the seed for "random" number generator.
- Parameters
-
seed | Seed value where to set the random number generator (default 5120) |
◆ setVariation()
Set the smoothness of generated lines.
- Parameters
-
variation | New value for the smoothness of the generated lines (default 64) |
◆ 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