All Projects → emilianavt → DokoDemoPainter

emilianavt / DokoDemoPainter

Licence: other
DokoDemoPainter is a fast and easy texture painting solution for Unity and can paint on both regular and skinned meshes

Programming Languages

C#
18002 projects
ShaderLab
938 projects

Projects that are alternatives of or similar to DokoDemoPainter

Unity Script Collection
A maintained collection of useful & free unity scripts / library's / plugins and extensions
Stars: ✭ 3,640 (+8365.12%)
Mutual labels:  shaders, unity-scripts, unity-asset
nvjob-sky-shader-simple-and-fast
#NVJOB Dynamic Sky. Sky Shaders. Free Unity Asset.
Stars: ✭ 103 (+139.53%)
Mutual labels:  shaders, unity-scripts, unity-asset
Unity-FPS-Counter
#NVJOB FPS Counter and Graph. Free Unity Asset.
Stars: ✭ 44 (+2.33%)
Mutual labels:  unity-scripts, unity-asset, mit-license
Nvjob Water Shader Simple And Fast
#NVJOB Simple Water Shaders. Free Unity Asset.
Stars: ✭ 172 (+300%)
Mutual labels:  shaders, unity-scripts, unity-asset
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+4476.74%)
Mutual labels:  shaders, unity-scripts
Revealshader
Unity Shader experiment
Stars: ✭ 47 (+9.3%)
Mutual labels:  shaders, unity-scripts
Unity resources
A list of resources and tutorials for those doing programming in Unity.
Stars: ✭ 170 (+295.35%)
Mutual labels:  shaders, unity-scripts
Unity-2017.2-and-Vuforia-6.5---Camera-Auto-Focus
Unity 2017.2 and Vuforia 6.5 Augmented Reality (AR) Camera Auto Focus
Stars: ✭ 17 (-60.47%)
Mutual labels:  unity-scripts, unity-asset
Magicavoxel Shaders
Shaders for MagicaVoxel to simplify common and repetitive tasks.
Stars: ✭ 370 (+760.47%)
Mutual labels:  shaders, mit-license
Rimlight
Customizable rimlight shader for Unity that includes pulsation and noise scrolling. Give your scenes that extra oomph!
Stars: ✭ 170 (+295.35%)
Mutual labels:  shaders, unity-asset
UnityHexagonLibrary2d
A library to manage 2D hexagonal tiles in Unity.
Stars: ✭ 58 (+34.88%)
Mutual labels:  unity-scripts, unity-asset
unity-puzzlesystem-asset
The asset for the Unity Engine that allows to quickly create customisable puzzles.
Stars: ✭ 21 (-51.16%)
Mutual labels:  unity-scripts, unity-asset
Radialprogressbar
Customizable radial progress bar shader for Unity3D. Allows you to set arc range, minimum and maximum colors, textures, radius, and a few more things. Create HP Bars, Speedometers, rank progress, etc!
Stars: ✭ 714 (+1560.47%)
Mutual labels:  shaders, unity-asset
Texturepanner
This repository hosts a shader for Unity3D whose main goal is to facilitate the creation of neon-like signs, conveyor belts and basically whatever based on scrolling textures
Stars: ✭ 528 (+1127.91%)
Mutual labels:  shaders, unity-asset
Lowpolyshaders
Unity shaders optimized for Low Poly models.
Stars: ✭ 157 (+265.12%)
Mutual labels:  shaders, unity-asset
Holoshield
Highly customizable sci-fi shield / force field shader for Unity3D. Allows you to set edge power & color, inner texture scrolling, waviness, scale pulsation and procedural intensity noise. Implements tessellation for low-poly base meshes.
Stars: ✭ 401 (+832.56%)
Mutual labels:  shaders, unity-asset
nvjob-boids
#NVJOB Simple Boids (Flocks of Birds, Fish and Insects). Flocking Simulation. Free Unity Asset.
Stars: ✭ 55 (+27.91%)
Mutual labels:  shaders, unity-asset
Save-System-for-Unity
Save System for Unity with AOT (IL2CPP) and assets references support.
Stars: ✭ 116 (+169.77%)
Mutual labels:  unity-scripts, unity-asset
stc8
#NVJOB STC8 v 3.2 (Custom shader for Unity SpeedTree 8)
Stars: ✭ 17 (-60.47%)
Mutual labels:  shaders, unity-asset
UnityGlobalTextSystem
Allow the user to 'change' the default font in Unity from "Arial" to a font of their liking.
Stars: ✭ 21 (-51.16%)
Mutual labels:  unity-scripts, unity-asset

