-
Posts
15,653 -
Joined
-
Last visited
-
Days Won
390
Everything posted by BoltBait
-
Object Reflections Plugin - Wet Floor Effect
BoltBait replied to BoltBait's topic in Plugins - Publishing ONLY!
Thanks! Illnab1024 ran into a little trouble with the UI. He's still working on it. Stay tuned... 8) -
Alpha only gradiants not working in Alpha3 build
BoltBait replied to BoltBait's topic in Paint.NET Discussion and Questions
For me, it was, "WTF, Rick broke the alpha only gradient... back to *my* gradient plugin. " -
Alpha only gradiants not working in Alpha3 build
BoltBait replied to BoltBait's topic in Paint.NET Discussion and Questions
OK, *NOW* I understand. I can live with that. I'll just have to retrain my brain. -
Alpha only gradiants not working in Alpha3 build
BoltBait replied to BoltBait's topic in Paint.NET Discussion and Questions
Hmmm... So, you don't look at the alpha of the selected colors. That's ok, I guess. But, if they're set funny, it doesn't work? Bah! -
Copying small cut of texture over a larger area
BoltBait replied to sultano's topic in Paint.NET Discussion and Questions
Rick, I didn't know you were a DA. I'm watching you... -
Copying small cut of texture over a larger area
BoltBait replied to sultano's topic in Paint.NET Discussion and Questions
Oh! Well, just use the Clone/Stamp tool. If you need help on that (which you probably will) read the help file. The Clone/Stamp tool is the frikin bomb! 8) -
Copying small cut of texture over a larger area
BoltBait replied to sultano's topic in Paint.NET Discussion and Questions
Try this: http://paintdotnet.12.forumer.com/viewtopic.php?t=1577 -
That's a good idea. When I'm done with the one's I'm working on, I'll look at them.
-
Object Reflections Plugin - Wet Floor Effect
BoltBait replied to BoltBait's topic in Plugins - Publishing ONLY!
OK, that was easy... void Render(Surface dst, Surface src, Rectangle rect) { int depth = 100; // maximum distance of the reflection int MaxAlpha = 128; // darkest reflection (255-0, default 128) int ignore = 0; // bottom pixels of object to ignore PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; for(int y = rect.Top; y { for (int x = rect.Left; x { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; // Get the current pixel if (CurrentPixel.A == 0) // is it transparent? { int y1=0; int yd=0; for (y1=y; y1 > 0; y1--) { if ((y1 != selection.Top) && (src[x,y1].A == 0)) { yd++; } else { break; } } if (y1+1-yd-ignore >= 0) { CurrentPixel=src[x,y1+1-yd-ignore]; if (CurrentPixel.A > 0) if (yd { // fade the reflection out CurrentPixel.A = (byte)((MaxAlpha/depth)*(depth-yd)*CurrentPixel.A/255); } else { CurrentPixel.A = 0; // totally faded at this point } } } dst[x,y] = CurrentPixel; } } } } DON'T USE THIS AS THERE IS A BUG IN IT. USE THE ONE IN MY ORIGINAL POST. Well, I'm done playing with this. OK, screenshots have been updated (not on this thread though, sorry). Go here for the whole story: http://boltbait.googlepages.com/reflections Enjoy. 8) -
Picc84, which effects are you looking for?
-
Object Reflections Plugin - Wet Floor Effect
BoltBait replied to BoltBait's topic in Plugins - Publishing ONLY!
Yeah, thanks. I hadn't even thought about that. I only spent about 1/2 hour on this so I knew it would have problems. Yeah, that's what Rick said. Hey! I told you it was rough. Just looking at it, I see there is another bug in there too: if ((y1 == rect.Top) || (src[x,y1].A == 0)) should be: if ((y1 != selection.Top) && (src[x,y1].A == 0)) I keep forgetting to use selection instead of rect. And then, of course, I need to add the following at the top of the function: Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); That will cause the reflection to start at the top of the selection if the selection does not have any non-transparent pixels in it. This eliminates the need to draw a line under text and other odd shapes that I said before. That was my original intent, but I couldn't figure out why it wasn't working. OK, so here's the updated code. The effect is starting to look pretty good... void Render(Surface dst, Surface src, Rectangle rect) { int depth = 100; // maximum distance of the reflection int MaxAlpha = 128; // darkest reflection (255-0, default 128) PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; for(int y = rect.Top; y { for (int x = rect.Left; x { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; // Get the current pixel if (CurrentPixel.A == 0) // is it transparent? { int y1=0; int yd=0; for (y1=y; y1 > 0; y1--) { if ((y1 != selection.Top) && (src[x,y1].A == 0)) { yd++; } else { break; } } if (y1+1-yd >= 0) { CurrentPixel=src[x,y1+1-yd]; // look in the mirror if (CurrentPixel.A > 0) if (yd { // fade the reflection out CurrentPixel.A = (byte)((MaxAlpha/depth)*(depth-yd)*CurrentPixel.A/255); } else { // totally faded at this point CurrentPixel.A = 0; } } } dst[x,y] = CurrentPixel; } } } } DO NOT USE THIS SCRIPT, IT HAS BEEN UPDATED BELOW. Well, I think one thing left to do is to be able to specify an amount of pixels to ignore before starting the reflection. I'll add that capability on Monday. Then I'll ask Illnab1024 to put a UI on it--that is, if you all think its worth it. Let me know. -
Compiled DLL (Thanks to MadJik): <!-- m -->http://jcljay.free.fr/pdn/ReflectionFlat.zip<!-- m --> I need to make some graphics with reflections similar to the following: What a pain! Well, really only the one on the right turned out to be a pain. Anyway, I tinkered around in code lab and wrote the following codelab script: (This is the updated script) void Render(Surface dst, Surface src, Rectangle rect) { int depth = 100; // maximum distance of the reflection int MaxAlpha = 128; // darkest reflection (255-0, default 128) int ignore = 0; // bottom pixels of object to ignore PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; // Get the current pixel if (CurrentPixel.A == 0) // is it transparent? { int y1=0; int yd=0; for (y1=y; y1 > 0; y1--) { if ((y1 != selection.Top) && (src[x,y1].A == 0)) { yd++; } else { break; } } if (y1+1-yd-ignore >= 0) { CurrentPixel=src[x,y1+1-yd-ignore]; if (CurrentPixel.A > 0) if (yd<depth) { // fade the reflection out CurrentPixel.A = (byte)(((double)MaxAlpha/depth)*(depth-yd)*CurrentPixel.A/255); } else { CurrentPixel.A = 0; // totally faded at this point } } } dst[x,y] = CurrentPixel; } } } } Instructions for use: 1) Create a new layer that is totally transparent. 2) On that layer, place the object that you want to make a reflection for. 3) Select the area where you want the reflection to show. 4) Run the codelab script: Sometimes you will want to ignore the bottom of the object like in this example: 5) Notice how the bottom of the yellow box is showing in the reflection. Just increase the Ignore value to get rid of that. Here it is shown with an Ignore value of 3: You'll need to tinker with the depth and MaxAlpha variables to get something workable. Thanks, MadJik for putting a UI on this one!
-
forgot how i did something need info
BoltBait replied to mastodonant's topic in Paint.NET Discussion and Questions
Glad to be of service... -
forgot how i did something need info
BoltBait replied to mastodonant's topic in Paint.NET Discussion and Questions
Ah, yes. Well, the paint bucket tool uses the Tolerance slider. Look around for that and change it to something less than 100%. -
forgot how i did something need info
BoltBait replied to mastodonant's topic in Paint.NET Discussion and Questions
You probably used the paint bucket tool. -
OK, I found a bug in this filter. It wasn't properly blurring the bottom and right edge pixel of your selection if your selection was not covering the entire layer. So, if you have not downloaded the DLL since I posted this message, please do so--it has been corrected.
-
I have a couple of issues with the zoom drop-down list. 1) When the image is smaller then the screen and you select "Window" it will not zoom in further than 100%. I expect the image to zoom in close enough to fill the screen. 2) When you select "Window" it should select the actual zoom percentage instead of the word "Window". Thanks, BoltBait
-
Have you tried right-clicking on the line nubs? It turns the line into a bezier curve. You can get much smoother and more natural curves that way.
-
can u use the search function of the forums?
-
Rick, the problem with this is that most of the pixels that are being blurred are completely transparent. But, I'll look again at this for the non-transparent pixels. I'm using the results of the Gaussian blur to slightly expand the size of the new object, not make it smaller. I played around with making the new object smaller (by only making the edges more transparent) and the results were not looking as good--remember my goal, combining natural objects with a natural background. Kaiser Yoshi, you are correct. This effect will not work for EVERY image you can come up with. However, for combining natural images, I think you will find it very useful. EDIT: OK, Rick, I did a test by keeping the RGB values of non-transparent pixels and I couldn't see the difference until I zoomed way in (400%+). And, when I did zoom in and could start to perceive a difference, it didn't look as natural as the regular blur. So, meh. I'm leaving it. Oh, I'm sure you could come up with a pattern that would show a major difference, but like I said, when used to combine one natural picture with another I think the effect is pretty good.
-
But, if you think about it, that's EXACTLY what its doing. If you Gaussian blur a pixel that is sitting next to a totally transparent pixel, it becomes slightly transparent. Then, if you blur that transparent pixel, it takes on some of the color of the previous pixel and becomes slightly less transparent. Isn't that exactly what you describe? Anyway, I did some experimenting with it and figured out that the blur that I was applying was too small. I had hard set the Gaussian Blur to a radius of 1. I have changed it to 2, recompiled the DLL and re-posted. Except for the smallest of pictures, it is a big improvement.
-
New feature request: Feather Selection
BoltBait replied to BoltBait's topic in Paint.NET Discussion and Questions
Well, I played around with this using both large and small images. Gaussian Blur (1) is a little too small, but Gaussian Blur (2) is just about right. Going beyond 2, even on really large images, didn't really make that much of a positive difference--remember, the whole point is to just soften the edges slightly. Anyway, I made a change to my code to use 2 instead of 1 and posted up the revised DLL. -
New feature request: Feather Selection
BoltBait replied to BoltBait's topic in Paint.NET Discussion and Questions
I don't think I'll post the source unless I have a UI put on it. Seriously, there is nothing to be learned from it. Oh, and be sure to read and respond to my edit above.