Sunteți pe pagina 1din 51

Lazy Nezumi Pro

Official Documentation
Version 18.06.08

Website: https://lazynezumi.com
Email: contact@lazynezumi.com

Copyright © 2013-2018 Guillaume Stordeur 1/51


Table of Contents
1 Introduction.............................................................................................................................................5
1.1 Support............................................................................................................................................5
1.2 Minimum PC Hardware Requirements...........................................................................................5
1.2.1 Operating Systems...................................................................................................................5
1.2.2 Hardware..................................................................................................................................5
2 Getting Started........................................................................................................................................7
2.1 Smoothing Presets...........................................................................................................................7
2.2 Ruler Presets....................................................................................................................................7
2.3 Misc Presets.....................................................................................................................................7
3 Menus......................................................................................................................................................9
3.1 File...................................................................................................................................................9
3.1.1 Hook Window..........................................................................................................................9
3.1.2 Mini Mode...............................................................................................................................9
3.1.3 Exit...........................................................................................................................................9
3.2 Settings............................................................................................................................................9
3.2.1 Language..................................................................................................................................9
3.2.2 Check for Update on Startup.................................................................................................10
3.2.3 Global Keyboard Shortcuts....................................................................................................10
3.2.4 Ruler Param Shortcuts...........................................................................................................10
3.2.5 Save Presets on Exit...............................................................................................................10
3.2.6 Window Settings....................................................................................................................10
3.2.7 Spacebar pan offsets ruler centers..........................................................................................11
3.2.8 Disable on Key Down............................................................................................................11
3.2.9 Disable on Pen Eraser............................................................................................................11
3.2.10 Tablet Options......................................................................................................................11
3.2.11 App Cursor...........................................................................................................................12
3.2.12 Edit Shortcuts......................................................................................................................12
3.2.13 Edit Photoshop Options.......................................................................................................13
3.2.14 Edit User Data Path.............................................................................................................14
3.2.15 Edit Overlay Settings...........................................................................................................14
3.3 Presets............................................................................................................................................14
3.3.1 Enable/Disable.......................................................................................................................14
3.3.2 Details....................................................................................................................................14
3.3.3 Show in Mini Mode...............................................................................................................14
3.3.4 Edit Name and Shortcut.........................................................................................................14
3.3.5 Save Changes.........................................................................................................................14
3.3.6 Discard Changes....................................................................................................................14
3.3.7 Save As..................................................................................................................................15
3.3.8 New........................................................................................................................................15
3.3.9 Delete.....................................................................................................................................15
3.3.10 Open Preset Folder..............................................................................................................15
3.3.11 Rescan Preset Folder............................................................................................................15
3.4 Help...............................................................................................................................................15
3.4.1 Insert Log Marker..................................................................................................................15
3.4.2 Send Logs..............................................................................................................................15

Copyright © 2013-2018 Guillaume Stordeur 2/51


3.4.3 Documentation.......................................................................................................................15
3.4.4 Activate/Renew License........................................................................................................15
3.4.5 Check for Update...................................................................................................................15
3.4.6 About Lazy Nezumi Pro........................................................................................................16
3.4.7 Ask a Question.......................................................................................................................16
4 Main Preset Controls.............................................................................................................................17
4.1 On/Off Button................................................................................................................................17
4.2 Preset List......................................................................................................................................17
4.3 Show/Hide Parameters Button......................................................................................................17
4.4 Position Smoothing.......................................................................................................................17
4.4.1 Pulled String..........................................................................................................................17
4.4.2 Moving Average.....................................................................................................................18
4.4.3 Exponential Moving Average................................................................................................18
4.4.4 Guide Line and Cursor...........................................................................................................18
4.5 Pressure Curve...............................................................................................................................19
4.5.1 Gain.......................................................................................................................................20
4.5.2 Softness..................................................................................................................................20
4.5.3 Minimum Value.....................................................................................................................21
4.5.4 Maximum Value.....................................................................................................................21
4.5.5 Invert......................................................................................................................................21
4.5.6 Stroke Average.......................................................................................................................21
4.5.7 Stroke Max............................................................................................................................21
4.5.8 Auto Adjust............................................................................................................................22
4.6 Pressure Processing.......................................................................................................................22
4.6.1 Fixed Value............................................................................................................................22
4.6.2 Sample & Hold......................................................................................................................22
4.6.3 Moving Average.....................................................................................................................22
4.6.4 Exponential Moving Average................................................................................................23
4.7 Pressure Speed Scaling..................................................................................................................23
4.8 Tilt and Rotation Smoothing.........................................................................................................24
4.9 Rulers.............................................................................................................................................24
4.9.1 Ellipse....................................................................................................................................25
4.9.2 Radial Lines...........................................................................................................................27
4.9.3 Parallel Lines.........................................................................................................................27
4.9.4 Connected Lines....................................................................................................................28
4.9.5 Isometric Perspective.............................................................................................................29
4.9.6 Linear Perspective.................................................................................................................31
4.9.7 Fisheye Perspective...............................................................................................................34
4.9.8 Vanishing Lines.....................................................................................................................35
4.10 Scripting......................................................................................................................................35
4.10.1 Program Language Definition.............................................................................................36
4.10.2 L-Systems............................................................................................................................43
5 Known Issues........................................................................................................................................47
5.1 Application Compatibility Issues..................................................................................................47
5.1.1 Applications Run As Administrator.......................................................................................47
5.1.2 Gimp 2.8................................................................................................................................47
5.1.3 PaintTool SAI........................................................................................................................47

Copyright © 2013-2018 Guillaume Stordeur 3/51


5.1.4 Windows 8/10 Metro/Store Apps...........................................................................................47
5.1.5 Twisted Brush........................................................................................................................47
5.1.6 Windows Journal...................................................................................................................47
5.1.7 Inkscape.................................................................................................................................47
5.1.8 Flash.......................................................................................................................................48
5.1.9 Applications started by Steam...............................................................................................48
5.1.10 OneNote...............................................................................................................................48
5.1.11 Illustrator CC 2018..............................................................................................................48
5.1.12 Corel Painter 2018...............................................................................................................48
5.2 Photoshop Plugin Issues................................................................................................................48
5.2.1 Plugin Installation..................................................................................................................48
5.2.2 Active Tool Detection............................................................................................................48
5.2.3 Missing Lines or Full Pressure Lines....................................................................................49
5.2.4 Straight Line Bug...................................................................................................................49
5.2.5 Start or End Line Offset.........................................................................................................49
5.2.6 Pen Support in CC for Win8/10.............................................................................................50
5.2.7 Perspective ruler center offset after zooming........................................................................50
6 Other Information.................................................................................................................................51
6.1 Qt...................................................................................................................................................51
6.2 QCustomPlot.................................................................................................................................51
6.3 MuParser.......................................................................................................................................51

Copyright © 2013-2018 Guillaume Stordeur 4/51


1 Introduction
Thank you for downloading Lazy Nezumi Pro (or LNP for short)!
With it, you will be able to add mouse and pen smoothing, and all sorts of other useful line processing
options to Photoshop and many other digital art applications!
You have 15 days to evaluate this software. All features are enabled during this trial period. After this
period ends, most features will become disabled.
If you decide that you wish to keep using this software, please purchase a license by visiting:
https://lazynezumi.com/buy
Your purchase will help fund the continued development of Lazy Nezumi Pro, including bug fixes,
new features, and support for more art applications and hardware!
I hope you find Lazy Nezumi Pro useful and that it helps you save time and become a better digital
artist!
Have fun and make some awesome art! :)

1.1 Support
If you encounter any problems or have any questions, please contact me here:
support@lazynezumi.com
I will be happy to help, but please provide as much information as you can. Provide your OS version,
what software, and which tablet model you are using.
Lazy Nezumi Pro generates log files in your user data folder. Please attach these to your email. These
will give me more information for fixing any bugs and improving the software!
By default, the user data folder is located here:
C:\Users\[user]\AppData\Local\Lazy Nezumi Pro\
You can also use the 'Help->Send Logs' menu. This will open the folder for you.

1.2 Minimum PC Hardware Requirements

1.2.1 Operating Systems


