HOME | DD | Gallery | Favourites | RSS

| obtusity

obtusity ♂️ [23623411] [2012-09-26 11:10:09 +0000 UTC] "Digital Sciolist" (Australia)

# Statistics

Favourites: 39; Deviations: 38; Watchers: 367

Watching: 26; Pageviews: 55051; Comments Made: 2289; Friends: 26


# Comments

Comments: 61

MarshmallowFwuff [2019-05-03 11:08:34 +0000 UTC]

So, there's really no mirror tool for FireAlpaca?

👍: 0 ⏩: 2

Emoartist2233 In reply to MarshmallowFwuff [2020-03-07 02:05:18 +0000 UTC]

It's called center symmetry and their actually is one

👍: 0 ⏩: 0

Nuubles In reply to MarshmallowFwuff [2019-05-21 16:43:58 +0000 UTC]

I'm not sure if this is what you mean but to mirror/flip layers on FireAlpaca:
1. Select the layer to be flipped
2. Select > Transform > Flip (window bottom)

👍: 0 ⏩: 0

AtsusaKaneytza [2017-08-28 14:30:58 +0000 UTC]

I have a question!
I have a concept for a brush that I'd like to make for FA/MBP, but I would like to actually try my hand at making it myself. Would you be willing or able to walk me through how to script a brush? If not, I totally understand, and I appreciate whatever reply you can give.

👍: 0 ⏩: 1

obtusity In reply to AtsusaKaneytza [2017-08-28 14:44:00 +0000 UTC]

Sure, happy to help. However, past midnight here, its been a long day, and I have to do intelligent troubleshooting tomorrow, so right now I'm heading to bed. If you haven't seen it, I have a set of tutorials on brush scripts here: obtusity.tumblr.com/post/14652… Talk to you again tomorrow night!

👍: 0 ⏩: 1

AtsusaKaneytza In reply to obtusity [2017-08-28 14:57:55 +0000 UTC]

I'm looking at them right now. Thanks for the reply, and I hope you get some good rest!

👍: 0 ⏩: 2

obtusity In reply to AtsusaKaneytza [2017-08-29 13:40:01 +0000 UTC]

Please send any questions about brush scripts, but the basic idea is start with a skeleton of:

function main(x, y, p)
   return 0
end

Then add whatever code you need into main to accomplish your desires.

... and I know that's worse then saying "draw a stick figure, then add all the details to draw what you want", but without a more specific direction (or at least an art style) that's about all you can say.

A better starting skeleton might be something like:

lastDrawX = 0
lastDrawY = 0
firstDraw = true

function main(x, y, p)
 local width = bs_width()
 local updateDist = width

 if not firstDraw then
   local distance = bs_distance(lastDrawX - x, lastDrawY - y)
   if distance < updateDist then
     return 0
   end
 end

 local r, g, b = bs_fore()
 local opacity = bs_opaque() * 255
 bs_ellipse(x, y, width, width, 0, r, g, b, opacity)

 lastDrawX = x
 lastDrawY = y
 firstDraw = false

 return 1
end

... and replace the bs_ellipse with whatever you want to do.

Alternatively, start with one of the examples at d.hatena.ne.jp/MDIAPP/20100311

Warning: brush scripts can do amazing things, but they have limits, in the same way computer-generated music is still mostly terrible compared to human-composed music - they can only work within the one layer, they do not work well, if at all, with bitmaps, and they can be slower than other brushes. There are probably other limitations also.

👍: 0 ⏩: 0

obtusity In reply to AtsusaKaneytza [2017-08-29 13:27:14 +0000 UTC]

If you are using Notepad++ (a good editor on Windows for editing brush scripts), go into Settings, Style Configurator and add the user extension bs to automatically add syntax highlighting for .bs files. Other programming editors will vary in how they do this.

👍: 0 ⏩: 0

d3rpman03 [2017-06-17 23:10:48 +0000 UTC]

hey its me again, i just checked that if i had the pressure opacity thing on and it is but im still having the same problem

👍: 0 ⏩: 1

obtusity In reply to d3rpman03 [2017-06-18 01:16:35 +0000 UTC]

