Once installed, select your scene camera and add the ‘Sketch’ component.
Once the effect is added, you will see something like this:
With ‘Amount’ (1) you can modify the intensity of the effect. The following parameters configure the way in which traces are calculated. The first is the intensity of the lines (2). With ‘Power’ (3) you increase the strength of the strokes and with ‘Sensitivity’ (4) their sensitivity.
With ‘Blur’ (5) you will soften the strokes and with ‘Threshold’ (6) their amount.
‘Sketch’ has two modes of operation, which you can select in ‘Mode’ (7). The first is ‘Screen’ and it makes the effect apply to the entire screen. The second is ‘Layer’ and with it you can select the layered objects to which you want the effect to be applied.
You just have to select the layers in ‘Layer mask’.
If you see problems with accuracy in ‘Layer’ mode, try setting the camera’s ‘Far’ parameter to minimum. You can also try minimizing it using ‘Depth adjustment’. This mode adds a depth texture to the camera and may not be available on some older browsers or mobile devices.
With the following parameters you can modify the brightness (8), contrast (9), gamma (10), hue (11) and the saturation (12) of the color. With ‘Tint’ (13) you can apply a color to the final image and with ‘Blend’ (14) you can define which operation will be used to blend them. Finally you can invert the final color with ‘Invert’ (15).
If you enable ‘Paper’ (16), a crmpled paper effect will be added to the image.
The first three parameters modify the number (1), size (2) and intensity (3) of each cell. With ‘Light position’ (4) you can adjust the position of the light that illuminates the paper and with ‘Light color’ (5) and ‘Ambient color’ (6) its color.
All the code is inside the namespace ‘Nephasto.SketchAsset’. The first thing you should do is import the namespace:
If ‘myCamera’ is a valid camera and you want to add the effect to it, you can do something like this:
For more information you can check the comments of the code and the attached demo.
Any questions or suggestions you have, I will be happy to answer you in