Lazy Nezumi Pro has been tested to run on the following versions of Microsoft Windows: XP, Vista,
7, 8/8.1, and 10. Both 32bit and 64bit versions are supported.
It has not been tested and will most likely not work with Windows 98, 2000, NT.
Mac OSX and Linux are not supported because of technical software limitations.

1.2.2 Hardware
Lazy Nezumi Pro requires about 25 MB of disk space, a 1.0 GHz CPU (or faster), and 1 GB of RAM.

Copyright © 2013-2018 Guillaume Stordeur 5/51


If your computer can handle your art software, then it should be able to handle Lazy Nezumi Pro
without any performance problems.

Copyright © 2013-2018 Guillaume Stordeur 6/51


2 Getting Started
Lazy Nezumi Pro comes with many stock presets to get you started. They are organized into 3
categories: Smoothing, Rulers, Misc.

An important thing to note is that even though these are great starting points, the user is encouraged to
tweak and combine the settings into their own presets to get the best results for them.

2.1 Smoothing Presets


These presets will help you reduce the shakiness of your lines.

• Pulled string is very popular with some people for line art, since it lets you draw very slowly.
• Massive is great for making big expressive lines. The line will have more lag but will catch up
to your pen when you slow down or stop.
• Some people just have the Subtle preset on all the time, as it smooths just enough to make the
lines look better, without adding noticeable lag.
• Pressure gain has some subtle smoothing, along with gain in the pressure curve section, to
make getting thick lines easier.
• Speed pressure will vary the thickness of your strokes depending on how fast you draw.
• Speed smooth will apply smoothing when you draw slowly, but not when you draw fast (you
can invert this by changing the min/maxSmoothSpeed values in the Scripting section).
• Weighted uses physics to simulate a weighted brush that has momentum and drag. Pressure is
automatically computed based on the current speed, producing nice tapered lines.
A smoothing tutorial is available here: https://lazynezumi.com/smoothing

2.2 Ruler Presets


These presets create rulers that will help you with technical drawing, such as straight lines, curved
lines, ellipses, and perspective (isometric, linear, and fish-eye).
Most of them have parameters that can be adjusted in the Rulers section of the preset. You can setup
keyboard shortcuts for these parameters via the “Settings->Edit Shortcuts” menu, in the Rulers tab.
You can disable these entirely by unchecking the "Settings->Ruler Param Shortcuts" menu.
Some parameters are also linked to control points you can interact with by holding the control key.
These control points and guides are rendered on a transparent overlay window. You can change colors
and opacity (and disable it completely) via the "Settings->Edit Overlay Settings" menu. While you're
there, enable Direct2D if your system supports it, for much better performance.
For more information about the different rulers available, see Section 4.9.

2.3 Misc Presets


These are presets that demonstrate some of what's possible with Lazy Nezumi Pro's scripting feature.

If you open the mode drop-down list in the Scripting section of the user interface, you can browse

Copyright © 2013-2018 Guillaume Stordeur 7/51


through a list of pre-defined scripts. Clicking on the Code arrow button will show you the script. Feel
free to copy/paste to a custom script to make and modify your own scripts.

Section 4.10 has detailed information that will help you write your own scripts.

Copyright © 2013-2018 Guillaume Stordeur 8/51


3 Menus

3.1 File

3.1.1 Hook Window


Unless you are using the Photoshop plugin, Lazy Nezumi Pro must hook into any window of any
application you wish to apply its processing functions.
If you click on this menu, a window will appear, instructing you how to hook a window: after clicking
OK, simply place your mouse cursor over the window you wish to hook, and wait a couple seconds. If
the hook is successful, a red rectangle will flash around the window.
To save time, instead of using this menu, set your cursor over the window you wish to hook, and use
the Hook Window global keyboard shortcut. This shortcut can be changed in the Settings->Edit
Shortcuts menu.
If you exit just Lazy Nezumi Pro, it sends a signal to all hooked applications to put the plugin into
sleep mode. When you start Lazy Nezumi Pro again, if you haven't restarted your hooked applications,
you won't need to hook them again. So if you accidentally hooked a program, or just don't want to have
to deal with Lazy Nezumi Pro's On/Off anymore, you must restart that program for it to be unhooked.

3.1.2 Mini Mode


When in Mini Mode, most UI elements will be hidden. When the mouse comes over the window, all
available presets will be displayed as buttons.
This allows the user to quickly select a preset without using any keyboard shortcut.
To exit this mode, simply click the Details button, or uncheck the Mini Mode item in the tray icon's
context menu.

3.1.3 Exit
This menu will exit Lazy Nezumi Pro. If you have any unsaved presets, you will be asked if you wish
to save them before exiting.
Note that if you have the “Close To System Tray” setting enabled, closing the window by clicking on
the close button will only minimize it to the notification area (system tray).

3.2 Settings

3.2.1 Language
This menu lets you choose the language used for most of the text in the user interface. For now, the
options are: English, Japanese, and Korean.

Copyright © 2013-2018 Guillaume Stordeur 9/51


3.2.2 Check for Update on Startup
This setting will enable an automatic version check at startup. If a new version is available, a dialog
window will open with a link to the download page.

3.2.3 Global Keyboard Shortcuts


This allows you to enable or disable all global keyboard shortcuts. This can be useful when you are
using an application that uses many shortcuts itself, and for which Lazy Nezumi Pro is not needed.

3.2.4 Ruler Param Shortcuts


This allows you to enable or disable the keyboard shortcuts used to modify some of the parameters of
the ruler presets, such as the Ellipse Degree or Rotation.
You can assign a global hotkey to this setting in the Edit Shortcuts menu.

3.2.5 Save Presets on Exit


Enable this if you want all preset changes to be saved when you exit the application.

3.2.6 Window Settings


Start Minimized
Enable this setting if you want the Lazy Nezumi Pro window to start minimized in the notification
area.
Stay On Top
Enabling this setting will cause the Lazy Nezumi Pro window to stay on top of other windows. If you
are using a fullscreen application, this may not work, but you can try turning it off and on again.
When this setting is on, when the mouse leaves the Lazy Nezumi Pro window area, the window under
the mouse will become activated automatically. This helps for applications that don't allow you to draw
right away when switching from another window. This will allow you to draw right away without first
having to manually activate the window.
Auto Alt-Tab
This setting will automatically change the focus to the first hooked window found under the mouse
when you leave the LNP window.
This allows you to start drawing again right away after changing LNP settings, without having to click
once to activate the canvas window.
Show Tray Messages
Enable this if you want popup messages to appear in the notification area (system tray) when you use a

Copyright © 2013-2018 Guillaume Stordeur 10/51


keyboard shortcut to interact with Lazy Nezumi Pro.
Minimize To System Tray
Enable this if you want the window to go to the notification area (system tray) when you minimize it,
instead of the task bar.
Close To System Tray
This setting lets you choose whether the close window button should exit the app, or simply minimize
it to the system tray.

3.2.7 Spacebar pan offsets ruler centers


This setting will cause the center of all ruler presets (or any scripts that use the cx/cy center variables)
to be displaced when you use the spacebar key to pan your canvas. This will happen even when Lazy
Nezumi Pro is off.
If you are using the Perspective preset, this will help you stay in sync with your drawing, without
having to reposition the center manually after panning your canvas.
Note that this might sometimes cause the center of presets to go off-screen. If this happens, you can pan
back in the opposite direction to get it back, or use the Set/Reset Ruler Center Pos shortcuts.
Also note that Lazy Nezumi Pro does not know if your art application stops panning the window (for
example when reaching a border), so it's still a good idea to mark your center on a separate layer so you
can always see that you're in sync.

3.2.8 Disable on Key Down


The space key always bypasses Lazy Nezumi Pro functions. This allows you to quickly pan around
your canvas in most art applications, without Lazy Nezumi Pro applying any processing to your
mouse movement.
If you use other keyboard shortcuts in your art application while drawing, you can enable this setting so
that they also bypass Lazy Nezumi Pro functions.
If you are using the Photoshop plugin, then you don't need to enable this setting. You can instead
configure the tools for which you want Lazy Nezumi Pro to be disabled (see Edit Photoshop Options).

3.2.9 Disable on Pen Eraser