Is the opacity slider for the Pencil brush set to 100% (the slider beneath the brush size slider), and is the layer set to 100% opacity and Normal blending mode? These can affect the appearance of the Pencil brush.

You can also double-click the Pencil brush and tick the box for Force Fade In/Out to force tapering and transparency at the ends of strokes (depending on the other two checkboxes).
If you are after a grainy pencil brush, here's how to make one .

Have you also lost pressure variation? Do you still get wider strokes when you press harder with your pen?

My pressure fixing process:

Try restarting your computer.
The latest version of FireAlpaca (1.7.5) adds Windows Ink compatibility, so it might fix a lot of tablet issues. Use the Help men, About to check your version,

Try the latest tablet driver from your tablet manufacturer web site (and restart your computer after installing it).

Next, try File menu, Environment Setting, and change Brush Coordinate from Use Tablet Coordinate to Use Mouse Coordinate.

If your tablet software allows it, and if you are using Windows (I don’t know whether Macs have any equivalent), turn off Windows Ink/TabletPC services. Wacom (under Mapping) and Huion have this option, I don't know about others.

Also turn off other tablet services built into Windows or your tablet software, such as Pen Flicks (the Pen and Touch applet in the Control Panel) or long-press or press-and-hold or hard-press for right-click (try the Pen and Touch applet in the Control Panel and/or your pen settings control applet, which might be in Control Panel, or in the system tray in the right lower corner, or maybe in the start menu). Screenshots instructions here (somebody else's bad language, for which I apologise, but they document the process very well): i.imgur.com/Viuhhok.jpg

👍: 0 ⏩: 0

rookk-san [2017-03-19 10:22:10 +0000 UTC]

Recently I'm working on an animation project. I don't know it's the files too big or what. Then it stated to have these problems:
-Firealpaca not responding/ stop responding
-Cannot copy layers
-Unable to save

👍: 0 ⏩: 1

obtusity In reply to rookk-san [2017-03-26 04:27:19 +0000 UTC]

Animated GIF is really designed for small animations - small dimensions (anything over 500 pixels is probably too big) and small number of frames.
For larger animations, a movie format is better (MP4, MOV, AVI, etc).

If you look at many commercial animations, they will often only do 2-5 seconds before changing camera view, so work in smaller chunks of a few seconds each and combine everything in your video editor.

FireAlpaca is a paint program foremost, and the animation feature is an add-on, not it's main focus. FireAlpaca is also only 32-bit, so it can only access a limited amount of memory.
Serious animation software is 64-bit and focussed directly on animation.

See also A specific FireAlpaca file won't re-open properly  for some workflow suggestions for working around some of your problems.

If you are working on a serious animation rather than a small "toy" animated GIF, you might want to consider serious animation software such as OpenToonz (for something free and raster-based).
For animation, I am a big fan of the commercial vector/raster hybrid software Moho (formerly Anime Studio) , although many also like Toon Boom Harmony . For a free equivalent, see Synfig Studio .

👍: 0 ⏩: 0

GrimmSkulltheMad [2017-02-16 22:37:54 +0000 UTC]

hey, I re-opened a project I was working on, and every time I erase it erases the background too and leaves some white and grey checker board pattern...
what happened, and how do I fix this?

👍: 0 ⏩: 1

obtusity In reply to GrimmSkulltheMad [2017-03-07 12:10:46 +0000 UTC]

Sorry for the delay replying, I was focussed on other things for a few weeks.

The white and grey checkerboard pattern is normal, and indicates a transparent area (no background) if you were to save to a file type that supports transparency (such as .png - if you show it on a web page the web page background colour/image shows through).

One quick fix is View menu, turn Transparent Background off. The default background is white. If you set background colour under the View menu, it still saves as white, that's only a colour for painting convenience. To get a true background colour, bucket fill the lowest layer, setting the fill to layer, not canvas.


👍: 0 ⏩: 1

GrimmSkulltheMad In reply to obtusity [2017-03-07 17:00:57 +0000 UTC]

oh, I already solved the problem, but thanks anyway^^

👍: 0 ⏩: 0

SHARKIE-BITE [2017-01-04 14:40:38 +0000 UTC]

You were helping people in the Medibang group so why not I ask here aswell.


I accidently removed the 'Colour Bar' bar and I want it back, but I don't know how to bring it back. 
Is there any way to bring it back or do I have to re-download the program?

👍: 0 ⏩: 1

obtusity In reply to SHARKIE-BITE [2017-01-05 03:28:10 +0000 UTC]

Window menu, Color should bring it back (make sure the Color panel is wide enough to show the colour selection areas).

👍: 0 ⏩: 1

SHARKIE-BITE In reply to obtusity [2017-01-05 05:38:15 +0000 UTC]

thank you!

👍: 0 ⏩: 0

foxillefox [2017-01-02 03:10:50 +0000 UTC]

hello how to make a brush scrips by own texture
beacuse i don't understahnd where code scrips for own texture 8"c

👍: 0 ⏩: 2

obtusity In reply to foxillefox [2017-01-02 04:07:06 +0000 UTC]

I have written a series of tutorials for writing brush scripts, you can find them here: obtusity.tumblr.com/post/14652…

👍: 0 ⏩: 0

foxillefox In reply to foxillefox [2017-01-02 03:35:08 +0000 UTC]

and new problem
- why my polkadot opacity still same and can't into transparent like othes brush 

👍: 0 ⏩: 1

obtusity In reply to foxillefox [2017-01-02 04:09:48 +0000 UTC]

Interesting, I get that too, looks like a bug in the brush script.

I do not have time to look at and correct the script today, but a workaround for now is to use the polka dot brush on a separate layer and use the opacity/transparency slider for the layer rather than the brush.

👍: 0 ⏩: 0

MrBIGAL [2015-08-23 21:43:53 +0000 UTC]

Hey, thanks for the watch!

👍: 0 ⏩: 0

sarahpenny10 [2015-08-02 01:24:45 +0000 UTC]

Thanks for the fave! Hope the tutorial is helpful

👍: 0 ⏩: 0

VerticalGhost [2015-06-30 12:50:26 +0000 UTC]

Wow, dude your brushes are put well thought into! How long does it take you to make them?

👍: 0 ⏩: 1

obtusity In reply to VerticalGhost [2015-06-30 13:22:50 +0000 UTC]

Thanks!

Time varies, usually I'm just tinkering with code for a few nights, then I'll get an idea - implementation then takes usually a couple of hours testing different variations, then maybe a couple of nights testing and adding user parameters.

I don't think "I want to create this brush", I think "what else can the API do?" - the brushes are just a side effect.

Once I have working code, variations are usually a lot faster. Most of my time creating the threshold "filter brush" was spent looking up and testing different luminance calculations. The inverse "filter brush" was about ten minutes once I'd worked out that I could call a "filter" only one with a single brush stroke.

The vine brushes were probably six or seven nights, and I must have rewritten the code three times while playing with the idea.

👍: 0 ⏩: 1

VerticalGhost In reply to obtusity [2015-06-30 13:24:38 +0000 UTC]

Oh wow! That takes loads of patience I bet, I could never do that x"D
And that's really cool! I especially like the vine brushes, and I can see how they took a while.

👍: 0 ⏩: 1

obtusity In reply to VerticalGhost [2015-06-30 13:29:46 +0000 UTC]

Strangely enough, while I have patience for programming, I don't have it for art. When somebody produces excellent art, but says they took 8 hours producing it - I couldn't do that.
It's why I like cartooning - I can knock something out fairly quickly without having to spend too much time on it.

👍: 0 ⏩: 1

VerticalGhost In reply to obtusity [2015-06-30 13:35:20 +0000 UTC]

Oooh I like cartooning too ;u; it's much more easier and fun
and also I have a question since I'm a noob at MediBangPaintPro and fireaplaca, how do I choose a color? As in, I need to do an art trade for a friend of mine but I can't find the correct tool to chose the colors of her OC. I know about the palette and stuff, but haven't found a tool that actually chooses the color. Do you know about it? I can't seem to find any tool or window meant for that purpose.

👍: 0 ⏩: 1

obtusity In reply to VerticalGhost [2015-06-30 14:32:17 +0000 UTC]

If you open up an image of her OC, you should be able to use the Eyedropper tool in the toolbar down the left side (or just hold the Alt key down, which will temporarily change the current tool into the Eyedropper tool) - click on the image to change the current colour to the colour you clicked on.

If you don't see the Eyedropper and the hand tools at the bottom of the toolbar (because they don't fit in the screen/window), look for an arrow thingy at the bottom of the toolbar - click on that for a second column of tools (but if you move your cursor off the toolbar area the second column will disappear again). Particularly likely in MediBang Paint Pro, which uses bigger toolbar buttons.

