Jump to content

Spikehead777

Members
  • Posts

    28
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Spikehead777's Achievements

Explorer

Explorer (4/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

2

Reputation

  1. http://forums.getpaint.net/index.php?showtopic=9480 You may or may not remember this topic for my plug-ins to simulate diffuse and specular reflections on a heightmap. Well, I lost the source to these files somehow in the ether of my hard drive, so I'm recoding them. This time, it has a few different options than before. Anyways, I rebuilt them in CodeLab (like I had before), and they work flawlessly when run from CodeLab. Then when I try to save the scripts as .dlls, there's a build error apparently with syntax...even though it actually runs correctly inside of CodeLab. Also, I tried rewriting the scripts, because maybe there was some kind of unrecognizable character that may have found it's way inside my script...apparently you can type it on the keyboard in the UI editor without knowing you did, because that's happened to me twice now. ._. All that happened with that script is it's pretty much the default script...There are a few differences, and some of them work, because the .dll built successfully with them in place. Anyways, they are that I abbreviated "selection" to "sel", "PrimaryColor" to "PC", and "SecondaryColor" to "SC"; I deleted the comments, excluding the ones that are needed at the top for the UI; I deleted the center pixel lines; and I deleted the brush width line. I also have 12 UI controls as well. I cannot seem to figure out the problem, except for the possibility that you can't have 12 or more controls. Here's the minimally changed default script: #region UICode double Amount1 = -90; // [-720,720] Light Direction double Amount2 = 1; // [-180,180] Light Pitch double Amount3 = 1; // [-65536,65536] Scale int Amount4 = 4; // [0,4] Red Byte Position int Amount5 = 0; // [0,4] Green Byte Position int Amount6 = 0; // [0,4] Blue Byte Position int Amount7 = 0; // [0,4] Alpha Byte Position bool Amount8 = false; // [0,1] Nudge Left bool Amount9 = false; // [0,1] Nudge Up bool Amount10 = false; // [0,1] Use Primary/Secondary Colors bool Amount11 = false; // [0,1] Swap Primary/Secondary Colors bool Amount12 = false; // [0,1] "Visible" Shadows #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra PC = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra SC = (ColorBgra)EnvironmentParameters.SecondaryColor; ColorBgra CP; for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { CP = src[x,y]; dst[x,y] = CP; } } } I'm also uploading the two scripts that I was working that both have issues. Broken Scripts.zip
  2. A new version of this plug-in is available, along with another helper plug-in. Read the first post for more information if you haven't already. (Taken from first post) Features: Light source with 360 degrees of movement around and 180 degrees above and (NEW) below the image Pixel "Scaling" -- If your image comes out too short or too tall along the "Z-axis", you can scale the pixels of your image down, so that the highlights and shadows are balanced. (NEW) High quality settings allow your image to remain crisp and smooth if a correct type of heightmap is supplied. (NEW) Added specular highlight plug-in to create specular highlights on a heightmap! (NEW) The original plug-in (Was Illuminate, now Diffuse) is now much faster than before (I was rendering the whole image for each thread XD...about many times unnecessary. XD). Seamlessness!
  3. Hi, I'm attempting to create a "ribbon" type plug-in in CodeLab. When I say "ribbon" I mean, having two values U and V, with each ranging from 0-1 inclusive. The input values of U and V will modify the output value of X and Y, the pixel to modify. I have all of my math in place, and Paint.NET renders the points in the right positions, but it doesn't give me the right effect when two points overlap each other. #region UICode int Amount1=0; //[0,100]Slider 1 Description int Amount2=0; //[0,100]Slider 2 Description int Amount3=0; //[0,100]Slider 3 Description #endregion void Render(Surface dst, Surface src, Rectangle rect) { //Rectangle? Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); //Centers long cX = (long)(((selection.Right - selection.Left) / 2)+selection.Left); long cY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top); double iR1,oR1,A1,D1; //Begin Vals (At 0) double iR2,oR2,A2,D2; //End vals (At 1) double iR,oR,An,D; //Middle Vals (At 0-1) double Q1,Q2,rev,p; //Quality, Quality, Revolutions, Percent iR1 = 100;iR2 = 40; oR1 = 25;oR2 = 10; A1 = 0;A2 = 0; D1 = 25;D2 = 10; Q1 = 360;Q2 = 100; //iR2 = iR1;oR2 = oR1;A2 = A1;D2 = D1; rev = 1; ColorBgra col; //Color //Blank the cavas with visible black for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { col = src[x,y]; // TODO: Add pixel processing code here // Access RGBA values this way, for example: col.R = (byte)0; col.G = (byte)0; col.B = (byte)0; col.A = (byte)255; dst[x,y] = col; } } //Iterate tween for (int V = 0;V <= Q2;V += 1) { p = V/Q2; //Percent tween An = (A2-A1)*p+A1; //Angle tween D = (D2-D1)*p+D1; //Distance tween iR = (iR2-iR1)*p+iR1; //Inside radius tween oR = (oR2-oR1)*p+oR1; //Outside radius tween //Spirograph for (int U = 0;U < Q1;U += 1) { double a,aa,iS,oS,iC,oC,X,Y; int x,y,R,G,B,A,i; a = U/Q1*360; //Angle tween aa = (An+a)*(iR/oR); //Rotation iS = Math.Sin((a)*Math.PI/180); oS = Math.Sin((a+aa)*Math.PI/180); iC = Math.Cos((a)*Math.PI/180); oC = Math.Cos((a+aa)*Math.PI/180); X = iC*(iR+oR)+oC*(D); Y = iS*(iR+oR)+oS*(D); //Move center x = (int)(Math.Floor(cX+X)); y = (int)(Math.Floor(cY+Y)); //Execute only if inside drawing area //if (x >= selection.Left && x < selection.Right && y >= selection.Top && y < selection.Bottom) { col = dst[x,y]; //Get color from destination R = col.R; G = col.G; B = col.B; A = col.A; //i = R+G*256+B*256*256+A*256*256*256;//Higher-Res //i += 1; //R = i/256/256/256; //G = i/256/256%256; //B = i/256%256; //A = i%256; //i = R+G*256+B*256*256;//Hi-Res //i += 1; //R = i/256/256; //G = i/256%256; //B = i%256; //i = 0; //R = R+1; //G = G+1; //B = B+1; //A = 255; i = 0; R = dst[x,y].R+1; G = dst[x,y].G+1; B = dst[x,y].B+1; A = 255; //Write back to destination col = ColorBgra.FromBgra( Utility.ClampToByte(, Utility.ClampToByte(G), Utility.ClampToByte(R), Utility.ClampToByte(A)); dst[x,y] = col; } } } } I was about to paste my CodeLab script in and I hit submit by mistake... >_>
  4. I noticed a tiny bug in your plug-in. First of all, I'm using v1.2, and just downloaded it from your site. When you have indented text and you have sections of code separated by "{" and "}", if you add a new line between "{" and "}", first, it will indent the text to be flush with existing text, and then add 4,8,12,16,etc. depending on how many open brackets there are...I don't think I explained that well, so here's an example. 1. First, open CodeLab, and delete whatever script is in there. There should be absolutely nothing. 2. Type "text" without the quotes, and hit enter. Repeat this step a few times. 3. Hit End on your keyboard, type "{" without the quotes, and hit enter. 4. Hit End on your keyboard, type "text" without the quotes, and hit enter. Repeat this step a few times. 5. Repeat Steps 3 and 4 a few times. The text after the first "{" should ideally all be flush, but in the end, you have something that looks like this: text text text { text text text { text text text { text text
  5. What happened to the .dds file type? It's there in your screen shot, but I don't have it available. EDIT: Never mind, I updated and it was there. Move along people, nothing to see in this post.
  6. I packaged the CodeLab source along with the work-around, when I first uploaded the work-around.
  7. C4D? Yeah, the results will come out a little hard-ish. One thing is that Paint.NET only really allows 256 different color values (if standard 8-bit grayscale), so you don't get many pixels to work with, and also it returns another 8-bit image as the result. What I can suggest, is that you either make your image larger, perform Illuminate, and size the image down like you said (which is how modern antialiasing in GPUs work), lower the height scale value (Between 0.01 and 0.2), or blur the image (3-6 gaussian blur kind of looks good). Also, on a related note, I have found that you can't put in decimal values into the plug-in. It seems CodeLab doesn't allow this. I made a work-around to the plug-in, so those that downloaded the plug-in, please re-download. Instead of a minimum scale of 1 : 1 height change per intensity with the old plug-in, it becomes 1 : 100 height change per intensity. I'll have the work-around uploaded shortly.
  8. I have noticed that this plug-in does run a little slow. I don't know if it's because of compiling it in CodeLab instead of using a true compiler. Also, remember that this is my first plug-in using Paint.NET, so some code might not be optimized well. =/ Regardless, I'll see what I can do about fixing and cleaning up the plug-in. Remember, the bigger the image, the longer processing on that image will take, and that's true for just about any image plug-in.
  9. 3D Heightmap Plugins v1.0 Download Made with CodeLab by BoltBait. Hey all! This is my first plug-in for Paint.NET. UPDATE: This plug-in has received a much-needed update! New features are listed below, also another plug-in is available! Diffuse Plug-in (Effects -> Stylize -> Diffuse) Description: This plug-in is very similar to Emboss in what it does. What this plug-in does, is it takes the current image as a height map, shines a light on it, and returns the intensity of reflected rays as another image. Examples: Various spheres with the diffuse plug-in applied on them. This is demonstrating the full movement capabilities that you have. Notice the center sphere. The above image was rendered 49 times under different settings. Some post processing was applied to create the alpha around each sphere. The center sphere had the light pitch at 90, right above the image. The next series had light pitch at 45. The third series had light pitch at 0, in line with the image. The last outer series had light pitch at -45, underneath the image! Each sphere in the above image was rendered from this image: It looks a lot like nonsense doesn't it? Maybe this image makes more sense: The former image is really a higher detail heightmap than the latter. To create the latter, I took the red channel of the former image and made it grayscale. Anything you can draw on Paint.Net will work. (old image) Specular Highlight Plug-In (Effects -> Stylize -> Specular) Description: This plug-in is very similar to the diffuse plug-in, but it's different in that it creates a highlight on the image, to give it a shiny effect, almost like gloss or metal. That's what a highlight looks like if on a pure black sphere. Combine this with the diffuse plug-in and you can make many 3d looking objects, even chrome-like! Features: Light source with 360 degrees of movement around and 180 degrees above and (NEW) below the image Pixel "Scaling" -- If your image comes out too short or too tall along the "Z-axis", you can scale the pixels of your image down, so that the highlights and shadows are balanced. (NEW) High quality settings allow your image to remain crisp and smooth if a correct type of heightmap is supplied. (NEW) Added specular highlight plug-in to create specular highlights on a heightmap! (NEW) The original plug-in (Was Illuminate, now Diffuse) is now much faster than before (I was rendering the whole image for each thread XD...about many times unnecessary. XD). Seamlessness! EDIT: CodeLab seems to disallow input of decimal values. This work-around changes the inputs so that it's a percent input, instead of decimal scale input. Not anymore, these plug-ins now has support for 2 decimal places with CodeLab. I hope that with these plug-ins comes a great contribution to the community.
  10. I am able to reinstall and run Paint.NET again. The problem was, I went back so far in system restore (because the last time I installed something was 3 weeks ago...it created a point then), that there apparently was a change in Microsoft's .NET Framework, and it corrupted 2.0 and above, of the framework. Trying to reinstall the framework was >_>, because I couldn't reinstall 3.0 again because it needed 2.0, and I couldn't reinstall 2.0 because it wouldn't remove in the first place. More proof that system restore creates more problems than getting rid of them. With my recent malware/spyware incident, I have found my own solution to it. I have solved this problem, and so now this topic can die peacefully. *tears in eyes*
  11. I am unable to run or reinstall Paint.NET Just now, I had to do a system restore because I was unable to access the internet due to a recent spyware/malware incident. I have cleaned up my system of the spyware/malware problem after I did the system restore. When I tried running Paint.NET a couple of times about 5 minutes ago, all of the attempts resulted in crashes. Usually when I dislike a program or a program stops working, I will delete the program's main folder off my computer, and if I like the program, I'll reinstall the program again. So I deleted Paint.NET's folder of the computer, and attempted to reinstall it. It will show the first dialog box (extraction I assume), and crash. I tried a couple of times. I had a look in one of the topics that had a Windows Installer clean-up utility, but that utility didn't help. Can you guys help?
  12. The Alpha Mask Import .dll helps a lot! Thanks! As for the AlphatoGray .dll, I'm not really using it because I already have Curves+. Using a little method I devised (maybe I discovered it for the 4th time), I can create 3D-looking Abstract bubbles, buttons, water drops, etc, using complete image manipulation.
  13. Hi, I'm new here, and I've been wondering this for a while now. Let's say I have two layers, A and B. Is it it possible to take the transparency channel of A, and replace the transparency channel of B with that of A?
×
×
  • Create New...