|
|
6 years ago | |
|---|---|---|
| .. | ||
| OilPaintingEffect.cs | 6 years ago | |
| OilPaintingEffect.cs.meta | 6 years ago | |
| Readme.md | 6 years ago | |
| Readme.md.meta | 6 years ago | |
| Readme.pdf | 6 years ago | |
| Readme.pdf.meta | 6 years ago | |
| howto.png | 6 years ago | |
| howto.png.meta | 6 years ago | |
Readme.md
Oil Painting - Unity3D Image Effect
(c) 2018 by flockaroo (Florian Berger) - email: flockaroo@gmail.com
How to use
Select your camera node and then simply add "OilPaintingEffect" script to camera components (can be found in Assets/flockaroo/OilPainting/). You can drag/drop it to there or choose it from the menu (Component/Scripts/Flockaroo/OilPainting).
Warning!! The subfolder "flockaroo_[effect name]" in "Resources" is needed by the effect script for unique identification of files and should not be removed or renamed.
Parameters
The shader provides the following parameters:
Input/Output
| Parameter | function |
|---|---|
| Input Texture | take this texture as input instead of the camera |
| Render To Texture | render to texture instead of screen |
| Output Texture | texture being rendered to if above is checked |
| Output Mipmap | generate mipmap for output texture |
Main faders
| Parameter | function |
|---|---|
| Effect Fade | 0 = effect image ... 1 = original content |
| Pan Fade | 0 = effect image ... 1 = original content - pan from left to right |
Source
| Parameter | function |
|---|---|
| Src Bright | adjust brightness of the content before applying the effect |
| Src Contrast | adjust contrast of the content before applying the effect |
| Src Color | adjust color intensity of the content before applying the effect |
| Src Blur | blur the content before applying effect (only works from Unity-5.5 upwards) |
Effect
| Parameter | function |
|---|---|
| Brush Detail | detail of the brush strokes |
| Brush Fill | how much the brush strokes fill the screen area |
| Num Strokes | number of strokes to be drawn |
| LayerScale | lower number gives less different scales of strokes |
| Canvas | roughness of canvas (bumpyness in the brush strokes) |
| Flicker Freq | controls the frequency of the flickering (flickers/sec) |
| Flicker Strength | makes the stroke position vary from frame to frame |
| Light Ang | angle of light in screen plane [degrees] 0..360 |
| Light Offs | angle of light to screen plane normal [degrees] 0..90 |
| Paint Diff | diffuse lighting of paint strokes |
| Paint Spec | specular reflections of paint strokes |
| Paint Shiny | shininess of paint strokes |
| Color Spread | adds some color variance between different strokes |
| Screen FOV | field of view of screen in degrees (affects specular reflection) |
| Stroke Ang | rotate strokes relative to gradient (e.g. 90 degree gives a very fuzzy look) |
| Stroke Bend | -1.0 bend towards dark content, +1.0 bend towards bright content (e.g. for clouds) |
| Stroke Dir | swaps front and back of stroke while maintaining its curve |
| Stroke Contour | harder contour of strokes - gives a slight color blob at the start of the stroke |
| Multi Stroke | if you enter 6 here you get 6*6 = 36 different strokes |
| Stroke Seed | seed for randomly generated strokes |
| Vignette | darkening the window border |
| Canvas Bg | strength of background canvas pattern |
| Canvas Tint | color tint of background |
Some Hints:
Lower Values of "Brush Fill", "Brush Detail", "Layer Scale" and "Num Strokes" give a sketchier look.
A negative "Stroke Bend" would be best for images with clouds (bending the white strokes around the cloud shape),
whereas a positive value is more usful if you have dark ojects painted on a bright background.
A "Screen FOV" of makes a specular with contant light/eye angles, as if viewer and light are far away from the image.
the bigger you make this angle the more you get a localized hilight on the image plane.
If "Multi Stroke" is 0 or 1 then all strokes look the same (apart from their size), if on very plain areas the similarity is too obvious to the eye you can use bigger values so you get a diversity of different stroke shapes.
Other
| Parameter | function |
|---|---|
| Flip Y | image Y flip |
| Geom Flip Y | Y-flip of effect-internal geometry (use this if "Effect Fade" and "Pan Fade" wont work properly) |
concerning "Flip Y" and "Geom Flip Y":
The screen coordinates of unity are a bit mysterious. even more when working on different platforms. The Y-coordinate seems to be flipped between versions even on the same system, and also flipped depending on the system.
So for "Flip Y" and "Geom Flip Y" follow these rules:
If you have the source ("Effect Fade" to 1) flipped and the effect correct, just check "Geom Flip Y".
If you have the source correct and the effect flipped, check both "Geom Flip Y" and "Flip Y".
If both are equally flipped just check "Flip Y".