It can't pick a colour that isn't in an open image. If I need to do that I use ColorPix www.colorschemer.com/colorpix_…

OK, well past midnight here, and I have to work in the morning - signing out.

👍: 0 ⏩: 1

VerticalGhost In reply to obtusity [2015-06-30 14:41:56 +0000 UTC]

Ok thank you so much!!

👍: 0 ⏩: 0

ClaySculpts [2015-06-18 18:05:17 +0000 UTC]

Hello ! How I can put lines for ink ?

👍: 0 ⏩: 1

obtusity In reply to ClaySculpts [2015-06-19 03:12:53 +0000 UTC]

If it won't draw at all, File menu > New for a new canvas - the grey area is just a desktop, you can't draw on it.

Do you mean a path/guideline/ruler thingy to guide the pen/brush? FireAlpaca/CloudAlpaca/MediBangPaint calls them "snaps" and they are a row of buttons at the top of the screen when the brush tool is selected.

You are probably interested in the Curve snap. cocobunnie has a nice tutorial on it here: fav.me/d7rl3x0 Draw the curve by click-click-click, like drawing the points in a dot-to-dot picture.
Since that tutorial, another couple of features have been added. You can now move nodes in the Curve after you have drawn it, by holding down the Ctrl key (Cmd on a Mac). You can also save and reload snaps within a document, if you save in MDP format.

