Jump to content
How to Install Plugins ×

Recommended Posts

Posted (edited)

TechnoRobbo's Tesselation Combo

 

New Paste Fill 2.0 and Copy Alpha handle Alpha Channel correctly

 

 

One of my favorite type of graphic is tessellations. I like using them for wallpapers and Powerpoint backgrounds.

 

This Combo includes 3 key plugins to create the effect:

Offset Plugin (Menu: Effects->Object

Paste Fill Plugin (Menu: Effects->Selection) 

Copy with Alpha Plugin  (Menu: Effects->Selection) 

 

 

 

Here's my  Youtube Instructions: http://youtu.be/OPZifrgPuLE

 

Here's a simpler demo http://youtu.be/lRDuYBvWbSc

 

 

Alpha Channel Demo

 

Tessellation example (eyeballs):

EyeOnMona.png

 

 

Everybody, everybody, let's get into it, get stoopid......

 

HorseBall.png

Yay, horsies.....

 

 

PasteFill%20Transparency.png

 

Carabiner.png

 

The Code: 

 

Offset Plugin -  Source Code for Programmers

Hidden Content:

// Submenu: Object
// Name: Offset
// Title: Offset Plugin - v1.0
// Author: TechnoRobbo
// URL: http://www.technorobbo


#region UICode
double Amount1 = 0; // [-0.5,0.5] XOffset
double Amount2 = 0; // [-0.5,0.5] YOffset
#endregion


void Render(Surface dst, Surface src, Rectangle rect)
{
    Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
    double CenterX = ((selection.Right - selection.Left) / 2)+selection.Left;
    double CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top;
    ColorBgra CO;
    double radx;
    double rady;
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        for (int x = rect.Left; x < rect.Right; x++)
        {
            radx= selection.Width * Amount1 + x;
            rady= selection.Height * Amount2 + y;
            CO = src.GetBilinearSampleWrapped((int)radx,(int)rady);  
            dst[x,y]=CO;
        }
    }
}
 
 

 

Paste Fill - VS Source Code for Programmers

 

TRsPasteFillSrc.zip

 

 

Copy Alpha - VS Source Code for Programmers

CopyAlphaSrc.zip

 

 

Plugin Download

Tesselation Combo.zip

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted

A nice pair of plugins, but both have been done before.

 

Offset - see Panelling Effect.  I also made one similar which I didn't ever release because of this sort of duplication (Echo - find it here: http://forums.getpaint.net/index.php?/topic/14832-stereogram-tools-betas/).

 

PasteFill - see Tile Fill from Clipboard

 

I do enjoy reading through your code!  Thanks for posting it.

Posted (edited)

Ego,

 

I assumed there's a lot of duplication around. I was trying to provide some Photoshop functionality that I couldn't find in the stock program.

 

I am trying to get the transparency to work in the Paste Fill.  Success!!!!!

 

Update: I got transparency to work - Posting Version1.1

 

Also the Offset Plugin does not use pixel as an adjustment on purpose it uses -.50 to .50 (half to half) which is important when doing tessellations so you can shift the edge to center and back quickly. Otherwise it's a lot of work.

 

I'm gonna work up one more example to show transparency at work. Done!!!

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted

TR, the new (supposedly v1.1) PasteFill.dll reads as version no. 1.0.4914.41674

I'll be a few days before I can test it but I thought I'll let you know (in case you forgot to upload the newer version).

Xkds4Lh.png

  • 8 months later...
Posted

hi technorobbo,

 

i just started using your paste fill and i like it, although i've found a critical crash bug.

 

i'm using paint.net 4 5168 on a win 7 mid range dell laptop.

 

i'm aware this is user error but in repeated tests, if i attempt to run your plugin without first copying a selection to the clipboard then your plugin's ui starts to hang, even when the cancel button is pressed. then my cpu usage shoots up and i have to use task manager to terminate paint.net.

 

i just thought you should know this, in case no other users have reported it? 

  • 2 weeks later...
Posted (edited)

ratty,

 

I am totally taking my last response back. The Clipboard issue is in PDN's copy routine which, as I understand is going to be updated FOR 4.0, until then (and for those 35.11) I am updating Paste Fill and adding a new plugin that Copies images with Alpha channel so Paste Fill can do it's job correctly.

 

Look for the update in the first post. http://forums.getpaint.net/index.php?/topic/26605-tessellation-combo-v11/?p=392678

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted (edited)

hi tr, understood, and i've just tested your updated paste fill and the new copy with alpha. they appear to be working very well together.

 

one thing i'm puzzled about, is if i use your copy with alpha, then instead of paste fill, i do a standard paste using my test image, i'm getting a light grey color where the alpha 0 would have been. i thought the colors of alpha 0 pixels were always colored black, not grey?

 

if i use standard copy and paste, again without your plugins, it results in a layer with transparency showing any layers beneath it and or the checkerboard. 

 

i hope that all makes sense, are those result to be expected with your plugins? i'm not complaining, just curious.

Edited by ratty redemption
Posted (edited)

Copy with Alpha is intended to work with Paste Fill only.

 

 

Similar Behavior:

  • If you open an image with alpha in Google chrome and copy the image you will see that Paste Fill works just as expected.
  • But if you open the same image with PDN - Copy(PDN)  and Paste it with Paste Fill it will have an opaque background.

 

In other words the big difference is "who is setting the clipboard".  If it's Copy with Alpha  or Google Chrome - alpha is preserved and works with a plugin. If it's PDN it works with PDN's internal routines. 

 

So my conclusion would be - Copy in PDN is meant for PDN. If Alpha is not an issue it will work with an external program.

 

I'm not sure why the background becomes grey. No other color appears altered (tested with eye dropper). I'll have to do some image comparisons and get back to you.

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted

I did some test on the grey image and it appears that PDN pre - multiplies with grey as opposed to pre-multiplying with black because it yields a better blend with background image. Black actually darkens the background image but grey acts as a neutral and looks more natural.

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted (edited)

Here's a test I conducted.

 

I took this file:

prem1.png

 

 

Copied it from google chrome and I got this - notice how the alpha darkened the sky incorrectly.

prem3.png

 

then I used the Copy with Alpha (grey premultiply) - note how it correctly fades out without darkening the sky

prem2.png

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

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.

×
×
  • Create New...