MJW

Members
  • Content count

    1,393
  • Joined

  • Last visited

  • Days Won

    30

Everything posted by MJW

  1. NormalMapPlus v1.0

    Thanks, null55. I'm glad to hear it doesn't crash, even though we don't know what change avoids the bug. If you want to make a non-CodeLab version, it would be very easy to do.
  2. NormalMapPlus v1.0

    I finally found time to complete my changes to the CodeLab implementation of Normal Map Plus. The goal was to fix the edge-line artifacts when the zoom level doesn't show the entire image, but I'm also interested in whether by some chance it fixes the crash. My previous version now crashes on my system, though I made no changes to it since when it worked. Presumably that's due to a Windows update on my computer. So far, my new version doesn't crash for me. Perhaps some change I made happens to avoid the problem (or perhaps not). Here is the DLL: NormalMapPlus.zip I made quite a few changes, and I haven't had time to do a thorough test, so nothing is guaranteed. Here is the code
  3. eraser not clean

    The checkerboard is just Paint.NET's way of showing you that the area is transparent. It isn't part of the image. If you save the image, the checkerboard pattern won't be saved. If the areas were made white, you'd be unable to tell the difference between white regions and transparent regions. If you want white when you erase, create a lower layer and fill it with white. If you want to make areas white, not transparent, use the paintbrush instead of the eraser.
  4. Photobucket sucks.

    I wonder if there's any way this change could be made site-wide, with a script. (Though I also wonder how long this will last, before Photobucket shuts it down.) EDIT: Naturally, running such a script would need to be dome by someone with administrative privileges on the site. I know almost nothing about site administration, so I have no idea if anyone has such direct access to the site files.
  5. CustomBrushesMini v2.2

    Posting to plugin threads is always proper, no matter how old the thread is.
  6. Object of the Fortnight - Discussion thread

    Thank you very much, Maximilian!
  7. Object of the Fortnight - Discussion thread

    In case it's not clear, my entry is my favorite summertime beverage, iced tea. I'm not sure the condensation on the glass "reads" as well as I might hope, especially in the somewhat reduced size from the original. I doubt have have more time to work on it, though.
  8. I'm trying to find a method to controllably make a region more transparent. What I want is something like the Eraser, but instead of entirely erasing the area, it would just decrease the opacity, so that multiple passes would be needed to erase a region entirely. Is there a method or plugin tool that can do that?
  9. Many, many thanks, AndrewDavid! That's exactly what I need.
  10. Thanks Iron76. The problem is, I want to smoothly fade out some parts more than others in a very specific manner.
  11. Paste From Clipboard copies the clipboard image into the current selection, or into the entire canvas if there is no selection. It's in the Selection submenu. It has quite a few options for pasting the clipboard image, including blending with the image in the canvas. The plugin: PasteFromClipboard.zip The UI: The controls are: Tiling: Specifies how pixels outside the clipboard boundaries are treated. Pixels outside the image range of the clipboard can be transparent, Clamped, Tiled, Alternately Tiled, or Brick Tiled. When Alternately Tiled is selected, the tile orientation is reversed for every other tile, so that the tiles match at the edges. The edge pixels are not repeated. When Brick Tiled is selected, every other row is offset by half the image width. The rows do not wrap from the top to the bottom. Size: Increases or decreases the size of the clipboard image. XY Proportion: Changes the XY proportion of the clipboard image. Moving the control right increases the X size while decreasing the Y size. Moving the control left decreases the X size while increasing the Y size. Offset: Moves the clipboard image relative to the selection or the canvas. Rotation: Specifies a counterclockwise rotation angle for the clipboard image, in degrees. Blend with Canvas Image: When this option is enabled, the clipboard image will be blended with the image in the canvas instead of replacing it. Blending Mode: Specifies the blending mode to use when combining the clipboard and canvas images. Clipboard Opacity: Specifies the opacity of the clipboard image. This value is combined with the opacity of the clipboard pixels. Offset Relative to Canvas: When this option is enabled, the Offset is relative to the entire canvas instead of the selection. Antialias: Specifies that antialiasing should be used. Antialias Quality: Specifies the number of samples in each direction per pixel. EDIT 1: Version 1.1.*. -- Modified antialiasing so tNew hat only clipboard is subsampled, not canvas. This avoids blurring of canvas image when antialiasing is enabled. EDIT 2 (5/21/2017): Version 1.2.* -- Disabled Antialias Quality control when antialiasing is disabled.
  12. This is a short comment on the advantages of 24-bit height maps. A height-map is an image in which the color of each pixel corresponds to a height. Generally black represents the farthest distance, and white the nearest. Commonly, height maps are 8-bit-precision gray-scale images. (Color images are converted to grey-scale, by, for instance, using the intensity.) The problem with such a representation is that 8 bits is not sufficient to represent many smooth surfaces. This results in artifacts, such as waterlines where the levels change. The solution is to combine the R, G, and B color channels into a single 24-bit number. This can be efficiently done in PDN, because the 32-bit ColorBgra colors are stored in what in the C language would call a "union." That is, the 4 BGRA bytes can also be accessed as a 32-bit integer. The integer values of ColorBgra colors can be obtained and saved using the Bgra field (e.g, src[x, y].Bgra). For 24-bit height maps, every color corresponds to a height. It may seem like there would need to be special handling for gray-scale height maps, but that isn't the case. Grey-scale height maps represent a subset of 24-bit maps; specifically, they represent the heights n* 0x010101, where n is between 0 and 255. Therefore, any plugin that can handle 24-bit height maps can also handle 8-bit gray-scale height maps. (Which is the main point I wanted to make with this comment: most height-map-type plugins can have the advantages of 24-bit height maps without alternating the way they work with gray-scale maps. That is, of course referring to the user's point of view; obviously the code would need to be modified.) Producing gray-scale height maps is quite simple, while producing full-precision 24-bit height maps is more difficult, since the height doesn't have an intuitive correspondence to the color. Full-precision height maps for simple objects, such as spheres, can be produced with plugins such as Render Sphere Height Map. The height maps can then be modified and combined using the Texture Merger. Gray-scale images can be smoothed into 24-bit maps using the the Texture Smoother. Plugins that want to treat images as 24-bit height maps can't use the normal interpolating Surface routines, such as GetBilinearSample, since those routines interpolate the color components individually, so I wrote some extension routines (called ZSurface.cs) to access the 24-bit height maps in a similar fashion:
  13. SOTW#170 - Entries - BIRDS.

    I try to avoid using stock photos in my sigs, but this time I surrendered to temptation and used the following image: http://cdn.pcwallart.com/images/falcon-wallpaper-2.jpg
  14. Object of the Fortnight - Discussion thread

    Believe me, toe_head2001, you efforts as host of OOTF are greatly appreciated. I didn't intend my comment as criticism, just as a suggestion.
  15. Object of the Fortnight - Discussion thread

    I hate to be a stickler, but the rules for this topic require it be transparent glass: A transparent coffee cup would be fine. I don't think it needs to be absolutely transparent -- somewhat translucent is okay -- but I think the liquid should be visible through the glass. EDIT: I see that the specific requirements aren't listed on the topic thread. It would probably be better if they were, since it's possible not everyone checks the discussion thread. It may be unsportsmanlike to exclude entries that seem to qualify based on the topic description. I'm not sure what's the best thing to do.
  16. Image "Warping?" Help

    You might also want to consider Paste Warp+.
  17. NormalMapPlus v1.0

    I know exactly why the artifacts occur, and why they don't occur with a blank image. It's just a matter of fixing the problem. I knew the problem existed in the code, and added a comment about it: UL = (Float4)src[0, y]; // (This, and similar statements are wrong. Should be something like src[left, y].) Because I didn't know the visible ROIs are passed separately, I thought it would not matter as long as there wasn't a selection, which is almost always the case for this type of plugin. In line with my "direct port" approach, I didn't fix it.
  18. NormalMapPlus v1.0

    It definitely helps, though I can't off hand explain how that could happen. I wonder if it's a less extreme manifestation of the problem that causes the crash. Maybe I'll be able to reproduce it on my system so I can investigate its cause more easily. EDIT: I had a thought (and this will only be meaningful to plugin writers). Perhaps for some reason PDN passes different ROIs depending on the zoom level. I don't know why it would, but it would explain this problem. I don't think it would expalin the crash, but I'll have to give that more thought. EDT 2: My assumption is now that PDN passes the ROIs for the visible region separately, perhaps either before or after the ROIs for the invisible region. That would explain the line-artifact problem. I don't have time to fix it now, but I'll try to make a new CodeLab version tonight. The code could then be easily converted to the non-CodeLab version.
  19. NormalMapPlus v1.0

    Unfortunately, thanks to Photobucket, I can't see the artifacts being discussed. If you could describe them, or better yet post a picture, it would helpful. In theory, the zoom level should have no effect. The plugin has no idea what the zoom level is, and always gets and sends the same data no matter what it is.
  20. plugin for "headline" text?

    A useful trick when using the Text tool is to type the text, set a reasonable font size, then open the list of Font styles. Put the mouse cursor over a style, but don't click. Instead, use the Up and Down keys to move among the styles. Before BoltBait mentioned this method, I spent a lot of time clicking one style at a time until I found the one I liked.
  21. NormalMapPlus v1.0

    Oh, I see. Thank you. I'll probably take a look at the code. The fact that it's based on GPU code probably explains the rather odd way it treats each of the color components the same way, rather than just computing in some fashion a singe height from each color, then using those to calculate the derivatives.
  22. NormalMapPlus v1.0

    Null54, I'm not clear on what improvement is being suggested. That is how the plugin computes the derivative, and I think it's a pretty good method. Well, actually, the plugin stores the results one pixel to the right of where it should, since it saves the nine neighbor pixels in variables at the end of the loops, then increments x. That should be fixed.
  23. NormalMapPlus v1.0

    The problem doesn't occur on my system, so I can't debug it. One thing I'd try if I could debug it is removing the line: [StructLayout(LayoutKind.Sequential)] from the Float4 definition. The line should be harmless, and I believe it's the default, but it's also not necessary. The only reason I suspect it is because it's one of the few usual things I see.