If you use a pen/tablet you can draw along the Curve with pressure-sensitivity, if you are using a mouse then turn on the Fade In/Out option of the pen brush.

👍: 0 ⏩: 0

cocobunnie [2015-05-15 03:33:33 +0000 UTC]

Tus, rad brushes! How did you figure out the coding for script brushes??? I couldn't make heads or tails of it! :0

👍: 0 ⏩: 1

obtusity In reply to cocobunnie [2015-05-15 11:44:44 +0000 UTC]

Thanks!
It helps a lot that I've programmed before (mostly in Python, the only language I feel at home in).
Lua, the language that the brush scripts use, is a bit like Python's cartoon robot clone - clunky and jerky compared to the original, but you can see the similarity.
The brush scripts are mostly the brush API function calls ("do this") stitched together with Lua, mostly along the lines of "do this, here" (the hard part is calculating where "here" should be).

These are good examples to start with: d.hatena.ne.jp/MDIAPP/touch/20…
Then have a look at the API: firealpaca.com/bs

Take the simple script at the bottom of the first page link:

function main( x, y, p)
The main part of the script starts here,
does this over and over again
and FireAlpaca keeps telling us
where the cursor is (x and y)
and how much pressure there is (p)
(going to ignore that)

local w = bs_width()
Ask FireAlpaca what the brush width is,
keep a local copy (w) to use it later

local r,g,b = bs_fore()
Ask FireAlpaca what the foreground colour is,
in red, green, and blue,
keep local copies (r, g, and b) of the values

bs_rect( x,y, w,w, r,g,b, 255 )
Draw a rectangle where the cursor is (x, y)
as wide as the brush width setting (w, from our local copy) ,
as tall as the brush width setting (w) ,
use the foreground colour setting
in red, green, and blue (r, g, b),
and fully opaque (255 means no transparency)
(red, green, blue, alpha all go from 0 to 255)

return 1
Pass control back to FireAlpaca (1 = no problems),
so FireAlpaca can tell us
where the cursor is next.

end
No more instructions.

The other scripts mainly get fancy with:
Draw polygon shapes (work out where the corners go)
or
Draw Bezier curve shapes (work out where the points go)
(like a few beads on a necklace, where you move the beads on graph paper to make a shape with the necklace)

