FireAlpaca用ブラシスクリプト「煉瓦ブラシ」を作りました
「タイルブラシ」、「ハニカムブラシ」系統のブラシスクリプトとして「煉瓦ブラシ」を作りました。機能面で言えば「タイルブラシ」の上位互換みたいなものです。
Downloadは記事下部のリンク先から行ってください。
スクリプト
function default_size()
return 100 , 1
endfunction param1()
return "筆圧透明度" , 0 , 1 , 1
end
function param2()
return "縦横入れ替え" , 0 , 1 , 0
end
function param3()
return "長さ" , 1 , 100 , 2
end
function param4()
return "隙間" , 0 , 99 , 5
end
function param5()
return "ズレ" , 0 , 100 , 33
end
function param6()
return "起点シフトx" , 0 , 100 , 0
end
function param7()
return "起点シフトy" , 0 , 100 , 0
end
function main( x , y , p )
local width = bs_width_max()
local length = width * bs_param3()
local wClearance2 = width * ( bs_param4() * 0.01 ) * 0.5
local hClearance2 = wClearance2
local shift = length * ( bs_param5() * 0.01 )
local px , py
local x0 , y0 = x , y
local w , h = length - 2 * hClearance2 , width - 2 * wClearance2
if bs_param2() == 0 then
if math.floor( y0 / width ) % 2 == 0 then
px = math.floor( x0 / length ) * length + hClearance2
py = math.floor( y0 / width ) * width + wClearance2
else
px = ( math.floor( ( x0 + length - shift ) / length ) - 1 ) * length + shift + hClearance2
py = math.floor( y0 / width ) * width + wClearance2
end
else
if math.floor( x0 / width ) % 2 == 0 then
py = math.floor( y0 / length ) * length + hClearance2
px = math.floor( x0 / width ) * width + wClearance2
else
py = ( math.floor( ( y0 + length - shift ) / length ) - 1 ) * length + shift + hClearance2
px = math.floor( x0 / width ) * width + wClearance2
end
w , h = h , w
end
px , py = px + width * bs_param6() * 0.01 , py + width * bs_param7() * 0.01
local r , g , b = bs_fore()
local a = 255 * bs_opaque()
if bs_param1() == 1 then
a = p * a
end
bs_rect( px , py , w , h , r , g , b , a )
return 1
end
bs_setmode( 1 )
パラメータ
筆圧透明度
- 省略。
縦横入れ替え
- ノーチェックで (ブラシ幅 - ブラシ幅 * 隙間 [%] )が粒子のy方向幅になります。
- チェックでx方向幅とy方向幅を入れ替えます。
長さ
- ((ブラシ幅 * 長さ)- ブラシ幅 * 隙間[%] ) が粒子のx方向幅になります。
隙間
- (ブラシ幅 * 隙間 [%]) が粒子同士の隙間の幅になります。
ズレ
- (x方向幅 * ズレ [%]) が偶数行を奇数行からズラす大きさになります。
始点シフトx、始点シフトy
- 起点( 0 , 0 ) を( ブラシ幅 * 始点シフトx [%] , ブラシ幅 * 始点シフトy [%] ) へ移します。
Download
Dounloadは以下のリンク先から行ってください。