Page 1 of 3

WIP - Brush shading Language

PostPosted: 05 Feb 2016, 14:13
by u2bleank
:hi:

We’re starting to get some very promising results for the upcoming version of Black Ink (even if there is still a lot of work left before the release ).
We will introduce a new custom shading language: the BSL (Brush Shading Language).

It is used control how pixel are blitted on the canvas. It’s mainly a superset of HLSL which introduce a lot of helpers and simplification.

Currently, Black Ink’s brushes only output one color per primitive and the Controllers only change the size, rotation etc.. but doesn’t change how the color is applied on the whole primitive. BSL will change that and open a whole new world of (infinite?) possibilities.

Long story short, it will be possible to program smudge blurs, smoothed primitives, texture masking, noises, color aberration, water effects, and much more…

This should be really interesting for technical oriented users (like people in the Shadertoy community for example). Pure artists don’t need to worry, all that complexity will be hidden and you will be able to use custom made effects without having to know how it’s done.

The next release will only include a text based BSL editor because a nodal tool will take a lot longer to develop. This is much more complex than the Controller system.
A lot of Black Ink’s code was rewritten to support this new feature so sorry for the time this release is taking but it is going to be well worth it.

Now enough with the technical talk! This thread will show some results and advancement in our quest for more flexible and enjoyable Brush making ;)

Smooth Primitive effect

Image

Image

BSL source code

$this->bbcode_second_pass_code('', 'float4 main( idatas i )
{
float sm = vmin( i.primBox.getSize() ) ;
float d = -i.primDistance ;
float softness = 0.5 ;
d /= sm*softness + 0.001 ;
float att = 1 - exp( -d );
return float4( i.color.xyz, i.color.a*att ) ;
}')

primitive space display

Image

BSL source code
$this->bbcode_second_pass_code('', '
float4 main( idatas i )
{
matrix2 t = i.primBox.getToUpperLeftTransfo() ;
float2 p = t.transform( i.pos );
p /= i.primBox.getSize();

return float4( p.x, p.y, 0, i.color.a ) ;
}
')



distance to primtive effect

Image

Image

$this->bbcode_second_pass_code('', 'float4 main( idatas i )
{
float d = toDrawSpace( i.primDistance ) ;
float l = abs( cos( d*0.12 ) ) > 0.85 ? 1 : 0 ;
float3 col = lerp( float3(0.2,0.2,0.7), float3(0.7,0.5,0.2), l );
return float4( col, 1 );
}
')

Re: WIP - Brush shading Language

PostPosted: 17 Feb 2016, 23:46
by thersippos
This is great news. I will love this feature. This is the first tool out there that has so much powerful features. Its good for users to be able to develop powerfull brushes even if it requires more "low level" approach. A shader language will give enormous amounts of possibilities. We all love your nodal system and we look forward new controlles. Maybe data driven nodes (external text data) will expand the creative possibilities.

Thanks for tis great application.

Re: WIP - Brush shading Language

PostPosted: 22 Feb 2016, 13:42
by u2bleank
Playing with BSL which add a Hardness and orientation attenuation
( click for full res Gif )
Image

Who need good drawing skills ? ;)


Image

Image

Re: WIP - Brush shading Language

PostPosted: 15 Apr 2016, 14:10
by u2bleank
It was way more difficult than expected but the Pixel Readback for Black Ink start to works fine :reyes:
Here some simple exemples of the effect in action ( the principe if the ReadBack is to read the destination pixel ( with a possible offset ) and then combine thanks to the BSL language with the currently outputted color ).

Image


Image

Re: WIP - Brush shading Language

PostPosted: 20 Apr 2016, 19:45
by tetriste
Looks great :D when can we try it?

Re: WIP - Brush shading Language

PostPosted: 22 Apr 2016, 16:02
by bonnie
Good question but I can't answer :ignore:
But be confident, we are doing all our best to release it as soon as possible!

Image

Re: WIP - Brush shading Language

PostPosted: 25 Apr 2016, 16:01
by u2bleank
a more complex doodling with the brush using the ReadBack
Image

Re: WIP - Brush shading Language

PostPosted: 29 Apr 2016, 13:04
by u2bleank
Another test
Image

Re: WIP - Brush shading Language

PostPosted: 07 Jun 2016, 10:57
by u2bleank
testing a brush with some per pixel noise and an image reference.
Nice result ;)

Image

Image

Image

Re: WIP - Brush shading Language

PostPosted: 09 Jun 2016, 09:24
by u2bleank
I've plugged the Noise shader on the Volute brush

Image


Image