Enable this setting if you want Lazy Nezumi Pro to automatically disable itself when you use the
eraser end of your stylus.

3.2.10 Tablet Options


Tablet drivers can be tricky beasts. Lazy Nezumi Pro will always try to detect optimal settings, but
sometimes it will require your assistance to make sure that things are correct.
If you have your tablet setup in Mouse Mode (instead of the recommended Pen Mode), you will need
to enable Tablet Mouse Mode in LNP as well. If you don't, you may experience offset strokes when
you draw with your pen.

Copyright © 2013-2018 Guillaume Stordeur 11/51


If your tablet is in Pen Mode but you are still experiencing offset strokes, you may try enabling the Pen
Offset Fix option. If that doesn't help, please use the Help->Send Logs menu to collect the LNP logs,
and send them along with a description of your monitor setup to support@lazynezumi.com.

3.2.11 App Cursor


If you use a screen-tablet, the cursor can be really distracting when you paint small details. You can use
this setting to hide it completely or only while you are drawing. You can cycle through the different
settings with a keyboard shortcut that you can change with the Edit Shortcuts menu.
Please note that cursor visibility is a global setting, and not affected by the preset's On/Off setting.
The “Custom Cursor” setting causes the hooked applications to use a custom cursor. You can change
this cursor by editing the “customAppCursor.cur” file, located in your Lazy Nezumi Pro installation
folder. The default is a tiny dot cursor, that should help when drawing details while zoomed out.
If you are using the custom cursor, the “Disable Custom with Preset” setting will force it to switch back
to the regular cursor when you disable the current preset, or you switch to a tool or operation that is
bypassed.
The “Mega Crosshair” setting shows a giant crosshair over the entire screen. This can be useful when
doing technical drawing, when you need to make sure that things align properly at a glance.

3.2.12 Edit Shortcuts


This will open a dialog window where you will be able to configure your global keyboard shortcuts:
• Hook Window - Used to quickly hook an application window.
• On/Off - Used to enable Lazy Nezumi Pro in all currently hooked application windows.
• Show/Hide - Used to alt-tab between Lazy Nezumi Pro and your art application.
• Next Preset - Used to switch to the next preset in the list.
• Previous Preset - Used to switch to the previous preset in the list.
• Save Preset Changes - Used to save the current preset changes.
• Discard Preset Changes - Used to discard the current preset changes and reload it.
• Mini Mode - Used to toggle Mini Mode.
• Custom App Cursor On/Off - Toggle the custom cursor in hooked applications.
• Custom App Cursor On - Enable custom cursor in hooked applications.
• Custom App Cursor Off - Disable custom cursor in hooked applications.
• App Cursor On/Off - Used to toggle the app cursor visibility.
• App Cursor On - Used to always show the App Cursor.
• App Cursor Off - Used to always hide the App Cursor.
• App Cursor Off while Drawing - Used to hide the App Cursor only while drawing.

Copyright © 2013-2018 Guillaume Stordeur 12/51


• Mega Crosshair – Used to show/hide the Mega Crosshair on the current screen.
• Ellipse Auto Fit – Toggles the Auto Fit mode of the ellipse ruler.
• Set Ruler Center Pos – Sets the value of the script program variables cx/cy and the current ruler
center to the current position of your mouse. You can use this if the center of a ruler or script
preset is lost off-screen.
• Reset Ruler Center Pos – Resets the script program variables cx/cy and the current ruler center
to the center of the primary display.
• Ruler Param Shortcuts On/Off – Used to enable the keyboard shortcuts used to modify certain
ruler parameters.
• Ruler Accuracy Off/Restore – Used to set the current ruler's accuracy to 0, and to restore it to its
previous value.
• Position Smoothing On/Off – Toggles the position smoothing component of the active preset.
• Pressure Curve On/Off – Toggles the pressure curve component of the active preset.
• Pressure Processing On/Off – Toggles the pressure processsing component of the active preset.
• Ruler On/Off – Used to toggle the ruler component of the active preset.
• Scripting On/Off – Used to toggle the scripting component of the active preset.
• Overlay On/Off – Used to toggle the transparent overlay window where line graphics are
displayed.
• Insert Log Marker - Used to insert a timestamp marker in the log file, for debugging purposes.
This window has another tab that will allow you to setup global shortcuts for each preset, and a tab for
ruler preset parameter shortcuts.

3.2.13 Edit Photoshop Options


Here you can configure options that are specific to the Photoshop plugin.
There are checkboxes that you can check if you want Lazy Nezumi Pro to start/close automatically
when Photoshop is started/closed. You can also set the plugin initialization delay here. This is the time
in milliseconds that the plugin will wait once it's loaded before initializing everything. Changing this
value can sometimes help if you are experiencing problems.
There is also a dynamic list of tool checkboxes. This list gets populated as you use new tools in
Photoshop. If you don't ever need processing for a particular tool, then uncheck that tool from this list,
and Lazy Nezumi Pro will be bypassed whenever you use it.
The Fix Jitter Bug checkbox can be used to try to fix Photoshop's jittery line issue (for versions CS5
and CS6). If this causes unwanted behavior, it can be disabled. You need to exit LN and restart
Photoshop after changing this setting.
Also in this setting window are two checkboxes that control whether the active tool and layer should be
displayed when they are changed. This can be useful when working with Photoshop in full-screen
mode.

Copyright © 2013-2018 Guillaume Stordeur 13/51


3.2.14 Edit User Data Path
Lazy Nezumi Pro stores your license, presets and log files in a user data folder. This menu allows you
to change the location of this folder.
This can be useful if you have your presets and license on a usb key or removable drive, and wish to
use them on someone else's machine temporarily without having to copy or remove any files. Simply
reset the user data path when you are done.
Please note that you will need to restart Lazy Nezumi Pro for this change to take effect.

3.2.15 Edit Overlay Settings


This will open a window where you will be able to edit overlay rendering settings. The overlay is a
transparent window shown on top of your application, that shows guide lines relevant to the current
preset you have selected in Lazy Nezumi Pro.
On some configurations, the overlay window may cause lag when active. If you experience this, try
checking the Direct2D option for better performance. If this doesn't help, you can also just disable it.

3.3 Presets

3.3.1 Enable/Disable
This enables or disables all Lazy Nezumi Pro functionality in all hooked application windows.

3.3.2 Details
This menu item will show or hide all the preset parameters. This has the same effect as clicking the '…'
button next to the preset list.

3.3.3 Show in Mini Mode


This setting allows you to choose whether the current preset should be displayed as a button in the Mini
Mode view. This is useful if you have lots of presets, but only wish to see a few of them in Mini Mode.

3.3.4 Edit Name and Shortcut


This will open a dialog window that will allow you to change the name or keyboard shortcut of the
current preset.

3.3.5 Save Changes


This will save the current preset's changes to disk.

3.3.6 Discard Changes


This will discard the current preset's changes and reload it from disk.

Copyright © 2013-2018 Guillaume Stordeur 14/51


3.3.7 Save As
This will save the current settings as a new preset.

3.3.8 New
This will create a new preset with default/OFF settings.

3.3.9 Delete
This will delete the current preset.

3.3.10 Open Preset Folder


This will open an explorer window to the folder where the presets are saved. This will allow you to
easily copy them and share them with other people.

3.3.11 Rescan Preset Folder


This will reload all presets from the disk. This is useful if you have placed a new preset in the preset
folder and wish to load it with without restarting Lazy Nezumi Pro.

3.4 Help

3.4.1 Insert Log Marker


Inserts a timestamped marker in the log file. This is used for debugging purposes only.

3.4.2 Send Logs


This will create an email with the log files attached. Please use this if you are running into problems
and require assistance. Don't forget to fill in the requested information before sending the email.

3.4.3 Documentation
Opens this document.

3.4.4 Activate/Renew License


This will open a window that will help you buy or renew a license, and activate it.

3.4.5 Check for Update


This will open a webpage that will show you if there is a new version of Lazy Nezumi Pro.

Copyright © 2013-2018 Guillaume Stordeur 15/51


3.4.6 About Lazy Nezumi Pro
This will open a window that shows your trial status or license information, along with the software
version.

3.4.7 Ask a Question


This will open the contact web page where you can chat with me live or leave a message if I'm away.

