Sprites can also use the SmartEdge effect by generating a Signal Distance Field image using the Image Maker.
To open the Image Maker, select from the menu "Tools \ I2 SmartEdge \ SDF Image Maker"
Select the sprite Texture by dragging it into the Texture rectangle or clicking the select label.
If the sprite is part of an atlas, you should generate the SDF image from the original sprites and then regenerate the atlas using the generated image. That will allow expanding the borders to generate the SDF falloff without conflicting with the atlas padding.
Source Channel |
This is the channel that will be used to generate the Distance Field. In most cases the Alpha is used, but you can also select MaxRGB (Maximum value of each channel) or AvgRGB (The average value of the R, G and B for each texel) for those images that don't have an alpha channel. |
Spread |
This controls how wide is the distance field falloff. Higher values allow creating a bigger Glow, softer Soft Shadow, wider Bevel, etc. However, as the falloff starts become wider, the distance become less accurate and so the resulting texture could have less quality. |
Downscale |
When computing the Distance Field, each pixel finds the closest distance to the shape's border. The bigger the source image the more accurate the border can be represented. At the end of the generation, the image can be downscaled into the correct size, distances will remain with good quality as they were computed using higher precision. When Fonts are generated at maximum quality they are rendered at 32 times the font size, the SDF is computed at that size and then scaled down 32 times to the correct texture size. A similar approach is recommended for Sprites to improve quality: Create the image at a high resolution and then allow the Image Maker to downscale it to the desired size. |
Expand Borders |
Because of the Spreading, the Distance Field falloff can go outside of the texture. By selecting this option, the texture grows on every side to make sure the Distance Field is fully covered inside the texture. |
Crop Empty Space |
Once the Distance Field is computed, this option shrinks the texture by removing any extra space that is not used. This is specially useful when the Expand Borders is selected. |
Keep Aspect Ratio |
If the Crop Empty Space is selected, this option guaranties that the cropping will maintain the initial Aspect Ratio. |
The Image Maker can generate two two types of Image Assets from the selected source. It can create Single Layer or Multi Layer textures.
The options for each of the image types can be select by clicking in the corresponding Tab.
Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease