Sign in to follow this  
welshblue

Cross Stitch Text & Canvas

Recommended Posts

At this all weekend.  Realized the 'x's' really need to be like the ones used in the cross-stitch font. Making an 'x' with two straight lines, no matter the width doesn't look realistic.

 

So here's an updated version of my Heart.  I think it looks much better.

 

crossstitch_03.png

 

@welshblue, here's your flower that you linked to in a previous post.  This took all afternoon on Sunday. It was time-consuming and tedious.  Looks pretty decent, though.

 

crossstitch_04a.png

 

Which leads me to some thoughts.  TileWorld isn't any more convenient than the method I used above; Selected the inner pieces and used BB's 'Fill from Clipboard' with an 'x' shape I made, then madly erased.

I am becoming intrigued with @Ego Eram Reputo 's 'CellMaker Rev' found here.   Can the cells be replaced with 'x's'?  I love the added options in the revised version.  That could make cross-stitching a shape so much easier.  The code is posted right in the thread.  My knowledge of coding is very limited. For me, it might be like trying to find a needle in the proverbial haystack.

 

Well, just some thoughts. Anyone have any success with other methods?  :)

 

  • Like 3
  • Upvote 1

Share this post


Link to post
Share on other sites
2 hours ago, Ego Eram Reputo said:

I can do that for you. Give me a day or two.

 

Thank you!  <3

 

P.S.  @Ego Eram Reputo    Could you please post the code so I can compare and learn a little more?  Tx

Edited by lynxster4
added PS

Share this post


Link to post
Share on other sites
13 hours ago, lynxster4 said:

It was time-consuming and tedious

 

You've got further than me.  I think I've the attention span of a goldfish.

Great results @lynxster4 and @Pixey - very believable

11 hours ago, Ego Eram Reputo said:

I can do that for you. Give me a day or two.

 

What are the chances of using an image from clipboard for the base instead of an actual image on the canvas , or would it be a coding nightmare 

Share this post


Link to post
Share on other sites
10 hours ago, welshblue said:

 

What are the chances of using an image from clipboard for the base instead of an actual image on the canvas , or would it be a coding nightmare

 

You'd be better using TileWorld. While it doesn't have a clipboard option, it does allow you to tile a different image.

Share this post


Link to post
Share on other sites
1 hour ago, Ego Eram Reputo said:

You'd be better using TileWorld

 

I did have a little play on ... can't remember.  Will play some more.  Thanks

Share this post


Link to post
Share on other sites

I'm only going to release this version here because.....it sucks. No really. I hate the way this plugin is coded and the way it works. I AM going to rewrite it and release it properly.

 

In the meantime this version will render Xs in place of the cells. When rendering Xs, the cell height is ignored and the cell defaults to square. Making this sort of thing possible...

 

Cell-Maker-Rev-1-2-demo.png (Rendered once with cells and again with Xs).

 

Here's the code....CellMakerRev.cs

 (you'll have to load this file into CodeLab and build it yourself)

 

The major changes (for you Lynxster....)

 

Line 12:

ListBoxControl Amount3 = 3; // Style|Hard Corner | Soft Corner | Rounded Corner | X

Drops the original slider and supplies a listbox for choosing the newly named Style (used to be Corner options).

 

Line 45:

    //for (int y = rect.Top; y < rect.Bottom; y++)
    //    for (int x = rect.Left; x < rect.Right; x++)
    //        dst[x, y] = src[x, y];

    dst.CopySurface(src, rect.Location, rect);

Replaces the preceding three lines to more economically clear the destination canvas.

 

Lines 126 to 139:

                    case 3: // render diagonal X
                        // 
                        int fred = x % CellWidth;
                        int mary = y % CellWidth;

                        int mike = 3;
                        if (fred > mike && mary > mike && fred < CellWidth - mike && mary < CellWidth - mike)
                        {
                            if ((fred == mary) || (fred + mary == CellWidth))
                            {
                                Pix = PrimaryColor;
                            }
                        }
                        break;

Uses the new option from line 12 (case=3) to create an X. Note the percentage sign is shorhand for Modulo (divide one number by another and keep the remainder). Its a neat way of clipping a value to a zero to N range. Fred and Mary are therefore offsets into the cell which [x,y] are currently in.

 

"Mike" is a little bit of spacing I included to separate the Xs. If Mike is set to zero instead of three (line 131) the Xs join up. I thought they looked better with a bit of spacing.

  • Like 2

Share this post


Link to post
Share on other sites

Thank you @Ego Eram Reputo <3   I'll play with this and see what's up.  I appreciate you taking the time to modify the code for me.

 

Hopefully, we'll get a great version of this released.  PS can do this with Layer Styles; I'm just trying to up our game.  ;)

 

