Download

[PLUGIN] Decals Realtime Cooker(Painter)

Now i am working on plugin for realtime painting.
My goal is to create simple tool for placing decals into Render Target.

Is it usefull thing?

Prerequests:
Decals:
Material for brush/decal must be translucent and unlit.
Material must use only zero level of mipmap
Texture must use “Clamp” tiling method
Texture must have “Preserve Border” checkbox selected
Texture must have at least one pixel border with full transparent

Geometry:
All geometry must have unique texture coordinates for each triangle
Static meshs must have “Allow CPU Access” cehckbox selected
Skeletal meshes have not any specific prerequests

How to use:
Plugin have only one public method: PlaceDecal
Decal Location - center of decal in world space
Decal Size - size of decal in UE units
Decal Apply Depth - distance from Decal Location where triangles take decal
Decal Normal - vector used for decal projection
Decal Right & Decal Down - set rotation of decal
Static Mesh Components - array of static meshes which must be used for decal calculation. Can be empty
Skeletal Mesh Components - array of skeletal meshes which must be used for decal calculation. Can be empty
UVChannel - texcutre coorinates channel which used for displaying render target on meshes
Render Target - TextureRenderTarget Reference for decal cooking
Base Texture & Base Material - optional image for using as background on render target. Can be empty
Decal Material - material for brush. Must be translucent and unlit

Additional info:
Render Target have not normal alpha channel. If you want opacity in alpha channel - you must clear render target with alpha==1.0 and use render target with inversed alpha. Its not ideal, but works fine.