Jump to content

MJW

Members
  • Posts

    2,856
  • Joined

  • Last visited

  • Days Won

    70

Everything posted by MJW

  1. Yes, I know this is an ancient thread, but I'll add as a requiem that I wrote a little plugin that might help with this sort of thing.
  2. This is a plugin I wrote a while ago, which I posted to a thread titled crop black and white images down to the smallest rectangular size that contains the black part. Apparently inspired by the thread's title, I chose the rather awkward name Unselected Rectangle Keeper. It's in the Selection submenu. It has no user interface. This is the plugin: UnselectedRectangleKeeper.zip The icon: What it does sounds kind of strange, but is useful for cropping images to the smallest region that doesn't match the surrounding color. If you have a rectangular selection which contains a non-selected region, it erases everything in the selection that's outside the bounding rectangle of the non-selected region: To crop to the smallest rectangle containing something not matching the color of the background: Use the Magic Wand with a low tolerance to select the outside color. Run Unselected Rectangle Keeper. Deselect. Use the Magic Wand to select the transparent region. Invert the selection. Crop to the selection. Example: Before (white region is selected). After. The code: EDIT: Added link to plugin (which I completely forgot to do). Thanks for the reminder, lynxster4! EDIT 2: Added the source code. (Using the "firstTime" flag is no longer necessary. CodeLab now supports PreRender.)
  3. Seerose, try it again, using the image I just posted. I think you will be successful. As Pixey says, it's a very complex plugin, with many, many things to keep track of. Believe me, I still get confused by things not working how I expected them to work. (Usually it's because I forgot to change a control back to the default value after changing it in a previous step.)
  4. Seerose, you have the wrong image in the clipboard. Instead of the black-and-white grid, you need to have the height map of the sphere with the grid added. I.e, (This is the height map produced in Part II of the tutorial.)
  5. Pixey, the reason Divide Clipboard Height Scale by Ten shouldn't be set in your demonstration is that you type in 0.015 instead of the instruction's 0.15. I think maybe I'll change the instruction to eliminate setting the checkbox, and specify using 0.015. The checkbox is useful when using the slider to adjust a small value, but isn't helpful when the value is typed in. I set it out of habit, since that's what I typically do when using small textures in the clipboard. BTW, if you type a value in a slider edit box, you can cause it to be entered by clicking in any other slider's edit box. That's useful to know for the Texture Merger, which seems to require a lot of typed-in values. Thanks for making the video! EDIT: In Patrt II, I removed the instruction to set the checkbox, and changed the scale value to 0.015. I also added a note about how to enter typed-in values.
  6. I see that one (and the gridded sphere looks perfect).
  7. Not unless the picture was intended to be a blue square saying "postimage - free image hosting image not found or was removed." (In other words, the image still doesn't show up for me.) EDIT: Just in case, I cleared my browser cache. Still no go. The image in your November 8 comment, which also appears to be from postimage, shows up correctly.
  8. Seerose, your image shows up for me as: "postimage - free image hosting image not found or was removed."
  9. If you write it to a file from PDN, then restart PDN and read it back in, does the hidden image remain? It did when I tried it. However, when I uploaded my test image to PhotoBucket, the PhotoBucket version did not have the hidden image. All the transparent pixels were black when made opaque. Perhaps the same thing is happening to you.
  10. As Iron67 says, they must be saved as PNG, or perhaps some other lossless format. I wondered if PNG would preserve the colors of transparent pixels, since it could conceivably view all transparent pixels as equivalent. I tried it, and the colors were preserved.
  11. Assuming I understand what you mean, conceptually, it's very simple: If a pixel's alpha is 0, the RGB color can be anything. So transparent pixels can contain any picture you want. Practically, it's slightly complicated, because lots of methods of making pixels transparent set the RGB color to a specific value; usually white. Fortunately, dpy's Color>Alpha_to_0 plugin only changes alpha. To make a picture with a hidden image, you can: Start with a picture with both a non-hidden and a hidden image. Select the part you want to make hidden. Run the plugin Color>Alpha_to_0
  12. I think you're using the wrong height map in the clipboard. It should be the gridded sphere not the grid, itself. I did what I should have done in the first place, which is insert the height maps to use into the comment. Try it now and see if it works. EDIT: Changed answer after looking at it more closely. EDIT 2: In Part II, I just corrected the Merged Height Scale, changing it from 25.5 to 255. (This was because there used to be a "Scale by 10" option that was enabled. Now the large range is the default.)
  13. A bit of advice on drawing lines. I'd create two transparent layers above the image. On the first, I'd sketch the lines with the Pencil tool. Once all the line placement had been worked out, I'd change the opacity of the layer to make the Pencil lines lighter. Then I'd switch to the other added layer, and use the Line/Curve tool to draw over the Pencil lines, being very careful to make the endpoints and the slope at the endpoints match so the lines look continuous. Using Lines/Curves is the only way I'm able to produce nice-looking lines. (I'd also avoid a picture where the subject has her hands covering part of her face. Why make things more difficult then necessary?)
  14. Scale Clipboard Height-Map Height by One-Tenth is replaced by Divide Clipboard Height Scale by Ten. It does the same thing, just a different name. For various reasons, I decided the name Clipboard Height Scale would be better than just Clipboard Height. I thought the two "scales" in Scale Clipboard Height Scale by One-Tenth sounded odd, so I went with the simpler Divide Clipboard Height Scale by Ten. It's always hard to figure out what's causing the shaded image to look white. I always move the light direction to the side, since that makes the shading clearer. A common cause (for me, at least) is that the sum of the Canvas and Clipboard heights is too large, and is overflowing, and therefore clamped. If so, you need to adjust the Canvas and Clipboard Height Scales. One thing you can try is to make the Merge Method Canvas or Clipboard (No Displacement) so you can see the effect of the individual height maps. I think the tutorials have been fixed now. I'll re-read them later today to make sure I didn't miss anything.
  15. Thank you for reminding me, lynxster4. I will update the tutorials as soon as possible. An excellent point. That does work, and avoids having to rescale or add a small negative Canvas Height Offset. Maybe all amend the comment to include it, parenthetically.
  16. I'd like to be proved wrong, but I really doubt that can be done with anything currently in PDN. I think it was done with a polygon renderer.
  17. There are two main steps: Smoothing the image to give it an artificial look, and adding the seams. To smooth the image, you can try the built-in Blur>Surface Blur or Michael Vinther's Photo>Laplacian Pyramid Filter. Actually, I think either one quickly achieves a result as least as good as the example you gave. Also, take a look at the links in Drydareelin's comment on digitally-painted looks. I'll try to add some suggestions for the seams later.
  18. I hope it will continue to be set in future versions. I've always checked it in OnSetRenderInfo when doing time-consuming operations, though in the back of my mind I've wondered if the tests did any good. I also usually check it per-row in Render, though now that you point out that it's checked internally, maybe that's not really necessary. It's much more necessary for effects that render in OnSetRenderInfo, since they usually render a full frame's worth before returning.
  19. Very interesting effect. It sort of looks like close-up photos of minerals.
  20. In cases where the entire image has to be processed as a whole, it's often necessary to do a lot of processing in OnSetRenderInfo (or at least I don't know any other way). If a control changes while OnSetRenderInfo is active, is IsCancelRequested set so the processing can be aborted, or does that only happen after OnRender is called? My question is related to a comment by Rick Brewster, which says. I wasn't sure if that implied that IsCancelRequested was only set during OnRender. EDIT: Actually, I can think of some possible alternatives, such as setting a FirstTime flag in OnSetRenderInfo which is used in OnRender to initiate the entire-image processing. EDIT 2: I believe the answer to my question is Yes. I added a delay loop in OnSetRenderInfo which tested for IsCancelRequested and brought up a MessageBox if it was set. The MessageBox came up regularly when I changed the controls. So unless I made a mistake, or misunderstand something, IsCancelRequested is set in OnSetRenderInfo. (I certainly hope that's true.)
  21. I've released Version 1.1. There aren't a lot of functional changes. The changes include. I fixed some relatively small bugs with how the height values are treated. One bug caused the merged height value to sometimes overflow from 1.0 to 0. Another sometimes changed the low bit, which made Make Unmodified Canvas Heights Transparent not work as well. Because BoltBait complained that there were not enough options, I added a new one: Scale Clipboard Heights by Clipboard Image Size. When enabled, changing the image size will also change the height, For example if the clipboard image is a sphere, enabling this option will make it remain spherical when the size is changed, instead of appearing to stretch out or shrink in height, because the height remains the same while the XY dimensions change. I reworded the command names, in most cases simplifying them. For example, Canvas Height Offset in place of Canvas Height-Map Height Offset. I also changed the order of a few. I replaced Window with Canvas. Instead of an option to multiply the Merged Height Scale by ten, I used the large range, and have an option to divide it by ten. I also increased the range to 2000. I made two changes which I believe are improvements, but about which I'll be interested in hearing opinions. First, I added colors to the sliders. The Clipboard Image sliders are green, the Merged Height sliders are red, the Window Height sliders are blue, the Clipboard Height sliders are cyan, the Antialias slider is orange, and the Shading sliders are gray. I hope it will make it a little easier to find the correct controls, but perhaps it's more distracting than helpful. The slider colors fade from the color to white, but I can as easily make them fade the other way, or make them constant colors. Second, I made the Mapping Displacement and Height Scale sliders non-linear, so that moving the sliders in the low range changes the values less than when in the high range. The idea is that a change from 3 to 6 makes more difference than a change from 103 to 106, so the slider should require a larger movement at 3 than at 103 to produce the change. I'm not sure if the advantage of better control in the low range outweighs the non-intuitiveness.
  22. The title is fine. Exemplary, I would say. Unfortunately, based what I know about PDN, and on the response to a similar recent request, I don't believe there's any way to do that.
  23. Thanks, BoltBait. (I kind of like the old way better, but I suppose there was a good reason for the change.)
  24. In the CodeLap 2.0 release, one of the changes is: BlendOps have been changed from UserBlendOp to BinaryPixelOp. What is the distinction between them? I believe UserBlendOp is a subclass of BinaryPixelOp, but what is the significance of the change? I notice UserBlendOp has an associated class called UserBlendOps that provides a number of helpful methods, while PixelBlendOps is labeled as obsolete.
  25. I'm not certain I understand what you want, but take a look at the Color Clearer plugin. It "removes" a selected color so that if the layer is blended (in the Normal blending mode) to a background of the removed color, the original colors will be produced. For instance, if you have a grayscale image and the selected color is white, the resultant image will be all black, with alpha values that will produce the original image when the layer is above a white layer.
×
×
  • Create New...