You can change brush properties while the mouse button is down, by the way. All it needs now is a color palette. The equations behind this thing are incredible. I was aiming to match Photoshop's brushes and make a Flash program that paints smoother and is more versatile than all the other internet painters. I'd like to use this to make a replacement for iScribble since they use censorship.
The programming When you click, there's a paint blot; when you drag, more blots. Most programs put a new blot on every pixel you move over, but then the blots overlap too fast and the stroke becomes too dark and solid, but mine follows Photoshop's example and keeps the blots evenly spaced a few pixels apart, giving a smooth stroke. The reason most programs don't do this is because it's hard as shit to code. With each mouse movement, it calculates the mouse's distance from the last blot using trigonometry (xDistance squared plus yDistance squared, then square-root the result for the exact distance) then puts down a new blot if the mouse is the right distance: Half the brush-radius.
This gets complicated when you make a fast stroke, because the mouse starts skipping pixels and you need multiple evenly-spaced blots between the current and previous mouse positions. So the program checks every pixel between the current and last mouse positions, and puts a blot on each correctly-distanced pixel.
The paint blot is a hidden bitmap that's defined at the start of the program, then when you click, it's copied to the visible bitmap (the screen). The blot bitmap is sized 2x the brush radius, and each pixel in it is scanned for its distance from the center pixel. For an aliased (blocky) look, pixels smaller than or equal to the radius would be colored while others are left transparent. A lot of oekaki programs and old MSPaint use this method, but a smooth anti-aliased blot is tricky. For anti-aliasing, you give each pixel an opacity value based on how much of the circle fills the pixel. If, for example, the circle radius is 4, and a pixel is a distance of 4, the pixel will get an opacity of 50% because the circle is only filling half of the pixel (hitting the middle). The pixel's distance ranges from 3.5 to 4.5, so if the radius were 3.7, the pixel would get a 30% opacity because 3.7 is .3 more than 3.5.
very very neat! Will you be taking this any farther? Cause other colors or a reset key would be nifty additions!
--
The artist stands in the harshest position of his own art, right above it and inside of it all at once. So while othes look up and see the final product, they can only look down on their own works and view the insides that hold it.
This is looking much nicer than iScribble, I can't stand that program. It's a shame Flash can't access stuff like tablet pressure, otherwise you could have a full-fledged online painting program. It's awesome what AS3 can achieve!
Oh, you can push 'delete' to reset. I'll certainly be doing more with this, like making a multi-user setup and adding it to The Grid I've been promising
Come to think of it, maybe I could hack it into a forum so people could post with sketches
Oh I've been doing this a while - did some DOS programming a long time ago. That sorta came to a close when GUI programming and class systems showed up, which I couldn't catch onto thanks to those god-awful programming books that spend 30 pages explaining something I could explain with a paragraph.
It's always been so hard just to alter some pixels on the frickin screen. If I could just control pixels, I could have done anything, but every language has 5,000 functions to draw squares and stars and the damn kitchen sink but you have to dig through the dark depths of the programming book if you want to make a red pixel. If I made a programming language, I would advertise it saying 'YOU CAN ACTUALLY CHANGE FUCKING PIXELS USING THIS LANGUAGE. HOLY SHIT. AFTER 40 YEARS OF COMPUTER SYSTEM ADVANCEMENT YOU NOW HAVE THE ABILITY TO MAKE A PIXEL' and everyone would use it
I'd like to make my own imaging system, sure. One to rule them all
Daily Literature Deviations is a group that is dedicated to bringing literature to the forefront of the deviantArt community. We attempt to accomplish this by daily featuring Literature artists from around the community that deserve the recognition, but are not getting it.
Each day we will feature 10 deviations from the Literature categories in a News Article. In order to support the artists that we feature, we ask that you the news article as well as check out the individual pieces. We understand that each day you may not be able to check out each and every one of the pieces, everyone has their own things going on. We just ask that you make an attempt to help support the growing Literature community.
The Cutting Edge is a weekly article that features brand new selected high quality art products that caught our eyes. Check out the cutting edge prints some of your fellow artists have submitted in the past week!
When it comes to community spirit, `Rushy is a shining example. From participating in devmeets, to providing positive encouragement to other artists, `Rushy can always be found demonstrating what it really takes to be a true deviant. It's without any hesitation that we are delighted to award the Deviousness Award for July 2009 to `RushyRead More
Devious Comments
Comments
--
I am very bad at life, but I make very good sandwiches!
--
The artist stands in the harshest position of his own art, right above it and inside of it all at once. So while othes look up and see the final product, they can only look down on their own works and view the insides that hold it.
--
Ooooh T-shirts! - [link]
Sketch Blog - [link]
--
hands off my miniwheats!! o.O
--
Ah, the roundness is pleasing.
I am a belly lover!
I am a maieusophile, are you?
You are? Awesome! Come and join us! [link]
Come to think of it, maybe I could hack it into a forum so people could post with sketches
--
You can trust me. I'm not a copyright psycho
--
cutest animal in the world :iconfurrydanceplz: :iconfurrydanceplz:
[link]
as well as the greatest pregnancy joke
It's always been so hard just to alter some pixels on the frickin screen. If I could just control pixels, I could have done anything, but every language has 5,000 functions to draw squares and stars and the damn kitchen sink but you have to dig through the dark depths of the programming book if you want to make a red pixel. If I made a programming language, I would advertise it saying 'YOU CAN ACTUALLY CHANGE FUCKING PIXELS USING THIS LANGUAGE. HOLY SHIT. AFTER 40 YEARS OF COMPUTER SYSTEM ADVANCEMENT YOU NOW HAVE THE ABILITY TO MAKE A PIXEL' and everyone would use it
I'd like to make my own imaging system, sure. One to rule them all
--
You can trust me. I'm not a copyright psycho
Previous Page12Next Page