Copyright © 2013-2018 Guillaume Stordeur 16/51


4 Main Preset Controls

4.1 On/Off Button


This enables or disables all Lazy Nezumi Pro functionality in all hooked application windows.

4.2 Preset List


This is a list of all the available presets and their global shortcuts. If there is star in front of a preset's
name, then this preset has unsaved changes.

4.3 Show/Hide Parameters Button


This expands or collapses the window to show or hide all of the current preset parameters.

4.4 Position Smoothing

Illustration 1: Position Smoothing UI

This section allows you to select a smoothing method for the current preset.
Use the checkbox to enable position smoothing, and then select a mode from the dropdown list. The
following sub-sections describe each mode.
Note that some smoothing presets do not use these settings, and rely on scripting instead (Weighted
Smoothing is such a preset).

4.4.1 Pulled String


This mode is similar to the ZBrush Lazy Mouse feature. Imagine that your brush is being pulled by a
string of a certain length. The brush will only move once the string is taut (when you have moved your
cursor more than the String Length distance).
This mode is useful for slow detailed work.

Copyright © 2013-2018 Guillaume Stordeur 17/51


4.4.2 Moving Average
This mode computes the average position from a fixed quantity of last input samples. This quantity is
set with the Amount control.
With this mode, you can enable the Catch Up setting, which will make lines drawn with a pen catch up
to the current position when you stop moving the stylus. While catching up, the line will keep direction
momentum, making it easy to close circles.
If you wish for the line to also fade out to the point where you lift your pen, add some Pressure
Smoothing.

4.4.3 Exponential Moving Average


This mode computes a weighted average position of all the previous input samples, with the weights
decaying exponentially in time. The amount of smoothing is set with the Amount setting.
This mode has a slightly different feel than Moving Average, but you can bring out much more
smoothing with it if needed.
This mode can also use the Catch Up setting, but it behaves a little differently than with Moving
Average: when you stop moving your stylus, the line will catch up in a straighter line than with Moving
Average.

4.4.4 Guide Line and Cursor


Here you can enable a guide line and cursor to be rendered when you draw. Since position smoothing
introduces some lag, these can help you see where your pen actually is, and where it is going.
• Guide Line - This draws a line from the processed position to the actual pen position.
• Guide Cursor - This draws a little circle cursor at the actual pen position.
• Color - Edit the color used for the guide line and cursor.

Illustration 2: Guide Line

Copyright © 2013-2018 Guillaume Stordeur 18/51


4.5 Pressure Curve

Illustration 3: Pressure Curve UI

These settings are applied before pressure processing, and are somewhat similar to what you may find
in your tablet's control panel.
They are applied one after the other.
If you wish to make it easier to reach the maximum pressure value of your tablet, you should add some
Gain, and reduce the Softness so that lower pressure values are not affected as much (which will make
it still easy to draw thin lines).
Clicking on the Graph button will open a window that will show you a graph of the pressure curve
function. This graph shows your last stroke's average and maximum pressure values. The green region
under the curve represents the used pressure input range.

Copyright © 2013-2018 Guillaume Stordeur 19/51


Illustration 4: Pressure Curve Graph

4.5.1 Gain
This multiplies incoming pressure values with a constant Gain factor.
This helps bring out high pressure values faster, and allows you to not have to press as hard to reach the
maximum pressure value.

4.5.2 Softness
This control applies an exponential curve to the incoming pressure.
A value of 0 has no effect. A negative value will make it slightly harder to obtain high pressure values.
A positive value will make it slightly easier to obtain high pressure values. The following image gives
two example pressure response curves.

Copyright © 2013-2018 Guillaume Stordeur 20/51


Illustration 5: Pressure Softness Graphs

4.5.3 Minimum Value


Use this setting to set a minimum pressure value. The default is 0.0 (no pressure).

4.5.4 Maximum Value


Use this setting to set a maximum pressure value. The default is 1.0 (full pressure).

4.5.5 Invert
Use this setting to invert the pressure curve. This will allow you to make your lines thinner or more
transparent (depending on your software and brush setup) when you press harder with your pen.
Note that you will need to set a minimum pressure value when using this setting, otherwise your lines
will be cut short when you press hard enough.

4.5.6 Stroke Average


This displays the average input and output (after the curve settings are applied) pressure value of your
last stroke.
If you wish to make it easier to reach the maximum pressure value of your tablet, but maintain a similar
feel at low to average values, change the Softness setting so that the average output is not too much
greater than the average input.

4.5.7 Stroke Max


This displays the maximum input and output (after the curve settings are applied) pressure value of
your last stroke.
If you wish to make it easier to reach the maximum pressure value of your tablet, increase the Gain
setting so that the max output is closer to 1.

Copyright © 2013-2018 Guillaume Stordeur 21/51


4.5.8 Auto Adjust
Press this button to toggle auto-adjust mode.
While drawing with this button activated, your max pressure is recorded and used to automatically set
the Gain and Softness parameters in such a way as to maximize your drawing style's pressure range,
while still giving you detailed control of lower pressure values.
After turning it on, you should draw a couple of lines in your usual style. It's important to use your full
pressure range so that the gain gets set correctly. If you draw more softly that usual, the gain will over-
compensate, and it will then become hard to draw thin lines.
Once you are happy with the settings, turn off auto-adjust by clicking on the button again. You can then
fine-tune your settings.

4.6 Pressure Processing

Illustration 6: Pressure Processing UI

This control group allows you to choose how this preset will process pressure information from pen
events in hooked application windows.
Use the checkbox to enable pressure processing, and then select a mode from the dropdown list. The
following sub-sections describe each mode.

4.6.1 Fixed Value


Use this mode if you wish to force your pen to output a fixed pressure value, no matter how hard you
press.

4.6.2 Sample & Hold


When using this mode, the pressure of your line will be kept at whatever the pressure is at the given
Sample Number.
This is useful when you want do quickly draw lines of different thickness without having to maintain a
constant pressure with your pen.

4.6.3 Moving Average


This mode computes the average pressure from a fixed quantity of last input samples. This quantity is
set with the Amount control.
This is useful when you are drawing slowly and want to smooth out slight pressure variations.

Copyright © 2013-2018 Guillaume Stordeur 22/51


This will also allow you to obtain nice line fade-ins and fade-outs. Note that for fade-outs to work, you
will also need to use some Position Smoothing.

4.6.4 Exponential Moving Average


This mode computes a weighted average pressure of all the previous input samples, with the weights
decaying exponentially in time. The amount of smoothing is set with the Amount setting.
Similar to Moving Average, but is capable of much more smoothing.

4.7 Pressure Speed Scaling

Illustration 7: Pressure Speed Scaling UI

This feature is used to apply dynamic speed controlled gain to incoming pressure values. If this is
enabled, the gain is applied after the pressure processing section. This can really add some character
and depth to your lines.
The Slow Gain setting controls the amount of pressure gain applied when your pen doesn't move at all.
The Fast Gain setting controls the amount of pressure gain applied when your pen speed reaches a
certain fixed speed, which can also control via the Fast Speed setting.
The resulting pressure gain is computed by using your current pen speed to linearly interpolate between
the slow and fast gain values.
As you can see in the following image, you can set these gain controls so that your line thickens when
drawing fast, and becomes more thin when drawing slowly. The reverse is also possible by setting Slow
Gain higher than Fast Gain. A gain value of 1.0 is neutral and has no effect.

Copyright © 2013-2018 Guillaume Stordeur 23/51


Illustration 8: Pressure Speed Scaling Graph

The Speed Smoothing setting is used to smooth the speed value before the gain is computed. Increasing
this will result in less abrupt gain changes.
Depending on how often your software polls for input data, and the resolution of your screen and
tablet, you may have to experiment with these settings to obtain good results.
The Stroke Average and Stroke Max labels show you the average and max input speed and output gain
of your last stroke. Use these as a guide to fine tune the settings to get the desired result.
The graph button will open a window that will show you a graph of the gain function. This graph is
interactive: you can zoom by dragging your mouse/pen, and pan by dragging while holding the ctrl key.
The Slow Gain and Fast Gain circles can be selected and moved. This graph also shows you your last
stroke's average and max speed.

