Skip to content
forked from rtm223/RTMSDF

Unreal Engine SDF Importers / Generators for SVG and Bitmaps

License

Notifications You must be signed in to change notification settings

benui-dev/RTMSDF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTMSDF

Unreal Engine SDF Importers / Generators for SVG and Bitmaps

Note

This module is very much work in progress / preview and likely to change Uses MSDFGen for processing of SVG files This repo is a fork of the original rtm223/RTMSDF

Quick Start

  1. Clone this repository into MyUnrealProject/Plugins/RTMSDF or MYUnrealProject/Plugins/RTM/RTMSDF.
  2. Compile for Editor as usual and launch.
  3. Check Project Settings -> Plugins -> RTM SDF for the important settings.
  • SVG Filename Suffix - .svg source files with this suffix will be imported and converted to MSDF, i.e. T_MyFancyIcon_SDF.svg
  • Bitmap Filename Suffix - bitmap files (.png, .psd, .bmp etc.) with this suffix will be imported and converted to SDF files, i.e. T_MyLessFancyIcons_SDF.psd
  • SVG Import settings are related to MSDFGen - see MSDFGen for details - can be overridden for individual files
  • Bitmap Default Import Settings are for importing bitmaps and can be overridden for individual files
  1. Create an svg file with the appropriate naming and import it to Unreal.

Editing settings per-asset:

  • In your imported asset, under Texture -> Advanced Settings -> Asset User Data you will be able to edit import settings for your texture
  • These are identical to the settings in the project settings
  • Changing a setting will not automatically update the texture - you must click Reimport to see any changes

SVG Import Limitations

  • MSDFGen only reads a single path from the SVG file - combine paths to create more complex shapes
  • Overlapping shapes are not supported - I am not sure if that's on my end or on MSDFGen's end

Bitmap Import Limitations

  • Bitmap import will attempt to detect if your source file is single channel or multichannel however
    • However Unreal Engine doesn't handle this well and some file types (e.g. psd) will always be rgba
    • Change the compression settings to "Grayscale" for the texture to force a single channel SDF generation
  • Bitmaps have 2 RGBA modes
    • Separate Channels - each channel will be trated as a separate SDF to give multiple SDFs in a single file
    • Preserve RGB - will keep the source RGB channels and produce a sdf on the alpha channel (this does not work very well right now)

Languages

  • C 80.5%
  • C++ 19.4%
  • C# 0.1%