upainter-demo

1. Introduction

Get on:
Sales on Unity Assets Store
Experience right now on:
Online Demo

This is a texture paint toolset,you can use in Unity RawImage/Sprite/Mesh Texture/Unity Edtior UI/other UI system;


Raw Image

Draw on mesh

Draw in editor

Features


Create Empty GameObject

Add PaintRawImage component

Create solid brush

Assign brush & Draw

3. Details Introduce

Solid brush

Paint solid color to texture


Solid brush

Brush Color: color of brush
Size: size of brush,value Range(0,1)


Brush Size

Point Distance Interval: the minimum distance of last two points
Self Overlay: whether or not overlay self in on paint life circle


Self Overlay

Blend Mode: blend type with layer texture


Some blend modes

Pixel Mode: If true, the input uv will be modify clamp to pixel cell, the layer filter mode must be point, then can get perfect effect, and you need set a correct layer and brush size


Pixel mode

Softness: softness of brush,useful highlight effect, value Range(0,1),default is 0


Softness

Noise Rate: mask brush with noise, can use this property to simulation uneven effect,such as crayon pen, only value bigger than 0 can be effective,value Range(0,1)
Noise Size: set the noise size, only noise rate bigger than 0 can be effective,value Range(0,1)


Noise

Paint Mode: Brush paint mode, has Dash/Line mode


Paint Mode

Cap Style: Brush cap styles, has Flat/Round mode


Cap Style

Line Joint Style: The corner style just effect in line paint mode, has Round/Flat/Sharp mode


Line Joint Style

Texture brush

Paint texture to target texture


Texture brush

Brush Texture: The brush texture
Rotate Angle: Anticlockwise angle in degree of brush texture


Rotate 30 degree

Rotate Fllow Direction: When in dash mode, the texture will rotate by the direction between two points
Tilling: Repeat count of texture, when enable global uv,the tilling means global repeat count,Range(0,1)


Tilling sample

Offset: Offset of texture uv,Range(0,1)


Offset sample

Enable Gloable UV: Use global texture uv,effected by brush size,can use to mosaic effect


Enable gloabl uv

Enable Gloable Reapeat Count: If true, will ignore brush size, only effected by tilling value


Global reapeat

Global reapeat & set tilling

Global reapeat & set offset

Graphic/Line brush

Use GL mode to draw lines,can paint lines to texture


Texture brush

Line Count: The count of lines


Line count is 4

Composite brush

This is a brush group effect brush,can overlay many brush effect in one paint


Composite brush

Brushes: Composite’s sub brushes, overlay order by array index


Composite brush

Post effect

When paint done, post effect will process the texture, add effect to the result,the effect can be multiple in brush, inner effect has:


Post effect

Drawer


Drawer Painter interaction proxy, will handle touch input, we use drawer to create more texture painter, like raw image drawer, other ui system drawer and mesh drawer(need mesh collider) > Replace Brush: When canvas is empty, this property will set to canvas brush > Show Preview: If true, will show cursor on texture > Simulate Pressure: If true, will simulate the pressure, distance between two points is more larger ,the size will more small; > There has interface to extend, you owen simulate method, even use real touch sensor data; > >
> >
> Simulate pressure >
> > Brush Pressure Strength: The strength of pressure, the value is more larger, the line will more thinner, value range(0,1) > Corner Smooth: Corner smooth strength, value range(0,0.5) **(In older device you can set this value to ZERO)** > Use Shader Smooth: If true, use shader bezier curve, or calucate in cpu, Graphic/Line Brush do not support shader smooth > Curve Interpolation: Only when do not use shader smooth mode, will decide how many segments number of the bezier curve, the value is larger, the line will more smooth, and need more caculation,value range(0,5) ## Undo/Redo PainterOperation is a undo/redo system, default max undo/redo step is 10, you can extend this system to save command result to disk,so you can use limitless undo/redo operate; Sample undo/redo code: ```csharp PainterOperation.Instance.Undo() PainterOperation.Instance.Redo() ```