4.8 Tilt and Rotation Smoothing


This processing section allows you to add smoothing to your pen's tilt and rotation (if your pen
supports these features). The Amount setting controls how much smoothing to apply.

4.9 Rulers
This processing section will snap your lines to various rulers, to help you with technical drawing.
Choose a mode from the drop-down list to get started. The next sub-sections explain how to use each
tool.
Most of these rulers have parameters for which keyboard shortcuts can be assigned via the
Settings/Edit Shortcuts menu, in the Ruler Shortcuts tab.
If you hold the control key, visual handles (or control points) will appear that will also let you quickly
interact with these parameters. Note that you shouldn't draw while holding the control key, or any other
ruler keyboard shortcut, as it might interfere with your art application.

Copyright © 2013-2018 Guillaume Stordeur 24/51


You'll also notice that all ruler modes have a common Accuracy parameter. When set to a value of 1,
the line you draw will be fully projected onto the selected ruler. The closer this value gets to 0, the
more of your original input gets mixed in, letting you add imperfections to make the lines look more
natural.

4.9.1 Ellipse

Illustration 9: Ellipse Ruler Parameters

This mode will help you draw ellipses and circles. It has the following parameters:
• Degree – The degree of the ellipse, with 90 being a circle.
• Rotation – Rotation of the ellipse minor axis (from the horizontal).
• Connect Ends – When accuracy is lower than 1, checking this option will ensure that none of
your original input gets mixed in towards the start and end of the ellipse, effectively helping
you connect the ends neatly.
• Radial Line – This enables the radial ruler connecting to the center. When enabled, you can
toggle between the ellipse and the radial line by tapping Shift before drawing (this can be
changed in the Shortcut settings, via the “Select Line” shortcut). While drawing, you can switch
lines by pressing control.
• Box Mode – When Radial Line is enabled and you turn this one, when you switch lines while
drawing, your pen will be clamped to an elliptical/circular section box defined by the angles and
radial length of your first lines. If set to X-Symmetric or Y-Symmetric, the end angle will be
determined when you start drawing, depending on which direction around the ellipse/circle you
are going.
The Auto Fit button can be used to automatically set the center, degree, and rotation parameters based
on your sketch.
The ellipse center can be moved around by dragging its center point. The size of the ellipse is
determined by your pen down position. It is currently not possible to lock the ellipse to a certain size. If
you look at the minor and major axis, a portion of them will be orange. This indicates the size of the
last drawn ellipse. Use these guides if you need to draw multiple ellipses of the same size at different
locations, or disconnected portions of the same ellipse.

Copyright © 2013-2018 Guillaume Stordeur 25/51


Holding the control key will also show the interactive control points. You'll notice that the center point
becomes yellow. In this mode, it slides along the minor or major axis. Hold shift while using the
rotation handle to clamp to 5 degree increments.
When this ruler is active, you can use the following predefined input variables when scripting:
• dn – Normalized distance around the circle/ellipse. This can be used to sync patterns that need
to repeat exactly when going around more than once.
• ew – The current ellipse width. This can be used to modulate pattern sizes based on the size of
the ellipse you are drawing. The width is always greater or equal to the height.
• eh – The current ellipse height.
• er – The current ellipse rotation.
• eca – The current angle of your pen position.
• rcx, rcy – The x and y coordinates of the center point.
See the Circular Patterns and Isometric Circle Patterns script modes for examples on how to use
these. The Misc – Gears preset uses the circular square wave mode to create perfect gear shapes.

Illustration 10: Ellipse Ruler Control Points

Copyright © 2013-2018 Guillaume Stordeur 26/51


4.9.2 Radial Lines

Illustration 11: Radial Lines Ruler Parameters

This ruler will help you draw lines that radiate out from a center point. This is often used in illustration
to give the impression of motion and dynamics.
It has one Curve parameter that will let you create curved radial lines. These are simple quadratic
curves.
The center point can be moved around by dragging the control point. Holding the control key will also
show the curve control point.

Illustration 12: Radial Lines Ruler Control Points

4.9.3 Parallel Lines

Illustration 13: Parallel Lines Ruler


Parameters

Copyright © 2013-2018 Guillaume Stordeur 27/51


This ruler will help you draw parallel lines. It has one angle parameter that lets you rotate the line.
You can also change the angle by using the control point while holding down the control key, or by
holding space (rotate around current pen position) or shift (rotate around last pen up position).
While holding control, you can also adjust the unit distance between the measure points by sliding the
yellow control point.

Illustration 14: Parallel Lines Ruler Control Points

4.9.4 Connected Lines

Illustration 15: Connected Lines Ruler


Parameters

This ruler is useful for constructing shapes from straight lines, where the start of each new line is
connected to either the start, the center, or end of the previous line. You can press shift to change the
connection point. While holding control, you can also change the measure point unit distance by sliding
the yellow control point.
Use the Stop at connection point option to prevent your line from overshooting past the connection
point.

Copyright © 2013-2018 Guillaume Stordeur 28/51


Illustration 16: Connected Lines Ruler Control Points

4.9.5 Isometric Perspective

Illustration 17: Isometric Ruler Parameters

Isometric projection is a method for visually representing three-dimensional objects in two dimensions
in technical and engineering drawings. It is often used in game art.
This ruler will help you draw isometric art. It has 3 rulers for which you can change the angles.
The Line Select Mode parameter determines which line your pen will snap to when you start to draw.
When set to Manual, you will need to press the shift key to change the focus before you start drawing.
When set to Auto Detect, it will snap to the line that best matches your initial drawing direction. For
these two modes, you can press the control key while drawing to change direction without lifting your
pen. With the Auto Detect + Dir Change mode, it will snap automatically to the closest direction while
you draw, without having to press any keys. This mode is great for fast 3d sketching.

Copyright © 2013-2018 Guillaume Stordeur 29/51


Holding the control key will also display the angle control points, the measure point unit distance
control point, and the freeze mode toggle control point.

Illustration 18: Isometric Ruler Control Points

Clicking on the Freeze Mode control point (or pressing the associated keyboard shortcut) will create a
fixed frame of reference at your pen position. You can use this and the measure points to accurately
subdivide sections.
When Box Mode is enabled, your pen position will be clamped to a 3d bounding box while you draw,
helping you quickly close boxes without overshooting. The dimensions of the box are determined
automatically one at a time as you first draw on each axis. The dimensions are reset when you lift the
pen.

Copyright © 2013-2018 Guillaume Stordeur 30/51


Illustration 19: Subdividing a box in Freeze Mode

4.9.6 Linear Perspective

Illustration 20: Linear Perspective Ruler


Parameters

Isometric perspective is great for top-down 2d game art, but if you want to create more realistic looking

Copyright © 2013-2018 Guillaume Stordeur 31/51


scenes, linear perspective is a better choice.
This mode gives you three rulers to work with: two lines parallel to the ground plane, and one vertical
line.
It has the following parameters:
• Image Zoom – If you are using a version of Photoshop older than CS3, or any other art
application, you must set this parameter to match the value of your canvas zoom when you
zoom in or out, or the perspective lines will no longer align with your scene. It's also
recommended to draw a mark under the view center point in a separate layer, so you can realign
your image. For apps where automatic tracking is not possible, you can at least enable the
Settings/Spacebar Pan Offsets Ruler Centers menu to keep your center aligned while you
pan your canvas. (in Photoshop, be sure to uncheck Enable Flick Panning in the general
preferences tab).
• View Radius – This parameter defines the radius (in screen-space pixels) of the circle which is
the intersection of the cone of vision with the image plane. The center of this circle is the
intersection of the direction of view (or line of sight) with the image plane. The center can be
moved by dragging the center control point. You should set this parameter so that the view
circle covers most of your canvas at 100% zoom.
• Field of View – This represents the field of view that is visible within the view circle. A small
value for this parameter will produce a telescopic view, where the perspective effect is
minimized (vanishing lines will seem parallel). A larger value will project more of the world to
your view, and exaggerate the perspective effect. Note that objects drawn further out from a 60
degree viewing circle can start to appear unnatural and distorted, but this can be used for artistic
effect.
• View Tilt – This parameter controls the vertical tilt of the line of sight. It corresponds to the
angle of rotation around the x axis, and controls the green ruler.
• When set to 0, the view direction is parallel with the ground, and all the lines going
straight up and down in the scene are drawn completely vertical and parallel on the
canvas.
• Positive values make the line of sight point towards a point below the horizon. This is
sometimes referred as "bird's eye view". In this case, the lines going up and down will
not be parallel on the canvas, and will meet at a vanishing point below the horizon line
(which will now be above the center of the view).
• Negative values make the line of sight point towards a point above the horizon. This is
sometimes referred as "worm's eye view". In this case, the lines going up and down will
not be parallel on the canvas, and will meet at a vanishing point above the horizon line
(which will now be below the center of the view).
• Line 1 Angle – This is the angle of the red ruler line, measured from the view direction.
• Line 2 Angle – This is the angle of the blue ruler line, measured from the view direction.
• Line Select Mode – This controls line snapping the same way as for the Isometric Ruler.
• Box Mode – When this is enabled, your pen position will be clamped to a 3d bounding box

