Page 1 of 1

Painting on a Texture like Photoshop Brush

Posted: Thu Jan 25, 2007 12:03 pm
by marco.siino
I need to paint inside a black texture, with a "blur" brush like when you paint with the Brush tool in Photoshop.

I need that when i move the mouse it draws the path i do with mouse, with blurred contour (like in photoshop).

I need this because i'm trying to build a terrain editor, and i want to "Paint" the terrain surface with another blendend texture (for example if the base terrain texture is grass, i want that when i paint on the terrain it draw in the alpha channel of a "rock" texture that will be blendend with the grass basis on when i draw).


Anyway, i need a method to do blurred white drawing on a black texture, like with round brush in photoshop.

I hope u understand what i mean :) (i know, i'm not very good to explain in english)

Thank u very much

Posted: Thu Jan 25, 2007 1:17 pm
by Acki
No, there is no function for that...
But you can get access to the pixles of a texture with lock() and unlock() !!!
So you can set the color of each pixle...

Posted: Thu Jan 25, 2007 5:28 pm
by marco.siino
I know that, i mean if someone know a method to draw like when you use the brush in photoshop.

I'm looking for a method even if it is not related to Irrlicht, just want to know how to draw with a blurred brush in a black image (for example in an application with a black picturebox, when i move the mouse on it). Then if i know how to do this i can apply this to my terrain generator in irrlicht.

Thank u very much!

Posted: Fri Jan 26, 2007 2:17 am
by Midnight
images are done in pixels... the more pixels there are and higher the resolution (resolution being the amount of pixels in a given area) the more detail you can have and blurr is all about high detail and shades of colors.


let me break it down completely.. I have a 19" CRT Monitor cathode ray tube meaning electricity travels through gas to light up the screen as opposed to LCD which is light cells and basicly directly wired light pixels.

the difference most of us know between LCD and CRT but LCD tends to be higher resolution anyways... a blurred brush would simply be a pixel brush but with increased size and in vectors like the new font.

shapes to average people.

circles, squares but on terrain the resolution is poor because you break it down on a grid of vertex for editing... leaving you with splattering.

to make multiple textures that blurr together (interpolate) on terrain and look natural you need to do a technique called texture splattering.

look it up there is a great article on game dev.