Jump to content

MJW

Members
  • Posts

    2,854
  • Joined

  • Last visited

  • Days Won

    70

Everything posted by MJW

  1. No, there should be no need to adjust the texture height. My reply to Pixie is that the "standard" way to use the equirectangular mapping modes is to use all ambient light, with no directional light. The directional lighting comes from the light sources in the equirectangular maps. The specular (reflection) component comes from the original equirectangular map, using the TS's Reflection Map (Equirectangular) mode, while the directional component (and also some ambient component) comes from the diffuse-transformed map, using the Gradient Map (Equirectangular) mode. The lighting brightness can be adjusted either by changing the brightness of the ambient light when shading, or by shading with the light at maximum brightness, and adjusting the layer Opacity (assuming the layer blending mode is Additive. I generally prefer the second method, which is more flexible. One bit of advice is to always double check that the TS shading mode is the correct one for the type of shading being done: Reflection Map for the reflections, and Gradient Map for the diffuse lighting. Switching between them can be confusing -- at least to me. I swear, when I was experimenting to make the example, I did it wrong more times than I did it right.
  2. I wish I could offer you hope in that regard, since such a feature would be useful, but unfortunately making a version that supports editing sufficient to edit out a tripod, would be a vastly complex task.
  3. I take no responsibility for what you do with them (and encourage you to use them for good, not evil), but I find pyrochild's Liquefy and Grid Warp useful for warping images. Also, TechnoRobbo's FreeWarp.
  4. A method not mentioned, that I find works well, is to use (with slight variations) Yellowman's Styrofoam method. The details of which are explained in a follow-up comment.
  5. There is such a plugin: Red ochre's Alpha Threshold. It's in his plugin pack.
  6. I probably should do that, and maybe I will.
  7. Thanks, dipstick. Can Blender produce diffuse shading based on an environment map (like Texture Shader's Gradient Map mode, shown in the third layer of my exampe), or only reflections (like Texture Shader's Reflection Map mode). I'm not quite clear from the images. (I probably should download Blender, myself.)
  8. Not a silly question at all. Yes, the Ambient should be 255, 255, 255, and the Directional light should be 0, 0, 0. The lighting in the ER map substitutes for the directional light. The reason for using the maximum is that increasing brightness afterword causes a loss of precision in the colors, while decreasing brightness doesn't. So it's usually best to start with as bright of an image as possible, without overflowing. The way things work, shading with fully bright ambient light and no directional light should never result in overflow. For the method I suggested in the example, the layer's Opacity is used to adjust its brightness in the combined image. This assumes the layer has the Additive blend mode, as in the example.
  9. I'd be very interested in any details about Blender's equirectangular diffuse shading. I know very little about Blender, but I was under the impression it uses cube maps for the actual shading instead of working directly from equirectangular maps..
  10. Equirectangular Diffuse Transform DLL: Equirectangular Diffuse Transform.zip The user interface: Summary: The Texture Shader has a mapping mode called Reflection Map (Equirectangular) which allows a panoramic image stored as an equirectangular (ER) map to be reflected onto a height map. Equirectangular Diffuse Transform provides a method by which the panoramic image can also be used to apply diffuse lighting consistent with the same image. The basic method is to use the original panoramic image to produce the reflection, then use the same image transformed with Equirectangular Diffuse Transform to produce the diffuse lighting, using the Texture Shader's Gradient Map (Equirectangular) mapping mode. The offset and rotation of the Texture Shader's clipboard image should remain the same for the two steps, and normally the light source should be Ambient, without Directional light. The Help menu description: ==================== Equirectangular Diffuse Transform transforms an equirectangular environment map into an equirectangular diffuse map that can be used to apply diffuse lighting to a height map. The effect uses the first five bands of spherical harmonics to approximate convolution with a clamped cosine function covering a hemisphere. The resulting diffuse map map can be used by the Texture Shader effect, with the Clipboard Image Mapping Method set to Gradient Map (Equirectangular). Typically, the Directional Light Intensity should be set to zero, and the Ambient Light Color adjusted to determine the light intensity. The width of an equirectangular map is normally twice the height, but any image will be treated as though it covers the entire sphere. The controls are: Pre-Scale Brightness to Maximum Range: When enabled, the brightness of the diffuse map is automatically adjusted so that the the maximum color is as bright as possible without overflowing. This provides the largest brightness range when shading. When disabled, if Expansion Gamma equals Compression Gamma Reciprocal, the color of a constant-color map is unchanged when transformed; if Expansion Gamma does not equal Compression Gamma Reciprocal, a constant-white map is unchanged when transformed. Brightness: Adjusts the brightness of the diffuse map. Brightness values greater than 1.0 should generally not be used when Pre-Scale Brightness to Maximum Range is enabled, since they will result in color overflow, and therefore clamping. Expansion Gamma: The exponent to which the color components are raised before being transformed. When equal to Compression Gamma Reciprocal, this can be used to compensate for gamma compression. Gamma is typically around 2.2. When used with Compression Gamma Reciprocal set to 1.0, it provides a contrast adjustment for the pre-transformed map; increasing the upper-end contrast when greater than 1.0, and decreasing the upper-end contrast when less than 1.0. This can be useful for emphasizing the lights in the map over the background colors. Compression Gamma Reciprocal: The reciprocal of the exponent to which the color components of the diffuse map are raised. Link Expansion and Compression Gammas: When enabled, Expansion Gamma will always match Compression Gamma Reciprocal. ==================== Example: Original equirectangular map: Transformed map (with gamma of 1.0): Shading example: Shading details: Additional comments: Though I think theoretically using a gamma of 2.2 makes sense, the example above uses a gamma of 1.0. Until recently, I began to doubt the gamma control was very useful, except as a contrast adjustment; but now I'm beginning to think using a gamma of 2.2 might be better. The plugin was originally inspired a a series of articles called Spherical Harmonics and applications in real time graphics. If you compare my transformed image to the article's, you'll see they are different. Part of the difference is that by default I scale the brightness to make the image as bright a possible, without overflowing. There are, however, other differences, and I don't know why. However, I've done many tests that pretty much convince me that my result is correct. The tests include writing a plugin that (very slowly) does a full convolution with a clamped cosine function. Though the algorithm was completely different, the results were almost identical. I wrote a fairly detailed comment about the differences on the article's website, which was flagged as spam by the blankety-blank spam filter. Unfortunately, the article is quite old, so the author hasn't responded to my earlier comments. The ER map used for shading should generally represent light sources, not colored areas. If, for instance, the ER map has a large expanse of grass, the diffuse shading will be very green, even though the grass would actually emit, through reflection, only a limited amount of green light onto an object. In some cases, it would be desirable to adjust the map's contrast to emphasize the lights over other areas. (This can be done by setting the expansion gamma to a larger value than the compression reciprocal.) It may also be useful to decrease the map's color saturation, to reduce the effect when shading colored surfaces. To keep my example simple and direct, and avoid confusing detours, I didn't make any post-shading modifications to the diffuse-shaded layer. However, in most cases I would try adjusting the brightness, contrast, saturation, and such to achieve the best result. On the off chance another programmer wants to use my transform code for some other purpose (such as computing the spherical harmonic coefficients) , as with all my PDN code, I'd be happy to provide it.
  11. Perhaps you could create Scalable Vector Graphics files, then use the plugin to render in in PDN. SVG files are XML based, so they can be created with a text editor. Also, read BoltBait's How to make custom shapes for paint.net.
  12. @welshblue, I would love to have you make a video on the Texture Shader, or any of my other plugins. I keep meaning to make tuts or that kind of thing, but never get around to it. @dipstick, I was able to produce a reasonable facsimile of the right-hand star by drawing a filled star with the Shape tool, then using the plugin currently called EdgeShaderMJW, followed by several iterations of the Texture Smoother plugin to smooth it out. I think I may know how to produce a better star, but I'll need to experiment later. (Producing a revised, released version of Red ochre's and my Edge Shader is my next programming project.)
  13. Congratulations to @welshblue, @lynxster4, and @Pixey for their superb entries! They were so impressively realistic, while at the same time, visually appealing. Thanks to Pixey for hosting. Thanks for the kind words about my entry, welshblue. I rather liked it, myself, though it was probably a bit too low key.
  14. The method I would use is to use another plugin in BoltBait's plugin pack: Paste Alpha. Add a new layer, and fill it with the color or colors you want. Copy the image layer to the clipboard. Run Paste Alpha on the color layer, setting the Alpha Source control to Clipboard alpha. Also, once you get the black colored in some manner, you can use Hue/Saturation to modify the color. You can, of course, use selections to restrict which areas get modified. Another method to add color (without plugins) is to lighten the black to gray with Brightness/Contrast, run Sepia to add some color, then use Hue/Saturation to modify the color. Sepia adds rather unsaturated colors, so you may have to run Hue/Saturation twice or more to get enough saturation.
  15. What I generally do in that situation is do the Magic Wand selection and erasure, then run the AA's_Assistant plugin to smooth the edge. When I do the selection, I usually keep the tolerance a bit low, since AA's_Assistant expands the erasure a little.
  16. Only Rick Brewster can answer your first question. I don't really understand your workaround. Perhaps if you explain in greater detail what you're trying to accomplish, someone can offer a suggestion that will produce results more to your liking.
  17. Unfortunately, currently pixel selection by the Magic Wand is all or none: no antialiasing. Rick Brewster explained why in a 2017 comment.
  18. The problem with Rotate/Zoom is that it only produces one degree of perspective distortion. Essentially, the viewing distance is fixed, and likely won't match the viewing distance to the monitor screen.The sides will converge to the vanishing points too quickly, or not quickly enough. You could try my (beta) Perspective Transformation. Sadly, that's not a perfect solution, either, but with a bit of experimentation, you can probably make it work. The basic idea is to put the screen image into a layer above monitor image, then move the corners around to match the corners of the screen. It will probably require changing the XY Proportion to get the aspect ratio correct. I suggest drawing a white outline of the screen on a transparent layer between the monitor photo and the screen image to make the corner alignment easier.
  19. That's an excellent suggestion, and one I've been thinking about for a while. Whether or not it will work will need to be seen. I have reasons it might, and reasons it might not. I plan to work on an updated version of the Edge Shader as soon as I finish the plugin I'm currently working on (which is nearly complete, and which took a lot longer than I anticipated -- more time than it's worth, I'd say.) The problem with the angle offset is that the distance measure must have certain characteristics in order for the fast algorithm to work, and I don't believe a non-symmetric measure that depends on the angle to the pixel qualifies. On the other hand, I can't say for sure without thinking through the details. EDIT: Let me add a few details about the transparency suggestion. The reason it might not work is that the transparency of an edge doesn't reveal which direction the edge is shifted. That is, you can't tell from the transparency whether the "actual" edge that was antialiased to produce the non-opaqueness is horizontal, and close to the X side, vertical, and close to the Y side, or angled. This was a major problem I encountered when I tried to use the idea in the Object Rounder plugin. However, for the nearest pixel, the distance from a pixel to an edge is generally minimized when the edge is perpendicular to the segment from the pixel to the edge, so it seems like we can generally assume the offset to the actual edge is in that direction. That may help make the opacity a valid measure of the extra distance. Also, height errors when lighted are much more obvious than color errors, so what didn't work for the Object Rounder might work fine for the Edge Shader. (However, I hope to produce a separate height version of the Edge Shader, so I hope the method works well for that.)
  20. Unfortunately, I don't think that's possible. I'll give it some thought, just in case I've overlooked something, but I don't believe the algorithm allows that.
  21. The one change I'd really like to see, that might not involve a huge amount of effort, is to have a mode that would use the last point of the previous curve as the first point of the next curve, so that continuous curves could be more easily drawn . Perhaps something like pressing Ctrl and then pressing the left (or right) mouse-button would close the previous curve, and draw a line from the last point to the cursor. Preferably, the curve would remain a line until the button was released, at which point the beginning and end of the curve would be established. From then on, the curve would be treated the same as usual, including moving the beginning point (though, of course, the curve would then no longer be connected). I draw a lot of continuous curves, and aligning the connecting points is difficult.
  22. I think that would be a useful feature. Though the current behavior is well-established, so it probably shouldn't be changed, if I had my choice between Erase Selection always clearing the selection or never clearing the selection, I think I'd prefer "never." Clearing the selection as a separate step isn't that difficult. The ability to save a selection mitigates the problem, though it's somewhat complex, and on occasion, I already have something in the clipboard I'd like to preserve.
  23. Congratulations to @welshblue and @Pixey. I think all the entries are exceptionally well done. Thanks for hosting, Pixey! I hope your trip to Miami went well.
  24. Or, instead, use BoltBait's Paste Alpha plugin. (I try to use the Magic Wand as seldom as possible for this kind of thing.) Though it's hard to tell the best plan without seeing the image you want to modify, one approach is: Copy the image to the clipboard. Add a white layer underneath. Merge down, so your original image is now on a white background instead of transparent. Run Ink Sketch. Run Paste Alpha, with the Alpha Source set to Clipboard alpha. EDIT: Though HyReZ's suggestion of using Ink Sketch+ is probably the best way to go.
×
×
  • Create New...