Copyright © 2013-2018 Guillaume Stordeur 32/51


while you draw, helping you quickly close boxes without overshooting. The dimensions of the
box are determined automatically one at a time as you first draw on each axis. The dimensions
are reset when you lift the pen.
Note that you should setup the three view parameters (radius, field of view, tilt) at the start of your
drawing, then not change them again while working on your scene.
You will want to change Line 1 and Line 2 angles to draw objects that are rotated differently. These
lines are always parallel to the ground plane, so they cannot be used to draw inclines such as ramps or
roofs. For this, you should instead construct the axis-aligned bounding box using the perspective rulers,
and then use the Parallel Lines or Connected Lines rulers to draw the inclined lines. If the link button
is enabled, the angle between Line 1 and 2 will be maintained when you change either of them.
Holding the control key will display the angle control points, the measure point unit distance control
point, and the freeze mode toggle control point.
While holding control, you can slide the center control point along either the X or Y axis. While doing
this, the freeze point stays at the same screen position. This will help you reset the center position if
you forgot to mark it on your canvas: set the freeze point to a corner of a drawn object, then slide the
center point until the vanishing lines line up with the object edges.

Illustration 21: Perspective Ruler Control Points

Clicking on the Freeze Mode control point (or pressing the associated keyboard shortcut) will create a
fixed frame of reference at your pen position. Like with the Isometric ruler, you can use this and the
measure points to accurately subdivide sections. While in Freeze Mode, you can toggle and cycle
through the grids by clicking on the orange control point that appears next to the freeze point while
holding the control key.

Copyright © 2013-2018 Guillaume Stordeur 33/51


4.9.7 Fisheye Perspective

Illustration 22: Fisheye Perspective Ruler


Parameters

Whereas linear perspective projects straight 3d lines to straight 2d lines, fisheye perspective projects
them to curved 2d lines. This perspective mode has a fixed view angle of 180 degrees. Half of the
world is effectively projected onto the view circle.
This ruler does not let you change the line angles. You can choose between a horizontal line, a vertical
line, and a line going to the view center.
Holding the control key will display the measure point unit distance control point and the freeze mode
toggle control point.

Illustration 23: Fisheye Ruler Control Points

Copyright © 2013-2018 Guillaume Stordeur 34/51


Clicking on the Freeze Mode control point (or pressing the associated keyboard shortcut) will create a
fixed frame of reference at your pen position. Like with the Isometric and Linear Perspective rulers,
you can use this and the measure points to accurately subdivide sections.

4.9.8 Vanishing Lines


This ruler will help you quickly add perspective-correct elements to an existing scene without having to
know any of the view parameters or line angles (as long as the scene is using linear perspective)!
You have up to 6 vanishing points (VPs) to work with. Each point it computed automatically by
adjusting two control lines. Simply line up the control lines with edges that are parallel in the 3d scene
(for example, the opposing edges of a wall). You can then use the measure points to quickly figure out
3d distances (each VP has its own independent measure point unit distance control).
Press control+shift to toggle VP setup mode, or click on the blue control point while holding control.
Press shift to cycle through the VPs.

4.10 Scripting

Illustration 24: Scripting UI

This feature allows you to use or write programs that completely change the line data that is passed to
your art program.
With this, you can for example have perfect patterns drawn automatically while you draw straight lines,
have subtle to crazy amounts of randomness added to your position or pressure, have the angle of your
brush auto-rotate, etc.. The possibilities are endless!
The “mode” drop-down list allows you to select a pre-defined script program. Select <custom> to
define a custom program that you write and compile yourself.
When selecting a pre-defined program, its code will be displayed in the lower text box so you can
examine it or copy it to a custom program.
The pre-defined programs are read-only. You can however edit them or add new ones by visiting the
distortion subfolder in the Lazy Nezumi Pro installation folder.
To get the best results with some of these programs (especially the ones that draw automatically), you

Copyright © 2013-2018 Guillaume Stordeur 35/51


may have to use a thin brush with low density (flow). Also, make sure your disable your art program's
own brush smoothing features, so that straight lines don't get bent (you will notice this if your program
is drawing squares for example).
All input variables used in a program will appear as parameter controls in the UI, so that you can
change their values easily. You can have up to 7 controls. You can change the range and number of
decimals for the variable by clicking on the “...” button to the right of the value box.
The graph view will show you a preview of the script program's position output, as simulated by
drawing a straight horizontal line as input (or a circle if you have the Ellipse ruler enabled). The “...”
button on the bottom of the graph allows you to set the start and end values of the pre-defined input
variables, so that you can see what effect they will have (for example, having pressure start at 0 and end
at 1).

Illustration 25: Custom script and associated graph preview

4.10.1 Program Language Definition


A script program is defined by a series of statements separated by semi-colons. The statements are read
and evaluated by the compiler top to bottom. These statements can be composed of variable
assignments, function calls, and mathematical expressions. All variables are stored as 32bit floating-
point values.
A variable is considered an input variable if it used in an expression to produce a result, and an output
variable if it is assigned another value. A variable can be both an input and an output variable.
There is a pre-defined set of input variables that you can read from, and a set of output variables that
you can write to. These variables are described in the following tables:

Copyright © 2013-2018 Guillaume Stordeur 36/51


Copyright © 2013-2018 Guillaume Stordeur 37/51
Name Description Units / Range
x Current pen x coordinate Screen pixels
y Current pen y coordinate Screen pixels
rx If ruler active, x coordinate Screen pixels
input to ruler stage
ry If ruler active, y coordinate Screen pixels
input to ruler stage
sx Start of stroke x coordinate Screen pixels
sy Start of stroke y coordinate Screen pixels
ex Last stroke end x Screen pixels
coordinate
ey Last stroke end y Screen pixels
coordinate
psx Last stroke start x Screen pixels
coordinate
psy Last stroke start y Screen pixels
coordinate
p Pen pressure Normalized [0..1]
d Distance from start of Screen pixels
current stroke
dn For rulers with a center or Radial/Perspective/Connected:
connection point: 1.0 at start, 0.0 at
normalized distance center/VP/connection point
Ellipse:
0.0 at start, plus or minus 1.0
for each time around.
ds Rulers: Screen pixels
Radial,
Perspective,
Connected
Distance from start to
center/VP/connection point
s Pen speed Screen pixels between updates
ew Current ellipse ruler width Screen pixels
(width >= height)
eh Current ellipse ruler height Screen pixels

Copyright © 2013-2018 Guillaume Stordeur 38/51


er Ellipse ruler rotation Degrees
eca Ellipse ruler current angle Degrees
of pen position
nx Line normal x coordinate Normalized [0..1]
ny Line normal y coordinate Normalized [0..1]
dx Change in x since last pen Screen pixels
position
dy Change in y since last pen Screen pixels
position
cx Custom center position x Screen pixels
(set with shortcut)
cy Custom center position y Screen pixels
(set with shortcut)
rcx Ruler center position x Screen pixels
rcy Ruler center position y Screen pixels
r Pen rotation Normalized [0..1]
te Pen tilt elevation [0..1024]
ta Pen tilt angle Normalized [0..1]
res0 Result 0 of special Function dependant
functions
res1 Result 1 of special Function dependant
functions

