Endogine Paint

 

I have stopped developing Endogine on the Director platform, focusing on C#, but I’ve posted an executable for those who want to see the last version of it in action (and don’t want to reinstall Shockwave 8.5.1):

http://www.endogine.com/Tools/Paint/PaintExe.zip (2.8 MB)

NOTE: There are some graphical glitches that were introduced when I added the dirty rects optimizations. I never got around to investigate them.

 

 

I have started working on the C# version of the program, called PaintLab, but now it's based on a much more flexible rendering engine. Check it out at:
http://flowlabs.net


 

 

 

 

It turns out that the latest Shockwave player isn’t properly backwards compatible. If you uninstall your shockwave player and reinstall the 8.5.1 player, the example will work. I won’t be working to try and fix this – unless I get a load of money from Macromedia QA…

 

http://www.endogine.com/sw/MiniTests/Paint.htm

Source (first version, dated 04-12-23. Later versions not publicly available):

http://www.endogine.com/src/Paint.zip

MIAW Xtra version (dated 05-01-11, mail info(at)endogine.com to get the later versions):

http://www.endogine.com/Tools/Paint/Paint.zip

 

 

 

 

The general idea is that a Photoshop Layer corresponds to an Endogine sprite, and that a Brush is just a sprite which renders into another sprite.

 

A Layer's or a Brush's Mode (overlay, multiply etc) corresponds to a sprite's ink. Most of the Photoshop "inks" are implemented in an Xtra I've written, which can be used by Endogine.

Other tools than Brushes, such as Sponge, Dodge, Burn, Eraser, Blur, Sharpen etc should be easy to implement.

 

By using the appropriate Render Plugins, the Alpha channel of a sprite can be easily viewed and edited. (For some reason, the Eraser tool in this test doesn’t work on Mac)

Render Plugins that are written for Endogine (by myself or the community) can automatically be used by the Painter tool.

 

TODO: The Filters in Photoshop should be implemented as inks, and the RGBA channels should be routable to different parameters in a filter (e.g. Alpha channel routed to GaussianBlur’s Radius parameter). Settings for a sprite's filter should be stored in the sprite's settings list.

 

TODO-list for the not too distant future

Sooner:

* Simple shape tools (line, rect, oval)

* Fix zoom-related quirks (cursor zoom, zoom all layers simultaneously, regPoint editing)

* Pattern and gradient fills

* Add/subtract from selection

Later:

* Lasso selection tool

* Blur/sharpen and dodge/burn tools

* Script name as ink, allowing inks written in Lingo

* Layer dialog

* Separate, scrollable window for the canvas

* Magic wand

* Stroke selection

* Text tool

* Vector tools

 

Log

2005-01-21

* Added a color palette with import/export support for Photoshop .aco/.act and Painter .txt palette files. The .pal format shouldn’t be hard to add, but I can’t find any files to try my code on.

(All those sprites in the color palette makes the system really slow, so I should start working on optimizations soon)

 

2005-01-20

* Added a simple brush preset dialog. Right now it only contains the brush image, but it should also govern (at least) brush size, spacing, roundness and angle. Later, more advanced options could be added, such as color/shape dynamics and others found in Photoshop’s Brushes dialog.

 

2005-01-18

* “Save to member” menu item activated (right now, it just overwrites whatever is in the selected member. Later I’ll add a dialog)

* Added expandable buttons (hold down for 0.5 secs to get a dropdown-like menu)

* Added several tool buttons that don’t do anything yet (shapes, dodge/burn, blur/sharpen)

* Activated clipboard commands in menu. Clipboard commands now work without active selection

* Added an .ini file which saves dialog positions, sizes, visibility etc (through the base class CSprite’s serialize/deserialize handlers)

* Added functionality to draw lines with paint tools by shift-clicking

                                                                                                                   

2005-01-17

* Clipboard commands work with standard keyboard shortcuts (ctrl doesn’t work in MIAW or authoring, though, so I let it work without ctrl as well)

* Clipboard commands uses the operating system’s clipboard

* Pasting creates a new layer (i.e. sprite)

* Added Merge Layers button. Merges the images of all sprites named “Layer*” into sprite Layer01

 

Note: I haven’t added a dedicated Layer dialog yet, so in order to change Ink for a layer, you have to use the Property Inspector. Either ctrl-shift-click the sprite, or use the Scene Graph to bring it up, and change the ink there.

 

