- Home /
How to assign texture instead of Default colors to the paint brush??
Hello friends I am developing an application of painting just like paint brush but I want to add more features into it like user can draw lines with the selected TEXTURES and can change shape of brush. Like crayons, pencil, paint brush, sketch pens, etc so please help me for this. Thanks :)
Answer by AVividLight · Mar 28, 2013 at 02:11 PM
ganesh.mune,
I'm sorry to tell you this, but you won't get any good answers by asking a question so vague. It's a good practice on UnityAnswers (heck, it's a good practice on the internet) to try your best achieve your goal before you ask for help, and post your best effort, along with your question, if you can't figure it out.
Your question is actually so vague, I can't even suggest a place to start. You seem to suggest that you have something working already, but you haven't mentioned what it is, and you haven't even given enough details as to what you want to add. You want the user to be able to draw lines? Well, what are you using to draw normally? I'm sorry, but without more information, I can't answer your question.
I hope you can get something working! - Gibson
Hello Gibson, Actually I am doing paint brush like app and for that I did basic things like brush, eraser and you can choose width of brush for that I have used set pixel but now I want to add bit extra like different pattern of brushes ( you can say different shapes of brushes) and also textures too suppose texture of heart so if user selects that texture then he/ she should be able to draw line of this texture. But I am not getting any help for this on internet, searched a lot but not getting proper ans. :(
Are you using Texture2D.SetPixel? If so, you could use Texture2D.SetPixels to make a line (you could also just use a while/loop or for/loop). Also, you could get the pixels of an image and use that data in Texture2D.SetPixels to make the background an image. Of course, you could just put a 2d plane in the background, and assign the texture to that. If you want to do different brush shapes, you could use Texture2D.SetPixels again, and just set the pixels in the shape of a brush.
I hope this helps! -Gibson
Your answer
Follow this Question
Related Questions
iOS Shader with 8 lerpable textures via Vertex Colour/Painting 1 Answer
Why is my terrain so dark? 1 Answer
Sprite/Texture Eraser and Painter 0 Answers
Painting on Textures 2 Answers
Cannot paint textures onto terrain, errors are raised 0 Answers