Table 1: Pre-defined Input Variables

Name Description Units / Range


ox Pen x coordinate Screen pixels
oy Pen y coordinate Screen pixels
op Pen pressure Normalized [0..1]
or Pen rotation Normalized [0..1]
ote Pen tilt elevation [0..1024]
ota Pen tilt angle Normalized [0..1]

Table 2: Pre-defined Output Variables

Copyright © 2013-2018 Guillaume Stordeur 39/51


When you start to draw with a script program enabled, all output variables (pre-defined, as well are
your own) are initialized to 0.
As you draw, the pre-defined input variable values are updated, the program is evaluated, and the pre-
defined output variables are read from and used to modify the data that is passed to your art
application.
Note that you don't have to modify all the output variables if you don't want to. It is perfectly
acceptable to have a program only affect the output pressure (op), or just the position (ox and oy).
However, you will need to modify at least one of these variables in order for the program to compile
succesfully.
If a program uses the center position variables (cx and cy), you can set this position by hovering your
mouse over a screen position you want, and hit the “Set Scripting Center Pos” shortcut, that you can
setup in the “Settings->Edit Shortcuts” menu.
If you have overlays enabled, you will also be able to see the center position as a circle on your screen,
and interact with it with your mouse or pen.
The following tables describe the mathematical operators and built-in functions that you can use in
your programs:

Copyright © 2013-2018 Guillaume Stordeur 40/51


Operator Meaning Priority
-1 (can only be applied
= assignement
to variables)
condition ? x : if condition expression is true, x,
0
y otherwise y
&& boolean and 1
|| boolean or 2
<= less or equal 4
>= greater or equal 4
!= not equal 4
== equal 4
> greater than 4
< less than 4
+ addition 5
- subtraction 5
* multiplication 6
/ division 6
^ raise x to the power of y 7
Table 3: Program Operators

Copyright © 2013-2018 Guillaume Stordeur 41/51


Function Name Description
sine function (all trigonometric functions use
sin(x)
radians)
cos(x) cosine function
tan(x) tangent function
asin(x) inverse sine function
acos(x) inverse cosine function
atan(x) inverse tangent function
inverse tangent of y/x, use if correct angle quadrant
atan2(y, x)
is needed
sinh(x) hyperbolic sine function
cosh(x) hyperbolic cosine function
tanh(x) hyperbolic tangent function
asinh(x) inverse hyperbolic sine function
acosh(x) inverse hyperbolic cosine function
atanh(x) inverse hyperbolic tangent function
log2(x) logarithm to the base 2
log10(x) logarithm to the base 10
log(x) logarithm to the base 10
ln(x) logarithm to base e (2.71828...)
exp(x) e raised to the power of x
fsqrt(x) square root
frsqrt(x) reciprocal square root
sign(x) sign function -1 if x<0; 1 if x>0
rint(x) round to nearest integer
fabs(x) absolute value
min(...) min of all arguments
max(...) max of all arguments
sum(...) sum of all arguments
avg(...) mean value of all arguments
rand() random value between 0 and 1
srand() random value between -1 and 1
randGauss(mean, random value using gaussian distribution using
stddev) supplied mean and standard deviation

Copyright © 2013-2018 Guillaume Stordeur 42/51


fmod(x, d) floating point remainder of x/d
ceil(x) smallest integral value that is not less than x (round
up)
floor(x) largest integral value that is not greater than x
(round down)
frac(x) fractional part of x, equivalent to x - floor(x)
mix(a, b, w) linear interpolation: a + (b - a) * w
smoothStep(e0, e1, x) 0 when x <= e0, 1 when x >= e1, 3rd order
interpolation in between
smootherStep(e0, e1, 0 when x <= e0, 1 when x >= e1, 5th order
x) interpolation in between
clamp(min, max, x) clamps x between min and max
rotDeg(x, y, angle) rotates the (x,y) vector angle degrees
stores the rotated vector in (res0,res1), and returns
the rotated x component
rotRad(x, y, angle) same as rotDeg, but angle is in radians
normalize(x, y) normalizes vector (x, y), stores it in (res0, res1),
and returns the length of (x, y)
length(x, y) length of vector (x, y)
rlength(x, y) 1 / length(x, y)
lengthSq(x, y) square length of vector (x, y)
debugOut(string, printf style function that prints to the log file.
value) Example: debugOut(“value: %f”, value);
Table 4: Pre-defined Functions

4.10.2 L-Systems
If you look under the L-System category for the scripting mode, you will find programs that draw by
themselves. These are using special functions that are described here.
A tutorial on writing L-Systems is available here: http://lazynezumi.com/lsystems.
The following tables give a reference of all available L-System functions and the symbol instructions
that you can use when defining L-System rules.

Copyright © 2013-2018 Guillaume Stordeur 43/51


Function Description
lsysAxiom(string) Set the Axiom (starting state) of the system.
Set the Rules of the system, in the following format:
lsysRules(string)
[symbol]=[symbols],[symbol]=[symbols],...
Set the number of times the system should be
lsysIterations(number)
iterated before producing the final instruction string.
Set the symbols (one after the other, without spaces
or commas) that will cause the pen to move when
lsysDrawSymbols(string) encountered in the final instruction string. Other
symbols will only be used to control the evolution of
the system as it is iterated.
Set the pen's starting Direction vector. Default is (1,
lsysDir(x, y)
0).
Set the starting Angle (in degrees) that will be used
lsysAngle(angle) when processing a rotate (+ or -) instruction. Default
is 90.
Set the maximum angle (in degrees) that can be
lsysAngleRandom(angle) randomly added to the current Angle when
processing a rotate instruction. Default is 0.
lsysAngleScale(factor) Set the Angle Scale Factor. Default is 1.2.
lsysAngleInc(inc) Set the Angle Increase Factor. Default is 5.
Set the starting line Thickness, between 0.0 and 1.0.
lsysThickness(thick)
Default is 1.0.
Set the percentage of current Thickness that can be
lsysThicknessRandom(factor) randomly added when moving the pen position.
Default is 0.
lsysThicknessScale(factor) Set the Thickness Scale Factor. Default is 2.0.
lsysThicknessInc(inc) Set the Thickness Increase Factor. Default is 0.1.
lsysLength(len) Set the starting line Length. Default is 1.0.
Set the percentage of current Length that can be
lsysLengthRandom(factor) randomly added when moving the pen position.
Default is 0.
lsysLengthScale(factor) Set the Length Scale Factor. Default is 1.3.
lsysLengthInc(inc) Set the Length Increase Factor. Default is 0.1.
If loop is 1, then lsysAdvance will wrap around to
the start of the system's instruction string upon
lsysLoop(loop)
reaching the end. Otherwise, the pen position will no
longer be updated. Default is 0.

Copyright © 2013-2018 Guillaume Stordeur 44/51


Step through the system's instruction string until
finding a Draw Symbol, at which point the pen's
position is moved by the current Length in the
lsysAdvance()
current Direction. The new position is stored in the
ox, oy variables, and the current thickness is stored
in the op variable.
Table 5: Scripting L-System Functions

Copyright © 2013-2018 Guillaume Stordeur 45/51


Symbol Instruction
Any Draw
Move the pen position by Length amount in the current Direction.
Symbol
0-9 Sets the current Skip Number (used with the ? symbol).
Random Skip: Draw a random number between 0 and 10. If it is
? higher than the current Skip Number, then skip the next
instruction.
Skip the next instruction. You can use this to write statements like
:
5?A:B, where either A or B will be executed.
Open and close an Instruction Group. This lets you skip an entire
()
group of instructions by writing something like 5?(AB):(CD).
Rotate the current Direction left by the set Angle amount, plus a
+ random amount of which the maximum is set by
lsysAngleRandom.
Rotate the current Direction right by the set Angle amount, plus a
- random amount of which the maximum is set by
lsysAngleRandom.
| Reverse direction (rotate 180 degrees).
. Exchange meaning of + and -.
! Divide Thickness by Thickness Scale Factor.
@ Multiply Thickness by Thickness Scale Factor.
# Decrease Thickness by Thickness Increase Factor.
$ Increase Thickness by Thickness Increase Factor.
% Divide Length by Length Scale Factor.
^ Multiply Length by Length Scale Factor.
& Decrease Length by Length Increase Factor times Start Length.
* Increase Length by Length Increase Factor times Start Length.
{ Divide Angle by Angle Scale Factor.
} Multiply Angle by Angle Scale Factor.
< Decrease Angle by Angle Increase Factor.
> Increase Angle by Angle Increase Factor.
[ Save the state and start a new Branch.
] End the current Branch and restore the state.
Table 6: L-System Symbol Instructions

