ASCII - Unity Asset Store - Nephasto

The good ol' text renderer is back and comes with new tricks and features like depth mode, layers and gradients.

🕹️ Demo  🛒 Store

Editor

Once installed, select the camera in your scene and add the component ‘Ascii’.

 

And you will see something like this:

 

When adding it you will not notice any changes since you have not added any ‘Charset’ yet. A ‘Charset’ is a special texture and some data that defines the type of text font you want to use. To create a new one use the included ‘Ascii Charset Tool’ which you can find in ‘Window > Nephasto > Ascii > Ascii Charset Tool’.

 

This tool will search for all ** monospaced ** text fonts (the one whose characters are all the same width) that you have installed on your computer. Select the font you want to use in ‘Font’ (1). If you install a new one, click on ‘Refresh’ (4). Then choose the size you want it to be in ‘Size’ (2).

In ‘Pattern’ (3) you can select the text pattern to be used. ‘Ascii’ selects a letter from the pattern according to the brightness of the pixel. For example, if a pixel is very dark the first character of the selected pattern will be used (in the case of the example it would be ‘.'), if the pixel is very bright the last character will be used ('@'). Sort the characters according to their pixel density if you choose the ‘Custom’ pattern.

 

Once the Charsets you want to use have been created, add them by clicking on ‘+’ or dragging them to the area where it says ‘Add or drop Ascii Charsets here…’.

 

With ‘Amount’ (1) you can modify the intensity of the effect. If the brightness of your scene is low, you can increase it using ‘Boost’ (2), which will use higher brightness values to calculate which character to use. You can also modify the size of the displayed characters with ‘Zoom’ (3).

If you have added more than one Charset, you can select which one to use in ‘Charset’ (4). To add new Charsets, drag them over 5 or use the 6 controls.

In ‘Mode’ (7) you can select how the effect works. By default it uses the ‘Screen’ mode which affects the entire screen.

 

If you choose the ‘Depth’ mode the intensity of the effect will change according to the depth of the scene. You can adjust it using ‘Range’.

 

The last mode is ‘Layer’ and with it you can choose in which layers you want the effect to be used.

Screen
Depth
Layer

If you see some issues with accuracy in any of these modes, try setting your camera’s ‘Far’ parameter all the way down. The ‘Layer’ and ‘Depth’ modes add a depth texture to the camera and may not be available on some older mobile devices or browsers.

If you activate ‘Block color’ (8), each character on the screen will have a unique color, otherwise it will be modulated with the colors it originally had. If you deactivate it, you will see better the details of the image but it will not be like the classic effect.

On
Off

You can change the color of the characters (10) as well as the background (12) and also how they blend with the originals (10 and 12). As long as ‘Gradient’ (9) is ‘None’, these changes will apply across the entire screen uniformly. Other available options are ‘Horizontal’, ‘Vertical’ and ‘Circular’.

Finally, you can modify values such as saturation (14), brightness (15), contrast (16) and gamma (18) of the image. By clicking on ‘[doc]’ (18) you will access the online help and if you click on ‘Reset’ (19) the parameters will return to their default values.

Code

All the code is inside the namespaceNephasto.AsciiAsset’. The first thing you should do is import the namespace:

1
 using Nephasto.AsciiAsset;

 

If ‘myCamera’ is a valid camera and you want to add the effect to it, you can do something like this:

1
 Ascii ascii = mycamera.gameObject.AddComponent<Ascii>();

 

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

hello@nephasto.com