2005-01-16

* Fixed another FloodFill bug

* Fixed bug with member select buttons

* Added color chip to tool menu – click it to open Color dialog

* Added improved fast, fake convolutions filters (jbSharpen and jbBlur)

* Added regPoint edit tool. Note that the regPoint can be moved using the arrow keys. This revolutionary technology has eluded the Macromedia programmers for years, but is finally available through Endogine.

 

2005-01-13

* Fixed bug when using FloodFill in “Edit Alpha” mode. (Still some bugs left with that combination)

* Added buttons for walking the main movies cast

* Started adding clipboard functionality

* A faster blur filter

 

2005-01-12

* Load/Save of bitmaps (save requires SharpExport Xtra)

* Zoom script error fixed

* Some problems with closing/reopening Paint MIAW fixed

* Clear/Fill works with no selection (whole image instead).

* Clear for images with no alpha get filled with white instead

* Eraser works with images with no alpha (paints white)

* Added pattern bg behind edited image for transparency awareness

* Added menu item "Edit | Add/remove alpha"

* Added Edit Alpha checkbox for entering a mode where the Alpha channel can be edited (a bit like Quick Mask Mode in Photoshop)

* Added handles for resizing selection rectangles

 

2005-01-11

* Fixed bug where refreshing of empty areas doesn't work properly in MIAW mode.

* Color/brush/gradient/etc palettes hidden from start, and available from Window menu

* images with no alpha would get corrupted when using smudge and sponge tools

* Better detection of if it's running as an Xtra or not

* Eyedropper and floodfill tools

* Filter menu with some of Luke Wigley's filters: Blur, Sharpen, Emboss, Neon glow, Dullen, Desaturate, Invert, Overexpose, Pixelate. No filter settings dialogs yet, though.

 

2005-01-10 Can now run as a MIAW Xtra. Added a button (the one with an exclamation mark) which loads the currently selected bitmap from the cast for editing.

2005-01-07 Added cursor that indicates brush size. TODO: should only be active when over paint target sprite. Added recording/playback functionality, so that everything you do can be saved and replayed later. Added menu with commands such as load/save/clear/fill

2005-01-04 added alpha slider to color palette. Smudge tool now uses brush alpha bitmap to govern how the underlying bitmap is smudged (before it was 50% over the whole brush rectangle).

2005-01-03 some minor fixes with slider and color select widgets. Started adding a marquee tool for copying/moving rects.

2005-01-02: In the brush creator, click ResMngr to bring up the resource manager. Choose a bitmap. If you use the standard airbrush tool for painting, this bitmap will be used for the alpha channel. To paint with the bitmap as with a stamp tool, select the multicolor paint tool to the far right in the toolbox. Note that you should also set the paint color to pure black to avoid colorizing.

The “layout” in the Resource Manager – what the folders contain, and their sorting – is a bit random in this example. Later, the user will be able to either automatically group and sort resources into user-defined rule-based structures, or manually create structures. It will also be possible to save/load layouts – maybe you want one layout for yourself, where all resources are visible, but another one for the guy who’s doing the GUI in your production where only the GUI elements are available.

As usual, there are lots and lots of things to be done on the ResManager, this one hasn’t even had its ulimbical cord cut yet.

2004-12-28 GUI for creating brushes (using a gradient editor). Added two tools: a simple Zoom (Alt-click to zoom out) and a desaturating Sponge. Redesigned Tool plugin system for greater flexibility.

I’m fairly confident now that most Photoshop functionality wouldn’t be very hard to implement in this structure. Unfortunately, that’s a classic signal indicating I’ll soon lose interest in this particular part of the project... Maybe I’ll look into creating a 3D world editor next.

2004-12-26 Created Gradient Editor. Added sliders for brush size and sharpness. Added a Smudge tool (which doesn’t work so well because of copyPixels’ shortcomings. In Projectors I’ll use my Xtra instead). Restructured program to be more flexible.

2004-12-23 function for generating brushes – size and gradient. Demostrates this by animating the sharpness of the brush (i.e. the brush’s gradient curve). Source will be updated later. Noted that the Eraser tool doesn’t work on Macs.

2004-12-21 Added a Painter™-like color palette, and yet another demonstration of that anything can be animated (saturation of color palette is animated)