Share this post


Link to post
Share on other sites
4 hours ago, lynxster4 said:

  PS can do this with Layer Styles; I'm just trying to up our game. 

 

Now a stroke path in PDN with custom brushes would be immense.  For me personally I think with a bit of workaround  PDN can do most that PS can layer style wise ... except stroke path.  To paraphrase a saying ... I'd give the last remaining one for that

 

cellmaker.jpg

 

Ran cellmaker in red primary, outline object in same colour ... but I erased too many exes before running Fragment on a duplicate layer

Close but no cigar on this attempt

 

As in me, not the plugin

Edited by welshblue
  • Like 1
  • Upvote 2

Share this post


Link to post
Share on other sites

With the revision of CellMaker, I found this a lot easier to do.  Here's an example:

 

crossstitch_05.png

 

I used Outline Object (pyro's) at 1, 240 and a color slightly darker than used for the 'x's'.  Drop Shadow at -1, 1, 0, 0, 190.

 

Fragment wasn't working for me, so I nixed it. Duplicated layers and used G'mic - Hard Sketch at 96.00, all else at default, on top. Set to Multiply.

 

It's not perfect, but we've come a long way in a short time!  Thanks @Ego Eram Reputo!   <3   :)

 

And thanks to @welshblue for putting this out there.  <3   :)

 

Edited by lynxster4
  • Like 1

Share this post


Link to post
Share on other sites

@Ego Eram Reputo  I looked at the code last night and I didn't understand a lick of it.  I saw what you added and maybe it's a little too 'mathy' for me.

 

I'd like to know what determines the spacing between the x's?  I think they are a tad too far apart. Is that possible to change?

 

I'll have a better look this weekend. I'm usually too tired after work after I've been doing math all day. (ironic, isn't it?)  :lol:  (something keeps telling me that I'm overthinking this whole coding thing)

 

Cancel the spacing question.  I just re-read your post from Tuesday and you say it right there...duh  (I must be working too hard...)

 

 

Edited by lynxster4
added last comment

Share this post


Link to post
Share on other sites
5 hours ago, lynxster4 said:

I looked at the code last night and I didn't understand a lick of it.

 

I looked at it and thought mike && mary ... fred && mike ? 🤨 ... then thought, I'd have more chance of understanding it with some mary & jane in my hand ... 🙊🏳️‍🌈

  • Like 1

Share this post


Link to post
Share on other sites

Normally I'd make the variable a little more descriptive. I thought you might like them 😄

 

8 hours ago, lynxster4 said:

I'd like to know what determines the spacing between the x's?  I think they are a tad too far apart. Is that possible to change?

 

Glad you found the answer was Mike. See how creative naming of variables can be fun?

Share this post


Link to post
Share on other sites

Hmm, I might make my own version of that plugin, but as a filter for G'MIC, but with PDN, one would need to copy a image to use as a reference/target image. so that one isn't restricted to just a x.

Share this post


Link to post
Share on other sites

@lynxster4 and everyone material interested ... if you render small x's outline them (for now) and play with Noise >>> Median you get some pretty decent patterns for materials

 

 

 

Edited by welshblue
  • Like 1

Share this post


Link to post
Share on other sites

Just putting this out there

 

Using @Ego Eram Reputo's CellMakerRev  render your x's on it's own layer ... then outline it.  I used Drop Shadow but the other outliners work too.  I went 2 pixels outline

 

Effects >>> Noise >>> Median.  Percentile between 75 & 90 seems to work best  Then play with the Radius slider.  I clicked 1 @ increments 

Different sized x's give different results.

 

Cell-Rev-Material.png

 

Edited by welshblue
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

Love your 'silky' materials @welshblue   <3  Very nice!

 

With @Ego Eram Reputo's permission, I'm posting a revised CellMaker dll which adds a spacing slider for the x's.  EER looked over my revisions and gave me a few tips on how to simplify it.  Thank you EER!   This will also appear in the Effects-->Test menu.   It's just something for us to play around with until EER rewrites the code.

 

Cell-CS Maker Rev1.dll               Save to your computer and copy or move it into your PDN Effects folder.  Have fun!  :D

 

  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites
1 hour ago, lynxster4 said:

Have fun! 

 

It works great.  The spacing is a nice addition.  

 

I'm still trying to work out who mike, mary and fred are 😛

Seriously though, after looking through the code I 'll definitely stick to being a plugin cruncher not a writer ... straight over my head

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this