Copyright © 2013-2018 Guillaume Stordeur 46/51


5 Known Issues

5.1 Application Compatibility Issues

5.1.1 Applications Run As Administrator


If you are trying to hook a window of an application started with "Run As Administrator", you may
encounter an error, unless you also run Lazy Nezumi Pro as administrator.

5.1.2 Gimp 2.8


Mouse processing is not supported. Only pen tablet processing is currently working.

5.1.3 PaintTool SAI


If you encounter problems after hooking PaintToolSAI 1.2, you should try to change the
AvoidOldWacomBug or TabletMouseSimulation settings in SAI's misc.ini configuration file.
For SAI 2, you must set AlwaysUseTabletPcApi = n in its sai2.ini file, as RealTimeStylus is not
supported.
Also note that SAI's own stabilizer will interfere with Lazy Nezumi Pro's, so be sure to set it to 0.

5.1.4 Windows 8/10 Metro/Store Apps


Metro/WinRT/UWP apps sold on the Windows Store are currently not supported. As they use a special
sandbox mode, they are not able to load external plugins.

5.1.5 Twisted Brush


Pen Catch-Up is not supported.
Twisted Brush creates a new window when the user resizes or zooms, and unfortunately all window
classes have the same name, so Lazy Nezumi Pro can't detect this. The user thus has to hook the
window again every time.
When drawing with the mouse, the line will sometimes connect to the position where the user releases
the button.

5.1.6 Windows Journal


Lazy Nezumi Pro does not currently work with Windows Journal.

5.1.7 Inkscape
Mouse processing is not supported. Only pen tablet processing is currently working.

Copyright © 2013-2018 Guillaume Stordeur 47/51


5.1.8 Flash
Pen Catch-Up is not supported.

5.1.9 Applications started by Steam


If your art program is launched by Steam or another program, you may find that you can't hook its
window with Lazy Nezumi Pro. If this happens, try first launching the application directly via the
Windows explorer, before hooking it.

5.1.10 OneNote
OneNote is currently not supported.

5.1.11 Illustrator CC 2018


Pen processing is not supported since they switched to UWP.

5.1.12 Corel Painter 2018


In Painter, go to menu Edit/Preferences/Tablet, then select "Wacom-compatible device (Wintab)".

5.2 Photoshop Plugin Issues

5.2.1 Plugin Installation


For non-english versions of Photoshop, the plugins folder sometimes has a different name.
Unfortunately Adobe does not publish a list of translated names, making it tricky for installers to find
the right folder.
If Lazy Nezumi Pro does not start when you start Photoshop, you should verify that the plugin is
installed correctly. To do this, navigate to the plugins folder of whichever version of Photoshop (32bit
or 64bit) you are using, and make sure that MouseHookPro.8li or MouseHookPro64.8li is there. If the
plugin isn't there, you can copy it manually from Lazy Nezumi Pro's installation folder, making sure to
rename the extension from DLL to 8LI.
To verify that the plugin is being loaded by Photoshop, go to the 'Help->System Info' menu. You
should see Lazy Nezumi Pro in the list.
If the plugin is installed correctly, you should also see a "Photoshop Plugin loaded!" message in the
status bar and notification icon of Lazy Nezumi Pro.

5.2.2 Active Tool Detection


Some older versions of Photoshop do not send certain tool changes to the plugins at all, so Lazy
Nezumi Pro will not always be able to tell which tool you are using, in case you are using the tool
bypass feature.
Also, Photoshop does not send the active tool to its plugins at startup. Lazy Nezumi Pro will thus

Copyright © 2013-2018 Guillaume Stordeur 48/51


remember which tool you were using the last time you used it, and start with that.

5.2.3 Missing Lines or Full Pressure Lines


On some setups, you will sometimes not get any line when you try drawing one, or it may instead be
drawn will full pressure. This happens more often with quick, short strokes.
This happens most notably on the Surface Pro 3 with Photoshop CC.
If you are experiencing this, make sure that the Settings->Tablet Options->Tablet Mouse Mode menu
is NOT checked. Also, in the Windows control panel, "Pen and Touch" settings, disable the "Press and
hold - right click" option.

5.2.4 Straight Line Bug


Sometimes Photoshop will glitch out and draw straight lines when you start drawing with your pen on
a canvas when the canvas isn't the active window. To prevent this from happening, make sure to click
once in the Photoshop window to activate it before you start drawing.
If this does happen, simply alt-tab to another window, then alt-tab back. People sometimes experience
this issue when using Lazy Nezumi Pro because they change a setting in its window and then go to
draw directly in Photoshop without first activating it. Unfortunately this is a Photoshop issue and I
can't do anything to fix it.
One thing I did to try to help: if you have the Auto Alt-Tab setting enabled, Lazy Nezumi Pro will try
to auto-activate the first hooked window it finds under your mouse when you leave its window. So if it
is directly over Photoshop's window, then you will be able to start drawing immediately without
manually activating.

5.2.5 Start or End Line Offset


Depending on your setup with multiple monitors and tablets, you may encounter a problem where the
lines you draw are not where they should be, or they start from or end at an offset from your actual
position.
The first thing you should try is the Pen Offset Fix setting (in the Settings->Tablet Options menu).
You can also try disabling Photoshop's window scaling, by right clicking its exe, selecting properties,
and checking the “Disable display scaling on high DPI settings” option.
You may also try clearing your tablet settings with the Wacom Tablet Preference File Utility program.
This has helped users who had changed monitor setups or tablet drivers and were experiencing
problems.
You can also try some of things explained in this thread: http://forums.adobe.com/thread/621717
Some users have fixed this issue by updating Photoshop, or changing their monitor layout.
Some users have also reported better results after downgrading their drivers to version 6.2.0 or 6.3.6-3.
If you choose to reinstall your driver, it is very important to follow this procedure in the correct order:
1. Close all art software.

Copyright © 2013-2018 Guillaume Stordeur 49/51


2. Unplug your tablet.
3. Uninstall the tablet driver via the control panel.
4. Reboot.
5. Install the driver.
6. Plug the tablet back in. Make sure Windows does not install a default Microsoft driver, or looks
for updated drivers via Windows Update.

5.2.6 Pen Support in CC for Win8/10


If you are using Photoshop CC in Win8/10, please note that a new API is used to get pen events.
Starting with version 14.09.26, this API is supported by Lazy Nezumi Pro. Make sure you enable
“Windows Ink” in your tablet's control panel.
If you want, you can have Photoshop switch back to the old Wintab API by downloading this file:
https://lazynezumi.com/downloads/PSUserConfig.txt
And then placing it in your Photoshop settings folder. This is usually something like C:\Users\[User
Name]\AppData\Roaming\Adobe\Adobe Photoshop CC 2015\Adobe Photoshop CC 2015 Settings\.

5.2.7 Perspective ruler center offset after zooming


If you are using a version of Photoshop older than CC2018, you must disable the window rulers
(ctrl+r), as there's no way to determine if they are enabled in older versions, and they cause an offset in
the canvas to screen coordinate conversion required for proper tracking.

Copyright © 2013-2018 Guillaume Stordeur 50/51


6 Other Information

6.1 Qt
This software uses Qt 4.8.7, licensed under the LGPL.
You may download the source code here:
http://qt-project.org/

6.2 QCustomPlot
This software uses the wonderful Qt graph library QCustomPlot 1.1, licensed under the LGPL by
direct agreement with its author, Emanuel Eichhammer.
You may download the source code here:
http://www.qcustomplot.com/

6.3 MuParser
This software uses the MuParser 2.2.3 library, licensed under the MIT license.
You may download the source code here:
http://muparser.beltoforion.de/

Copyright © 2013-2018 Guillaume Stordeur 51/51

S-ar putea să vă placă și