Jump to content

BoltBait

Administrator
  • Posts

    15,653
  • Joined

  • Last visited

  • Days Won

    390

Everything posted by BoltBait

  1. Nice tutorial! I give it two thumbs up... because it uses one of my effects.
  2. Maybe you should try one of the Feather plugins in my plugin pack: viewtopic.php?f=16&t=22819 Hope this helps.
  3. Run the oil paint effect before using the eye dropper tool. Next time, pick a better thread title. Yours has no meaning.
  4. True, except for the Feather Selection plugin. It feathers along the trail of marching ants.
  5. Jellyboots, try this tutorial: viewtopic.php?f=15&t=3305 The functionality that you want is built-in to Paint.NET. I think maybe you missed david.atwell's response telling you to hit Ctrl+Shift+Z.
  6. Thanks for the bug report. I've fixed that issue with this release. I recompiled all of my plugins and added 2 to the pack (Lomography and Flames).
  7. OK, so I changed it to Render > Flames and put it into my plugin pack.
  8. Try this tutorial: viewtopic.php?f=15&t=21605 ...also... When running Paint.NET, try pressing the F1 key.
  9. Please read the forum rules: viewtopic.php?f=20&t=3446 to understand why I'm locking your post. (See rule #6) For all the best plugins, look here: viewforum.php?f=16
  10. Paint.NET effects do not have access to data on other layers. This is a limitation of the Paint.NET effect system. Believe me, you are not the first person to ask for this type of access and Rick is considering it for a future version of Paint.NET.
  11. CodeLab 1.3 Release - Added Radio Button List control type [HELP] - Added Reseed Button control type [HELP] - Improved syntax highlighting (by Curtis) - Icons added to the editor UI (by Curtis) - Added editor commands for commenting/uncommenting a selection - Bug fixes Go get it here: http://boltbait.com/pdn/codelab/
  12. I can't think of a reason why you'd want this plugin. Paint.NET can already draw lines (using the line tool) with dashed lines and arrow heads.
  13. There is a plugin called 'Toon' that might do what you want. Here is an example: viewtopic.php?p=11746#p11746
  14. I really just made this plugin as an exercise in writing complex effects. I really don't expect anyone to use it. If you want a fire effect, download Tom Jackson's instead of mine. His is much better: viewtopic.php?f=16&t=25180
  15. Effect type plugins do not have access to layers other than the currently selected layer. So, if you want to save each frame on a different layer, you won't be able to do this with an effect type plugin.
  16. I thought you were writing a FileType plugin. In a file type plugin, there is no Render function. Am I confused, or you. :?
  17. Simon, I named the thread 'Fire' so that when people search for 'Fire' they'll find it. Everything else is named 'Burninate' including the DLL file itself. And, if anyone is going to confuse the user, Simon, your plugin sits right next to Tom Jackson's in the Render menu and has the same name.
  18. Try this bevel plugin: viewtopic.php?f=16&t=26238 This was done rather quickly with that plugin: I'm sure you could use it to better results by spending a little time with it.
  19. Just remember that "aliased" means that you are still pointing to the original bitmap in memory. So, if you change it, you're changing the original, not a copy.
  20. For info see this post: Tom Jackson's Excellent Fire Tutorial Simon Brown has created a similar plugin here. Mine is different. For my plugin, the user (that's you) will need to draw a black to white gradient in the general shape you want the flames before running the effect. Download here: http://forums.getpaint.net/index.php?/topic/8318- How to install plugins: http://boltbait.googlepages.com/install If that doesn't work, post your troubles here: This plugin shows up under the Effects > Distort menu as "Burninate". I believe Trogdor would approve. Source code here: using System; using System.Text; using System.Reflection; using PaintDotNet; using PaintDotNet.Effects; using PaintDotNet.IndirectUI; using PaintDotNet.PropertySystem; using System.Collections.Generic; using System.Drawing; using System.Drawing.Text; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("BurninatePlugin")] [assembly: AssemblyDescription("Burninate Plugin for Paint.NET. Based on Tom Jackson's excellent Fire Tutorial.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("BoltBait")] [assembly: AssemblyProduct("BurninatePlugin")] [assembly: AssemblyCopyright("Copyright © BoltBait")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: AssemblyVersion("1.0.*")] namespace BurninateEffect { public class PluginSupportInfo : IPluginSupportInfo { public string Author { get { return "BoltBait"; } } public string Copyright { get { return ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright; } } public string DisplayName { get { return ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product; } } public Version Version { get { return base.GetType().Assembly.GetName().Version; } } public Uri WebsiteUri { get { return new Uri("http://www.BoltBait.com/pdn"); } } } [PluginSupportInfo(typeof(PluginSupportInfo), DisplayName = "Burninate")] public class BurninateEffectPlugin : PropertyBasedEffect { public static string StaticName { get { return "Burninate"; } } public static Image StaticIcon { get { return new Bitmap(typeof(BurninateEffectPlugin), "burninate.png"); } } public BurninateEffectPlugin() : base(StaticName, StaticIcon, SubmenuNames.Distort, EffectFlags.Configurable) { } public enum PropertyNames { Amount1, Amount2, Amount3, Amount4 } protected override PropertyCollection OnCreatePropertyCollection() { List<Property> props = new List<Property>(); props.Add(new Int32Property(PropertyNames.Amount1, 100, 2, 1000)); props.Add(new DoubleProperty(PropertyNames.Amount2, 0.5, 0, 1)); props.Add(new BooleanProperty(PropertyNames.Amount4, false)); props.Add(new Int32Property(PropertyNames.Amount3, 0, 0, 255)); return new PropertyCollection(props); } protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Amount1, ControlInfoPropertyNames.DisplayName, "Scale"); configUI.SetPropertyControlValue(PropertyNames.Amount2, ControlInfoPropertyNames.DisplayName, "Roughness"); configUI.SetPropertyControlValue(PropertyNames.Amount2, ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(PropertyNames.Amount2, ControlInfoPropertyNames.SliderSmallChange, 0.05); configUI.SetPropertyControlValue(PropertyNames.Amount2, ControlInfoPropertyNames.UpDownIncrement, 0.01); configUI.SetPropertyControlValue(PropertyNames.Amount4, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.Amount4, ControlInfoPropertyNames.Description, "Black and White"); configUI.SetPropertyControlValue(PropertyNames.Amount3, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlType(PropertyNames.Amount3, PropertyControlType.IncrementButton); configUI.SetPropertyControlValue(PropertyNames.Amount3, ControlInfoPropertyNames.ButtonText, "Randomize"); configUI.SetPropertyControlValue(PropertyNames.Amount3, ControlInfoPropertyNames.Description, "HINT: Start by drawing a gradient from black to white before running this effect. Try different gradient shapes to vary the flames."); return configUI; } protected override void OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs) { this.Amount1 = newToken.GetProperty<Int32Property>(PropertyNames.Amount1).Value; this.Amount2 = newToken.GetProperty<DoubleProperty>(PropertyNames.Amount2).Value; this.Amount3 = newToken.GetProperty<Int32Property>(PropertyNames.Amount3).Value; this.Amount4 = newToken.GetProperty<BooleanProperty>(PropertyNames.Amount4).Value; // setup for calling the clouds effect cloudsProps = cloudsEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken CloudsParameters = new PropertyBasedEffectConfigToken(cloudsProps); CloudsParameters.SetPropertyValue(CloudsEffect.PropertyNames.Scale, Amount1); CloudsParameters.SetPropertyValue(CloudsEffect.PropertyNames.Power, Amount2); CloudsParameters.SetPropertyValue(CloudsEffect.PropertyNames.BlendOp, normalOp); CloudsParameters.SetPropertyValue(CloudsEffect.PropertyNames.Seed, Amount3); cloudsEffect.SetRenderInfo(CloudsParameters, dstArgs, srcArgs); base.OnSetRenderInfo(newToken, dstArgs, srcArgs); } protected override unsafe void OnRender(Rectangle[] rois, int startIndex, int length) { if (length == 0) return; for (int i = startIndex; i < startIndex + length; ++i) { Render(DstArgs.Surface, SrcArgs.Surface, rois[i]); } } protected override void OnCustomizeConfigUIWindowProperties(PropertyCollection props) { // Change the effect's window title props[ControlInfoPropertyNames.WindowTitle].Value = "BoltBait's Fire Effect v1.0"; base.OnCustomizeConfigUIWindowProperties(props); } int Amount1 = 100; // [2,1000] Scale double Amount2 = 0.5; // [0,1] Roughness int Amount3 = 0; // [255] Reseed bool Amount4 = false; // Black and White // Setup for calling the Render Clouds effect private CloudsEffect cloudsEffect = new CloudsEffect(); private PropertyCollection cloudsProps; // Setup for using Desaturate pixel op private UnaryPixelOps.Desaturate desaturateOp = new UnaryPixelOps.Desaturate(); // Setup for using various blend ops private UserBlendOps.OverlayBlendOp overlayOp = new UserBlendOps.OverlayBlendOp(); private UserBlendOp normalOp = new UserBlendOps.NormalBlendOp(); // Blend Mode unsafe void Render(Surface dst, Surface src, Rectangle rect) { // Call the Render Clouds function cloudsEffect.Render(new Rectangle[1] { rect }, 0, 1); // Now in the main render loop, the dst canvas has a render of clouds for (int y = rect.Top; y < rect.Bottom; y++) { ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y); ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = *srcPtr; // Make the source layer black and white CurrentPixel = desaturateOp.Apply(CurrentPixel); // Mix it with the clouds layer to create flames CurrentPixel = overlayOp.Apply(CurrentPixel, *dstPtr); // Now, make the curves adjustment to give the flames color if (!Amount4) { CurrentPixel.G = Utility.ClampToByte((CurrentPixel.G - 140) * 2.2173); CurrentPixel.B = Utility.ClampToByte((CurrentPixel.G - 204) * 5); } *dstPtr = CurrentPixel; srcPtr++; dstPtr++; } } } } } Note: This is NOT a CodeLab script. VS 2005+ is required to compile. Enjoy.
  21. FYI, forget what I said above... there is no good way to call other effects from a CodeLab script the way CodeLab works today. I'm working on a redesign of CodeLab, but I don't know when it will be ready.
  22. I think BB was using a "newer" version of Codelab which he hasn't released yet Yeah, sorry. I'm still working on CodeLab 1.3 and hopefully it will be released very soon. Glad you all liked the plugin, though. All credit goes to the author of the original tutorial. 8)
  23. Heh. You offer me a when I already have a ? :shock:
  24. Nah! Code_Ember is safe. No one ever reads the last post on a page.
×
×
  • Create New...