Jump to content

Sepcot

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by Sepcot

  1. A layer can "disappear" from the Layer Window. Still actually there but needs user input before it will revalidate.

    Steps to reproduce:

    1. Open an image

    LayerWindowBug%20(3.0%20Alpha%203)%20-%20Step%201.png

    2. Create a new layer (Layer 2)

    3. Move Layer 2 to bottom

    LayerWindowBug%20(3.0%20Alpha%203)%20-%20Step%202.png

    4. Select original layer

    5. Zoom in 3200%

    LayerWindowBug%20(3.0%20Alpha%203)%20-%20Step%203.png

    6. Gaussian Blur

    7. Zoom Window

    LayerWindowBug%20(3.0%20Alpha%203)%20-%20Step%204.png

    8. Import Layer From File

    LayerWindowBug%20(3.0%20Alpha%203)%20-%20Step%205.png

    -- Layer 2 is no longer visible in the Layer Window.

  2. Not directly, but you can by using multiple layers...

    Create a layer with your gradient.

    Create a layer with your text.

    On "Text" layer, Shift+Magic Wand select the background (adjust tolerance to desired level)

    Switch to "Gradient" layer (while still selected) and press delete.

    Delete "Text" layer.

    Blur/Sharpen "Gradient" layer until text looks correct.

    EDIT: you beat me to it BoltBait

  3. Paint.NET does not support brushes, so you wouldn't be able to follow the tutorial from beginning to end...

    But, Paint.NET does support layers and blending modes, so if you found a background image you like (say the Direct Effect sample image linked to in the tutorial), you can import that image into a background layer, and overlay any color you like to get the desired end effect.

  4. Hey Rick,

    When I was updating my Cloud Effect plugin, I accidentally built against the 3.0 dlls.

    When I tried compiling my plugin, I received a warning (as expected) for EnvironmentParameters.BackColor being deprecated and to use SecondaryColor instead.

    What threw me off was EnvironmentParameters.ForeColor throws an error and won't let me finish building the project. I know ForeColor has been replaced with PrimaryColor, but shouldn't I receive a warning (like I did with BackColor) instead of an error and still be able to build my project? The BackColor function should just make the call to PrimaryColor right?

    (built with Visual Studio 2005 Standard Edition)

  5. * You should probably put the random seed values r1, r2, and r3 into the token. You cannot assume that your configuration dialog was ever called before your Effect, and it looks like you're relying on it to set these values. For example, if I'm using this effect outside of Paint.NET, or if I'm relying on the Effect->Repeat... menu item, your configuration dialog will never have existed and these values will be 0 and we'll have some (presumably) boring looking clouds.

    Fixed in version 1.1 - moved random seed values into the token (and GUI).

    * The "Random" class, from what I recall, is not thread safe. You can work around this by putting the [ThreadStatic] attribute on it. For performance sake, only retrieve this field once in your Render() method and store it into a private method variable. You can check out our Add Noise effect's code to see what we do here. (By the way I'm serious about the performance -- performance went up 10x with the retrieve-the-field-once optimization.)

    Added [ThreadStatic] to the Random class called when the "Reseed Noise" action is triggered.

    I am only calling the Random class once (per click) as of version 1.0. The Noise function in CloudEffect.cs could still be optimized... Looking into it...

  6. but i said i didn't simply wanted that, i want to stretch the last pixel of each row that doesn't have Alpha = 0

    My bad trickman, is this more of what you are looking for?

    void Render(Surface dst, Surface src, Rectangle rect)
    {
       for(int y = rect.Top; y < rect.Bottom; y++)
       {
           for (int x = rect.Left; x < rect.Right; x++)
           {
               if (x > 0) dst[x, y] = (0 == src[x,y].A) ? dst[x-1, y] : src[x, y]; 
           }
       }
    }

  7. I'm not saying that this is at all difficult for the end user, because it shouldn't be, but maybe some of the confusion lies in the fact that the folder in which the "Plugins" go is called "Effects". To make this as simple as possible, for those people who are just that, you could rename the "Effects" folder to "Plugins" in future PdN versions.

    There are two types of Plugins - Effects and FileTypes - and there are separate directories for each.

  8. Could you tell me what do the values do?

    These values are inputs to a Perlin Noise function which generates psudeo random values that determine the look of the clouds.

    Frequency gives you number of noise values defined between each 2-dimensional point.

    Persistence is a constant multiplier adjusting our amplitude in each iteration.

    Octaves define the number of iterations over the noise function for a particular point. With each iteration, the frequency is doubled and the amplitude is multiplied by the persistance.

    Amplitude is the maximum value added to the total noise value.

    Those variables act within the perlin noise function to generate a cumalative total. There are two other user adjustable variables that act upon the total after the noise function that help in defining the finished look of your scene.

    Cloud Coverage is a constant that gets added (or subtracted) to each total. The default value is zero, meaning that the total should not be altered. Adding values will increase the size of the clouds, while subtracting will reduce them.

    Cloud Density is a constant that gets multiplied with the total to increase or decrease the apparent thickness of the clouds. The default value is 1, meaning the total should not be altered. Any number between 0 and 1 will reduce the apparent density (making the clouds appear more like fog).

    More information on the Code Lab implementation can be found in my blog entry at: http://www.sepcot.com/blog/2006/08-2006-PDN-PerlinNoise2d.shtml

  9. I have finally got around to creating the "Clouds" plugin I promised.

     

    Cloud Effect Configuration Dialog (version 1.1):

     

    CloudsDemo.png

     

    DLL Download Link (version 1.1): <broken link removed by EER> (Unzip - Drop the CloudEffect.dll file into your Paint.NET\Effects folder)

    Source Download Link (version 1.1): <broken link removed by EER>

    Edit: Updated to version 1.1

    Changes made (v1.1):

    • 1. Added random numbers to the dialog box for the user to set if they like.
      2. Set default random numbers - same cloud pattern will appear with each invocation (until reseeded)
      3. Moved the GUI around - simple options at the top to more advanced at the bottom

    Left to do:

    • 1. Optimize the noise function

     

    Download >>   CloudsEffect.zip


    (Note: DLL recompiled by @Ego Eram Reputo from original source on GitHub. HDPI fixes by @ReMake May 2022).

     

     

    Plugin can be found under the Effects > Render > Clouds

×
×
  • Create New...