... and there's a fair bit of
"draw the shape first, then move it into place"
FireAlpaca will also answer questions about other information,
like "which direction is the brush moving in" - bs_dir()
and "where's the normal" (right angles to the brush direction) - bs_normal()

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-17 16:27:36 +0000 UTC]

Wow, that helps a lot! I only know python in terms of maya, but now that you explain the terms, I can see the similarities! The main reason I'm asking is because I wanted to make the tools more similar to all the sliders you can do in PS (so like adjusting the noise and the range of rotation on the random rotate so it's not the full 360 degrees. That or complex things that I can't do with PS yet, like scripting for a color jitter in a specific range at all times, since using assigned color wouldn't work there.)

How do you get it to source from a specific picture? (So like, the leaves on your vine scripts, for instance.) Or multiple pictures? (Like your vines with leaves and branches.)

Other than that, I'll try to figure it out from this point on! :0 But I'll definitely come to you with more questions, if that's alright?

Sorry for the huge question dump, and thanks again so so much for your help!

👍: 0 ⏩: 1

obtusity In reply to cocobunnie [2015-05-17 21:16:19 +0000 UTC]

I'm afraid I'm not using pictures (I'm not sure if it's possible to use pictures easily from a brush script) - the leaves are Bezier curve shapes (like the Curve snap) created by defining a series of points. The thorns are polygon shapes, again a dot-to-dot drawing approach, the "tendrils" use a library which uses lines drawn along a path (yes, another dot-to-dot approach).

The only way I can immediately see to use picture brushes is to convert the picture to an array of pixel data and use (separately, like the SVG2BS utility) then use that to draw pixels - this would probably be rather slow and clunky.

Hmm, I'll think about it and see if I can think of anything better.

Sure, I'm happy to answer questions as best I can, although it may also be worth posting them to the group, I think there are some other programmers lurking, based on the replies to the last group journal entry about the brush scripts feature in FireAlpaca version 1.2.0

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-18 20:52:11 +0000 UTC]

I could figure out how to do it with points. (Nurb modelling follows the same method.) Do you know what rules it follows? (Order of the axis, what it marks as zero, how to fill the shapes, Do you need to close the shape or is the close implied, etc)

And I'll be sure to ask them as well! I didn't know there were any others, so it's good to know there are others trying to figure it out as well! 

Thanks!

👍: 0 ⏩: 1

obtusity In reply to cocobunnie [2015-05-18 23:08:56 +0000 UTC]

Mostly a dot-to-dot of x,y points. I'm not sure where 0,0 is (top left corner of image), but the examples have mostly followed a pattern of "draw it at 0,0, then move/translate it to the cursor x,y", except for a couple of examples based on x,y points plus or minus a certain distance in x,y. Closing the shape is implied for polygons, not sure about Bezier curves as so far I've closed the curve back to 0,0, but I suspect it is also implied (with a straight line).

More detailed information and examples when I have time (back to work now).

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-22 04:19:52 +0000 UTC]

Ok! I'm kinda figuring out the different types of shapes, thanks to your link. (Thanks so much! It's helping a lot.)

Also I was wondering if you could explain to me how exactly the coordinates work? I understand what to change for ellipses, and I kinda understand how the points are plotted on a polygon. For example:

  • _polygon( x + nx * w/3, y + ny * w/3 )
  • _polygon( x - nx * w/3, y - ny * w/3 )
  • _polygon( x + dx * w, y + dy * w )
I'm assuming that _polygon( x [+/-] nx * w/[translation in x], y [+/-] nx * w/[translation in y]), and the point order matters here. And of course it automatically closed, as you said it would. (I would like to know if them crossing matters? Because that would be a good way to do like. An hour glass symbol or something. I may try that later.)

What I REALLY can't follow is what most of the lines on the bezier curve.

