mysticsymbolic / mysticsymbolic.github.io

Fun with procedurally generated visionary art!
https://mysticsymbolic.art/
Other
52 stars 11 forks source link

Multiple bounding boxes in single composition #90

Open ninapaley opened 3 years ago

ninapaley commented 3 years ago

Related to #89 : This same composition: Queens and Kings_1 Could specify the sword, cup, and sun/halo with multiple bounding boxes: queen bounding boxes Thus far we have been using magenta bounding boxes. Here I used different colors for different symbols, but perhaps the code could be sensitive to SHAPE, and put long skinny symbols into long skinny bounding boxes, and square-ish symbols into square-ish bounding boxes? We should discuss this and come up with a plan for assembling compositions like this!

toolness commented 3 years ago

Ah cool I think I can change the code to deal with shape! I think...

ninapaley commented 3 years ago

I put a file called Queen_comp.svg into assets/compositions. This file contains the following layers, also relevant to #89 :

  1. Top layer: Outline of the Queen and the border Queen_compA
  2. The "cloak" mask, color 381578 (purple) Queen_compB
  3. Bounding boxes for nesting symbols. I went with color 239E46 (darkish green) Queen_compC All 3 boxes are the same color, but different SHAPES. The goal is to have the program identify long skinny shapes (like the sword), moderately rectangular shapes (like the cup), and square shapes (like the sun). I put matching green ORIENTATION ARROWS above the hands. These shouldn't be superimposed with any anchor points after all; only their ORIENTATION should match the anchor point of the nested symbol. That way, the sword will point "up", as will the cup. Not a big deal here, but in other compositions orientation won't be as obvious. For the sun/halo, I used a CIRCLE instead of an arrow. My hope is this alone will tell the program the nested symbol should ROTATE.
  4. Bottom layer, square background mask, in a lovely dark magenta color C10077 Queen_compD Since this composition has two masks, I used different colors for them. If we stay with this color code, the layers will be in this order:

A. TOP: Main image, with usual black and white fill/stroke scheme B. MIDDLE: Mask color 381578 (purple) C. MIDDLE 2: Nested symbols. These too will be masked by the background square. D. BOTTOM: Mask color C10077 (dark magenta). Notice this masks everything, including any nested symbols, like the sun, that spill beyond its borders.

Does that make sense, @toolness ? Please ask questions if it doesn't!

ninapaley commented 3 years ago

And I've already complicated this with my second composition file, Knight_comp.svg. Because in this one, at least some of the nested symbols should be on the top layer, in front of the knight rather than behind! Whoops. Also I was wondering if certain fill areas were color 381578 (purple), if that would be sufficient for masking. If not, I will re-create Knight_comp.svg to have a mask on one layer. I know doing masks by color-coding alone isn't sufficient for masking in Moho - I have to make separate mask layers for that - but I might as well find out if it's even possible. Never mind, see next comment.

ninapaley commented 3 years ago

I slept on it and awoke with better ideas for Knight_comp.svg. The new file is in assets/compositions, and follows the exact same layer structure as the Queen, above. Knight_comp_4 I am amazed by how many hours these simple compositions and specifications require, but I guess that's because I'm developing a grammar for them, not just art. Notice the "sword" bounding box is angled. The orientation arrow is likewise angled, so the sword should be angled accordingly.

ninapaley commented 3 years ago

@toolness I have re-organized and re-exported the queen_comp.svg and knight_comp.svg tarot card comp files. Compressed attached: queen_comp.svg.zip knight_comp.svg.zip

They're also both in assets/compositions.

Please note I have changed the layer order. New layers are (from top to bottom):

  1. mask*
  2. art (ie art_queen or art_knight)
  3. boundingboxes subfolder, containing 2 or 3 layers with names like boundingbox_left and boundingbox_right)
  4. BG_mask_square, the background mask and limiting mask for everything else

*The mask fills currently have strokes. Masking in Moho allows the option to "exclude strokes" from a mask. If such an option is available in your masking, we should use it. If not, I can remove the strokes henceforward.

toolness commented 3 years ago

Cool! Ok, so I think that I should move forward by first implementing either the "substitute any symbol into this box" aspect of the tarot card, or the "substitute any kind of funky fill in for this masked area" aspect, but not both, because that's a bit overwhelming right now. Do you have a preference on which aspect I start exploring first?

Another way to put it: imagine that this wasn't a random tarot card generator, but just a static tarot card. What one thing would you want to make randomizable first?

ninapaley commented 3 years ago

@toolness If you haven't picked one yet, I'd say work on the fills first. I can easily imagine how the symbol substitutions will look, but the fills will be a whole new direction to explore (and design to!).