DokoDemoPainter

DokoDemoPainter is a set of scripts and shaders for Unity3D that allows easy to setup texture painting on regular meshes and skinned meshes. It provides a pen, an eraser and a stamp, as well as functionality to fade texture changes. Modified textures can be saved and saved textures can be automatically loaded to make modifications seem persistent.

Getting started

The easiest way to get started with DokoDemoPainter is to try out the included example scenes. The second easiest way is to add the DokoDemoPainterPaintable component to a textured object and add the included pen, eraser and stamp prefabs to the scene.

Most interesting settings are on the DokoDemoPainterPen and DokoDemoPainterStamp components. The settings on the DokoDemoPainterPaintable component allow further fine-tuning and the use of fading and texture saving. All fields have tooltips containing an explanation on what they do.

To make your own brush or stamp, add the corresponding component to a game object. It is also necessary to add a camera and set it in the component. The included prefabs can be used as a template for this.

Demo

You can try out a very simple live demo here. A demo using WebVR can be found here. The WebVR demo is based on Mozilla's Sunny Desert demo.

Performance

While active, every pen or stamp will render to a 1x1 texture every frame to detect painting targets. This means that every active pen or stamp in the scene will take some processing time.

Painting itself is done using a fragment shader, so no transfers of texture data between the CPU and GPU are necessary, so DokoDemoPainter performs reasonably well.

Using pens with alpha blending (e.g. soft pen tips or opacity below 1.0) will lead to a slight reduction of performance, because a second drawing history texture will have to be updated each frame. If performance is an issue, avoiding these functions may help.

Painting on objects with a high number of materials can also lead to reduced performance. If the number of materials cannot be reduced, it is possible to use the whitelist functionality of the DokoDemoPainterPaintable component to exclude unnecessary materials from the painting process.

Limitations

The following types of objects may cause issues with DokoDemoPainter:

  • Objects without textures. Materials have to have a set main texture, otherwise they cannot be painted.
  • Objects with little space between disconnected parts of their UV maps.
  • Objects where parts of the UV maps differ in scale.
  • Objects with mirrored UV maps.
  • Objects that reuse parts of their texture multiple times.
  • Objects with weird UV maps.

Using the whitelist functionality, it is possible to assign different settings to different materials of an object by adding multiple DokoDemoPainterPaintable components.

Issues due to difference in scale can be reduced by adjusting the radius and size factors of the DokoDemoPainterPaintable component.

To avoid painting on unrelated parts of the texture when UV maps have little safety distance, brush sizes should be kept small. Reducing the maxDistance setting may also help.

If painting just won't work properly, the only way to fix it might be to adjust the UV map of the mesh itself.

"Painting doesn't work in a build?"

If you want to build your Unity application, you have to make sure that Unity includes the following two shaders in the build:

  • DokoDemoPainter/Detect
  • DokoDemoPainter/Render

In the newest version, they have been moved to a "Resources" subfolder, which seems to take care of this issue. If not, try setting the player setting Keep Loaded Shaders Alive and add the two shaders to the Preloaded Assets list.

These settings can be found under Other Settings. Doing just one of these things may be enough to make it work, but it can't hurt to be sure either way.

Mobile GPU issues

Some mobile GPUs do not support render textures in ARGBFloat format. To support these, you can try modifying the scripts to use ARGBHalfor another format as indicated by SystemInfo.SupportsRenderTextureFormat.

License

DokoDemoPainter (code, models and textures) is distributed under the MIT license. This means that you can use it, modify it, distribute and so on in whatever way you like, as long as you include the copyright and license information with your program. It is not necessary to display this information on a credits screen or similar, as long as it is included at all, but it would be appreciated.

If you use DokoDemoPainter in your project, it would also make me very happy to hear about it.

While it is not mandatory, if you make any improvements to DokoDemoPainter, I would also appreciate it if you contributed them back so I can include them.

The rabbit model, textures and animations included in the example scenes are distributed under the CC0 license or public domain and were created by Čestmír Dammer.

About

DokoDemoPainter was made by Emiliana for Virtual YouTuber purposes, but it can also be used for games or other applications.

Happy painting!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].