bs_bezier_begin( 0, 0 ) [Just the point of reference, I'm assuming.]
bs_bezier_c( -1, -1, -0.5, -2, 0, -1.3 ) [I'm assuming this is the left side??? but why does it go past 0]
bs_bezier_c( 0.5, -2, 1, -1, 0, 0 ) [And this one does stop at zero??? What is the order on this]
bs_bezier_move( 0, 1.0 ) [What is the point of offsetting this???]
bs_bezier_mul( w, w*0.7 ) [This I don't understand. Like, at all. Even with some healthy googling.]
bs_bezier_rotate( math.random() * 2 * 3.14159 ) [I'm assuming this is just the random function for the rotate. Would there be any way to put in a range instead? Like are >/< valid in lua? And if so, I'm assuming that would go within the random function. And all the extra is to make the random function more random. (If lua is anything like houdini's code, the random function repeats itself after a while.)]
bs_bezier_move( x, y ) [This is just the cursor input, yeah?]

👍: 0 ⏩: 1

obtusity In reply to cocobunnie [2015-05-23 05:08:46 +0000 UTC]

Crossing the polygon outline might cause problems with the fill call afterwards, but it's worth trying.

bs_bezier_begin( 0, 0 ) is the first point on the Bezier curve, not just a point of reference.
bs_bezier_c() is a 3-point curve segment (x1,y1,  x2,y2,  x3,y3)

This helped me understand what was going on:
Get a piece of paper (graph paper if it's handy, or just "eyeball" it on some blank or ruled paper). Put 0,0 in the middle, vertical and horizontal lines down/across the middle for x and y axes (axises?). Allow space to do 0.3, 0.5, etc and up to 2 or 3 in all directions.

Now, beginning at 0,0 plot out each Bezier x,y point, then draw a line from the previous point (so the first line is from 0,0 to -1,-1, then from -1,-1 to -0.5,-2). Why it draws upside down in the negative space, I have no idea, I assume you could also draw in positive space.
The curve draws all the way round and finishes by joining back up at 0,0 (I don't know if that's necessary - no auto-join for Beziers, or if it's just keeping the curve rather than an auto-join straight line).

bs_bezier_move( 0, 1.0 ) [What is the point of offsetting this???]
Moves the Bezier shape so it is more centred around 0,0, makes it easier to rotate later and stay on the drawn line rather than rotating around it like a spiral staircase.

bs_bezier_mul( w, w*0.7 ) [This I don't understand. Like, at all. Even with some healthy googling.]
Multiply (resize) by x,y the Bezier shape. The Bezier points chosen made a slightly tall and skinny heart, make it shorter/fatter/cuter by making it shorter (0.7 times width) in y and full-size in x (width size) - how I wish shorter and fatter was cuter on me

bs_bezier_rotate( math.random() * 2 * 3.14159 )
2 times pi (3.14159) in radians is 360 degrees - like lots of graphics programs, FireAlpaca does rotation internally in radians, not degrees (there are benefits when it comes to trigonometric functions for transforms, etc). So this is saying "rotate randomly within 360 degrees".
Yes, Lua can use ranges, less than/greater than, etc, so you could have a more controlled rotation, but this is simple for random rotation.

bs_bezier_move( x, y ) [This is just the cursor input, yeah?]
Yeah, move the shape from where we drew it (0,0 - wherever that is, top left corner?) to where the cursor is.

Hope this helps!

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-23 06:03:57 +0000 UTC]

OOOOOO the coordinates make way more sense now. I hadn't broken them up that way, just because it didn't occur to me? 6 coordinates with no real seperation just really threw me off. Now that I understand that I also understand the move and everything.

Also it makes a lot of sense why mul would be multiply??? I am going to beat myself up over not seeing that one for AGES ahaha. 
[[Shorter and Fatter is cuter on everyone trust me I am most adorable pudge pudge.]]

uuuuuughhhhh radians. I assume all the math requires the 2*3.14159 then? Because that would make ranges a MESS, especially if you did user inputted ranges. Do you know of any scripts that are using the greater than/less than symbols so I can understand how it needs to be inputted? It's ok if you don't know any I'm sure someone has to have tried that as well. :0

Have you figured out adding user inputs/sliders yet? I only have one script that actually has sliders and pressure sensitive opacity and some of the code is in japanese which does not help ahaha

And yes, it is! Thank you so much!!! If there's anything I can do/draw u lemme know!!! Gotta repay u for being so helpful aaaa

👍: 0 ⏩: 3

obtusity In reply to cocobunnie [2015-05-23 12:55:35 +0000 UTC]

Ugh, re-reading that earlier post it sounds horribly bossy and paternalistic - think of it like this, stop thinking of degrees, go do this, blah. That wasn't the tone I was aiming for, in my mind it was more - scratch head, "maybe try this?".
My apologies if it came across as too "preachery".

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-23 17:01:59 +0000 UTC]

No, no, it was fine! I didn't even notice. But either way you got the info across and that's what's important!!! Thanks again!

👍: 0 ⏩: 0

obtusity In reply to cocobunnie [2015-05-23 09:59:48 +0000 UTC]

The mul/multiply thing is forgivable - rotate is written in full, why not multiply? It is easy to assume it is an acronym or some weird Bezier/trigonometry thing like sine.

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-23 17:02:03 +0000 UTC]

Yeah know that's what I thought. I had assumed it was short for mullerian or something. (Which is a 3D fractal so u can imagine how well that went ahaha)

👍: 0 ⏩: 0

obtusity In reply to cocobunnie [2015-05-23 08:10:35 +0000 UTC]

uuuuuughhhhh radians. I assume all the math requires the 2*3.14159 then? Because that would make ranges a MESS, especially if you did user inputted ranges.

Well, think of it as "amount of turn" and stop thinking in degrees e.g half a turn (180 degrees) is pi, a quarter of a turn is 0.5*pi or pi/2.
Say you wanted to control things in tenths of a turn, so something like:

local pi = 3.14159
local turn_tenth = pi/5

-- draw a flower with 10 petals
for rotn = 1,10 do
   newpetal = drawpetal(w)
   bs_bezier_rotate(turn_tenth * rotn)
end

Do you know of any scripts that are using the greater than/less than symbols so I can understand how it needs to be inputted?

The standard > and < (I only typed the words in full because at the time I was using a touchscreen keyboard, and it was easier then jumping out to punctuation characters and hunting for the symbols), a lot of scripts use less than (<) for minimum width or minimum distance between drawing shapes, thus:

local w = bs_width()
if w < 5 then
  w = 5
end

if not firstDraw then
  local distance = bs_distance( lastDrawX - x, lastDrawY - y )
  if distance < w then
     return 0
  end
end


Have you figured out adding user inputs/sliders yet?

Define a parameter, param1 to para10

function  param1()
  -- minimum, maximum, default value
  return   "Label for the user" , 0 , 10 , 5 
end 

Also works for checkboxes:

function  param2()
  -- off, on, default value/state
  return   "Me! Me! Tick me!" , 0 , 1 , 0 
end 

Then in your script either directly:

bs_bezier_rotate(pi * bs_param2())

or store it in a local variable

local rotn = bs_param1()
bs_bezier_rotate(turn_tenth * rotn)

As for pressure sensitive opacity, remember how FireAlpaca passes pressure (p) to the main function? 
You could possibly just use that for the alpha/opacity value, where required.

Now that you've had a good look at scripting, go run firealpaca.com/bs through Google Translate  (just cut and paste the web address/URL in and you'll get the whole page translated) - you'll find it makes more sense now. Also maybe the first two small sections (well, one and a bit, you can stop when it mentions closures) of tylerneylon.com/a/learn-lua/

No reward necessary, this has been fun in its own right.

Edit: fixed a couple of typos and one code error

👍: 0 ⏩: 1

cocobunnie In reply to obtusity [2015-05-23 17:00:51 +0000 UTC]

Aaaaah, ok! (I'm sorry, I had a lot of trouble with radians when I was still in school and I haven't touched them since ahaha)

Thanks for all your help! This has really been eye opening, and all your resources really helped!!!

👍: 0 ⏩: 0

LexWindTheWarriorCat [2015-04-06 03:15:20 +0000 UTC]

thank you for making these wonderful firealpaca tutorials!

👍: 0 ⏩: 1

obtusity In reply to LexWindTheWarriorCat [2015-04-06 14:13:57 +0000 UTC]

Glad you like them! Let me know if there's anything you particularly want to see a tutorial for.

👍: 0 ⏩: 0


| Next =>