‘Ascii‘ is a post-processing effect for Unity which creates the old-school ascii render, with new tricks and features like depth mode, layers and gradients.
Adding the effect.
Add ‘Ascii‘ is easy. Select the camera you’re going to use (usually called ‘Main Camera‘) in the ‘Hierarchy‘ editor window (1), then click on ‘Add Component‘ button in the ‘Inspector‘ window (2).
Now you can select the effect in two different ways. The first way is using the search field and write ‘Ascii‘, then select the effect (1). The second way is select the category ‘Image Effects‘, and finally ‘Ascii‘ (2).
You can also add it by code. To do this you must use the namespace ‘AsciiImageEffect‘. If ‘mainCamara‘ is a valid camera:
using AsciiImageEffect; ... Ascii ascii = mainCamera.gameObject.AddComponent<Ascii>();
Check the documentation included in the code and take a look at the example code in the ‘demo‘ folder.
Setting the effect.
The ‘Ascii‘ component has these areas:
- General area, to changing the font, the strength of the effect and mode.
- Color area, to change the Blend functions and color gradients.
- Image area to change settings such as saturation, brightness, etc.
- To view this site :).
- To reset some values.
By default, ‘Ascii‘ brings some text fonts, but you can use others. To use your own fonts, select ‘Custom‘ in ‘Charset‘.
The first thing you have to do is import the texture. I recommend you use these settings:
The texture must be in a single row with all characters you want to use. These characters must be also the same width, so we recommend using a monospace font. It should be something like:
The characters must be sorted by their ‘density‘, the number of pixels, from less to more. For example, if you want to make one with 10 characters, these might be “ .:-=+*#%@“. The last thing you must to do is put the number of characters you used in the ‘Char count‘ field. We are working on a built-in editor tool to automatically import any text font and simplify this process :).
The ‘Amount‘ field defines the intensity of the effect, from 0 (no effect) to 1 (full).
With ‘Mode‘ you can select the mode of effect. You can select three modes: Screen, Depth and Layer.
The ‘Screen’ mode is the classic effect, affects the entire screen.
With the ‘Depth’ mode so you can define that area where the effect is applied, depending on their depth. This mode requires deferred renderer.
With the ‘Layer’ mode, you can specify which layers of your scene is applied to the effect. This mode requires deferred renderer.
The first thing you can change in this area is how the colors blend together. To do this we provide more than a dozen functions. They are very similar to Photoshop. ‘Solid‘ is the default function.
You can also use three different forms of gradient, besides the function ‘Solid‘ affecting the entire screen. These modes are horizontal, vertical, circular gradient.
In this area you can control things like saturation, brightness, contrast and gamma.
Frequently Asked Questions.
- CAN I USE THE FREE VERSION (PERSONAL EDITION) OF UNITY3D?
Yes, since the version 5 of Unity, this package works both free and pro version.
- WHAT VERSION OF UNITY SHOULD I NEED?
You need the version 5 or higher.
- DOES IT NEED ANY SPECIAL HARDWARE?
‘Ascii‘ needs a GPU that supports Shader Model 3.0 or higher. At desktop PCs, any card compatible with DirectX 9.0c are supported (ATI Radeon HD2000 or higher, Nvidia GeForce 8 (8xxx) Series or higher or Intel GM965 or higher). In mobile platforms, any device compatible with OpenGL ES 2.0 or higher should run fine. Please, check the Apple hardware compatibility or Android Froyo 2.2(API 8) or higher.
In generall, any device with a decent GPU after the 2009 should work.
- INCLUDES SOURCE CODE?
Yes, all source code is included (also shaders).