Jump to content

Rick Brewster

Administrator
  • Posts

    20,657
  • Joined

  • Last visited

  • Days Won

    378

Posts posted by Rick Brewster

  1. 4 hours ago, Ropaporg said:

    To troubleshoot this issue I need to know if this is my machine only, or has this occurred with other paint.net users?

    Works fine here, must be something specific to your system.

     

    4 hours ago, Ropaporg said:

    Historically, I have been able to close windows with the Shift key while I click on the X in the top right corner to permanently set the window size and position upon reopening the application.

    I have never heard of this functionality. Likely this was maintained by some other program you forgot you had installed.

  2. 3 minutes ago, Le Bourgeois said:

    System.IO.IOException: The process cannot access the file 'P:\formation hypn\LundisMieuxVivre\AgilitéMentaleDirigeant2023\TapisJeu2023-12-24th.pdn' because it is being used by another process.

     

    The file is locked by another program. This isn't Paint.NET's fault -- something else on your PC is preventing Paint.NET from accessing that file.

    • Hooray 1
  3. 6 hours ago, MrG said:

    paint.net seems to save 100% the same quality.. in just 25% of the size of the file!

     

    There are two likely causes for this:

    1. Paint.NET is saving with compression enabled, but the other app isn't
    2. Paint.NET is loading a high-bit-depth image (e.g. 64-bit BGRA), converting it to 32-bit BGRA in the process, and is losing precision even if you can't visually discern the difference.

    I'd be wary of 2 -- you will want to check the bit-depth of the image before opening in PDN. 

     

    For example, I have a 64-bit TIFF in my test images folder, when you inspect its properties it says it's 64-bit:

     

    image.png

  4. 21 hours ago, MrG said:

    Exception:

    PaintDotNet.Imaging.ImagingComponentNotFoundException (0x88982F50)

     

    This error indicates that WIC is unable to identify the type of the file (JPEG, TIFF, etc.) from its contents. It does not use the file extension for determining the image type. So it is definitely not a TIFF, at least not by WIC's understanding of them, even if it has a file extension of .tif / .tiff.

  5. pyrochild’s plugins with custom UI, like that one, do not work correctly in what we used to refer to as “high DPI” (any scaling other than 1.0x which is 96 DPI). 

     

    He hasn’t shown interest in updating his plug-ins, or responding to any inquiries of any kind, so I would not expect a fix.

    • Upvote 1
  6. This is a GPU effect plugin I've been tinkering with for the last year or so. It's based on the P² Quantile Estimator algorithm as described in these 4 blogs posts: Part 1  Part 2  Part 3  Part 4

     

    This effect will show up in Effects -> Artistic -> Median Sketch. I'm planning to include this in Paint.NET v5.1 once it is released, but for now you can enjoy it as a plugin!

     

    Download: MedianSketch.zip 

     

    Source Code is also available.

     

    My initial goal was to port Effects -> Noise -> Median to the GPU, as @BoltBait wanted it for use in the effects he was porting to PDN 5.0 and the new GPU effects system. However, this fell apart quickly because shaders cannot allocate the block of memory needed to grab an arbitrary number of samples, sort them, and then pick the middle (median) value. (Not only is it not possible, it would need an ungodly amount of memory since every pixel executes in parallel to the other pixels.)

     

    Instead I needed a median approximation algorithm, one that uses a small fixed amount of memory, operating on a "stream" of values where you don't/can't know or store all of the samples at once. I eventually found it in the blog posts linked to above. After a lot of experimentation, I was finally able to get it to work and to produce results that were almost identical to the regular median effect. However, it also required an INSANE amount of time to execute: compared to the CPU-based Median effect, this GPU-based approximation could easily take 100x longer to execute ... on a GeForce 4090!

     

    Things became much more manageable once I dialed down the number of samples and the rendering passes ("iterations"). It also produced a more artistic effect akin to some kind of coarse-grained brush stroke painting.

     

    You can think of this algorithm as taking a Monte Carlo approach to calculating a median. Instead of using all the pixels in the given radius, only a random subset of those pixels are used. Visually it reminds me a lot of how some newer games, like Cyperpunk 2077 and Alan Wake 2, do some of their path-traced rendering, especially for reflections (esp. Alan Wake 2's intentionally distorted mirrors). Instead of rendering all pixels at full fidelity, which is prohibitive for performance reasons, only some of the pixels are rendered and then the rest are guessed/interpolated/extrapolated.

     

    A high-end GPU is not required, but you will appreciate this effect more -- especially at the highest values for Radius and Iterations -- if you have a modern discrete GPU such as a GeForce 1060, AMD Radeon RX 580, or newer.

     

    Here's an example using a stock photo by Ali Pazani:

    image.png

    image.png

    Here's another example using a picture of a Ferrari. First screenshot is the original, then using Median Sketch at default settings, and then with the Percentile set to maximum:

    image.png

    image.png 

    image.png

     

    Another example of how this can create a brush stroke-y art effect:

    image.png

    image.png

     

     

    • Like 3
    • Upvote 4
  7. As long as an IndirectUI effect is using the set of standard built-in types, and isn't trying to use raw objects in its properties, it should be auto-serializable.

     

    IndirectUI plugins can't do this on their own; their UI is declarative, with no room for customization beyond what's available in-box. So what works for Planetoid will not work for them.

     

    The reason I'd be targeting IndirectUI effects is that they are by far the vast majority of effect/adjustment plugins out there (and the majority of built-ins as well).

×
×
  • Create New...