Home Technical Talk

Lazymouse for Photoshop?

13
polycounter lvl 11
Offline / Send Message
Pope Adam polycounter lvl 11
After a few minutes of forum trolling and google searching, I'm unable to find out if there are any apps out there for photoshop that would make the cursor function something like that of Zbrush's Lazymouse function.

I don't think that there is anything out there yet - but I'd love to be shown otherwise! :)

cheers

adam

Replies

  • mLichy
    YES, I've been wanting this very much as well. I've looked on google and on forums, but alas... haven't found anything.... If someone could make a script that lets you lag the brush like that and control the distance, I would implode.
  • ceebee
    Offline / Send Message
    ceebee polycounter lvl 10
    You could probably do what you're looking for much quicker by learning the Pen tool. And you wouldn't have to undo as much.
  • mLichy
    True, I know the pen tool, but don't care to use it all the time.
  • Pope Adam
    Offline / Send Message
    Pope Adam polycounter lvl 11
    True, pen tool works, but is very cumbersome when compared to zbr's lazymouse.
  • Muzzoid
    Offline / Send Message
    Muzzoid polycounter lvl 10
    Here is a little hack i worked out, it isnt perfect but it might help.

    What i did was make a really large brush, say 1000x1000 and make a large black dot at one end, and a very small black dot at the other, you then stick the rotation on direction, so that the large dot follows the brush with a bit of distance. What this does is when you make it back down to normal sizes the small dot doesnt make a mark, but it makes the pivot point in the center of the brush, in a way making a hacky lazy brush.

    The problem with this though is that it doesnt smooth out the stroke that well so you get random dots around the line when you go slowly... I dunno perhaps it might help, doubt it though.
  • bugo
    Offline / Send Message
    bugo polycounter lvl 12
    I believe Funky Bunnies were making something like this...
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    I have one my brother made for me, it's not perfect, the biggest prob is that it jumps to the cursor at the end of a stroke.
    Apparently it's quite easy to code for Paint and other apps, but Photoshop does some hardcore takeover on mouse input, making intercepting, changing and controlling it pretty tricky.

    Will check if he doesn't mind me distributing it a bit, so you guys can give it a try.

    Muzz, lol that's kind of a good idea, will have to try it.
  • rajkard
    Hey all,

    Actually i began working on a lazy mouse for photoshop a couple of weeks ago. Funky Bunnies requested that id make one.

    I haven't finished it yet, i haven't had the time, been working too much. But now ive got a vacation so im going to finish it. Unfortunately for you all though, i will be abroad for a week, but i promise that when i return i will finish the app.

    Until then ill post it here so that you can try it out. Bare in mind though, that im not an artist, im a programmer and i haven't actually used the tool that ive been tasked to recreate. But based on what ive been able to tell from videos detailing its functionality made by funky bunnies i think im on the right track at least.


    Details:
    - Stepsize has been removed because in order to recreate the zbrush stepsize i would have to send mouse up and mouse down events, which ofc could be done. However this would seriously mess up the history list and work flow of most artists i would imagine. If you disagree then i can of course add this feature.

    - Padding and Radius at the moment both work as a combined radius. As i mentioned before i don't know exactly how the lazy mouse works. From what i can tell the zbrush lazy mouse has a little give, whilst mine at the moment is strict. Im assuming that padding determines how generous this "give" is, and i will look into it when i get back from my vacation If you have any suggestions or ideas on how it should work then please post them here.

    - Render outlines is a checkbox to toggle whether or not to draw red lines and circles on the screen just like in zbrush. And in here lies the problem.

    Unlike what Bal wrote overriding mouse and keyboard events is fairly simple, and my app is a global hook so you can use it with any app you see fit. It will work well with mspaint for instance, but when it comes to photoshop it will not work as intended. And you will probably see what i am talking about if you toggle the render outlines options on and off. My app gets focus in order to render to screen. I haven't had time to resolve this yet, but it shouldn't be too difficult to fix.


    Anyways, a week from now ill be back and i will start working on it again. Until then, please try it out and if you encounter any bugs/have any suggestions/or just have some feedback then post it here or mail me at [email protected]

    Link to LazyMouse app: http://rajkard.se/LazyMouse/LazyMouse.rar


    When funky bunnies first asked me to make a lazy mouse he assumed that i was familiar with the zbrush version. I began working on a version based on what he had told me. It wasn't until he made some videos that i finally understood how it worked. But at that time i had already made an app.

    It used catmull-rom splines to smooth out the mouse moves. It continuously moved the mouse position to the modified mouse position at a specified stepsize. It worked pretty well imho.

    Video to catmull-rom splines based lazy mouse: http://rajkard.se/LazyMouse/LazyMouse.avi

    If any of you see any use for that app then ive got the source saved and can compile a version for you to try out.



    Any ways, ill be back in a week. Have a good one.
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Yeah so here it is : http://born-robotic.net/stuff/lazyNezumi.zip

    You need to attach it to the software you want to use ( File > Attach to window ), it saves it in the .ini so you only need to do it once per software.

    Radius is the lazy offset.
    Noise adds noise (we were seeing if we couldn't add Alchemy style effects directly in photoshop).

    There's a shortcut to toggle the Enabled checkbox, it's ctrl-F2, and no you can't change it at the moment... :)

    As I said the only major prob is that the brush jumps to the cursor position at the end of the stroke.
    Unfortunatly he's bashed his head against photoshop's mouse hijacking for quite a while and hasn't figured out why it does that (doesn't happen in MS Paint, if someone can try Painter that would be nice to see if it works correctly).
    Maybe if enough people are interested I can pester him to look into it again. :D
    This is a windows mouse hack, maybe if it was done as a Photoshop plugin instead it would be easier to accomplish, who knows.

    Any feedback can be sent to me, I'll forward it to my brother if necessary.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 16
    thanks for posting rajkard, sounds interesting :)
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Damn rajkard beat me to it, hah.
    Gonna test out your version, from what you described you seem to be doing it in a similar way as my brother.

    EDIT : yeah so I tested it out a bit, yours doesn't really work like the Zbrush lazy mouse, but it seems interesting... The one I posted tries to replicate Zbrush's lazy mouse as much as possible.
  • mLichy
    Hmm... I can't get either to work... :(.. I'm running Vista 64 bit with CS4. The programs open and run, but they don't lag the brush at all.
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Yeah, Vista isn't supported, sorry.
    (Don't know for rajkard's though.)
  • rajkard
    ive developed mine on vista 64 sp1 which it works on, dont know about sp2 though. its a global system hook, so should work with every app you run mLichy. However it will lagg as mentioned in photoshop unless you have a way better computer than me i presume.
    Bal wrote: »
    EDIT : yeah so I tested it out a bit, yours doesn't really work like the Zbrush lazy mouse, but it seems interesting... The one I posted tries to replicate Zbrush's lazy mouse as much as possible.

    Yeah, i dont know how the zbrush lazy mouse works exactly, but replicating the functionallity is the easy part once the hook and drawing works as intended.


    How To Use: Enter a value into Padding and Radius (for instance the default 50 and 10). This is a pixel value (unlike zbrush).
    Check the Render outlines options and then draw in mspaint or photoshop (the latter will lagg a bit) Easy Peasy
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    Hi, I'm Bal's brother and I coded a lazymouse like app for him called LazyNezumi.
    I'm sorry but I don't have Vista and don't plan on switching to it (ever). This app is using some undocumented Windows tricks so I'm not surprised if it doesn't work at all in Vista.
    When a window is hooked you will see a rectangle appear over its border. If you don't see this, then it isn't hooked. The ini file that comes with it should set it up so that it tries to automatically hook paint and photoshop, but if you want to hook new apps, use the menu like Bal said.
    Let me know if you have any questions/comments about it.
    --
    kamih
  • mLichy
    Well if you don't want to switch to Vista, then switch to 7. Either way, using XP is crap compared to Vista/7 imo.
  • Michael Knubben
    mLichy: You act as if there's a really big difference between Vista and Xp.
    Ignoring driver-issues, I don't really so much of a difference at all!

    edit: didn't want this to be a strictly negative post, so: yay, lazymouse!
    I'll try this at work tomorrow. I've been silently wishing for a Lazymouse solution for Photoshop for a while now. Sai and Inkscape have it, and it's just fantastic to work with.
  • seforin
    Offline / Send Message
    seforin polycounter lvl 12
    is xp 64 bit supported in this release?

    Also if your using a older version of photoshop (cs2) will this run?
  • animax
    Offline / Send Message
    animax polycounter lvl 13
    I am using XP 64bit Sp2 with Photoshop CS3 and both the Lazy Mouse Worked...yay..:)

    I liked LazyNezumi though..while using the other one i am not able to use any shortcuts but in case of LazyNezumi everything works,except it spills some extra ink at the end of the stroke...Well integrated...
  • Frump
    Offline / Send Message
    Frump polycounter lvl 11
    I found a really Ghetto way to do this (non-intentionally). Load up a bunch of bloated software and intentionally lag your computer. The stroke will trail behind your mouse perfectly and create a smooth line. It actually works, sadly. It wasn't a choppy line and to change the radius I guess intensify the lag. The trick is controlling the lag.
  • mLichy
    lmao.... yeah, that actually will work. But then everything else is lagged and its annoying as hell.
  • EarthQuake
    animax wrote: »
    I am using XP 64bit Sp2 with Photoshop CS3 and both the Lazy Mouse Worked...yay..:)

    Same setup here, LazyNezumi seems to work as advertised. Thanks!
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    What an awesome tool. Programmers truly are a magical gift from the land of fairies. :)

    So I'm using Bal's (or Bal's brother's) Lazymouse; is there supposed to be any kind of visual cue as to where the point is being referenced? For example in ZBrush you've got the circles and the line that Lazybrush will attempt to follow. I only see the mouse icon.

    (hope this makes sense.)

    Thanks again for creating such cool hacks!
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    TheQiwiMan, good question, it depends on the software.

    In MS Paint (you know, the one real artists use!), you will always have the cursor in the real position of your mouse, so your stroke will never be under the cursor as you draw.

    In photoshop, that's also the case if you're using the "Standard" painting cursor (which not many people use, as it sucks). With the other cursor types, the cursor (or the brush shape/circle/whatever) will stay above the stroke, so you can't actually see where you're actual mouse position is.

    I don't really mind it, do you guys think it would be best to have something drawn where the mouse is, like in Zbrush?
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    I for one would absolutely love some kind of a line between where the cursor is and where it's being referenced, takes all the guesswork out of it. Right now I'm finding it pretty difficult to outline my sketches, which is what I was hoping to use it for.

    Man, the potential this tool has... awesome. :D
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    maybe even two circles connected by a line, like in mudbox?

    how do I delete a post? grrr...
  • Mizzard
    Great job Bal (and your brother)! Is there any way to get a Wacom tablet (a HID-compliant device) to work with your app? My mouse can now make smoother lines than my tablet!
  • Temaruk
    LazyNezumi is fantastic! I have cheap Trust tablet that just transformed into an almost usable instrument with your app! Thank You for you work!

    I used it with radius between 2 and 10, and with smoothing between 10 and 20, the effect is subtle, but great! My tablet would produce rather uneven lines without this (or maybe my hand is shaking a bit...)!
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Mizzard, it works fine with tablets normally... You're the second person who tells me he can't get it working with a wacom though, I have no idea why that would be. Are you using a Cintiq by any chance?

    TheQiwiMan, I think my brother is looking into something like that...
  • Spinks
    Offline / Send Message
    Spinks polycounter lvl 15
    i'm on xp and it works just as i would expect in mspaint but when i try it in photoshop i get nothing :c

    is it because im on cs4? maybe i need to edit the appWindowHooks.ini but i can't see anything glaringly wrong in there
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Spinks, keep forgetting to try it at work with CS4... But I know people who've had it work. =\
    Did you do File > Attach to Window?
  • Pope Adam
    Offline / Send Message
    Pope Adam polycounter lvl 11
  • Mizzard
    Bal, I'm using an Intuos 3. I just assumed no other tablets worked. I'll try and disable the tablet background service and see if that has any effect.

    @Spinks: Try enabling LazyNezumi before launching CS4.
  • Mizzard
    Here's a workaround I found for my Wacom tablet:

    Stop the "TabletServiceWacom" service
    Start LazyNezumi
    Start Photoshop
    Start "TabletServiceWacom" service again

    The big downside is that Photoshop won't recognize the tablet because the background service was started after it launched, so it won't register pressure or tilt inputs. Otherwise it works for me.
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Mizzard, really strange, I haven't had any probs with it, using an Intuos 1 and an Intuos 4.
    I'll try and find an Intuos 3 to test it on at work.

    In other news an update is coming that draws a red line in front of the stroke like in Zbrush, to know where you're real mouse position is.
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    AAA!! I'm so freaking excited!! :D

    I'm a dork, I know, but I don't care! This is gonna be awesome!!
  • mLichy
    hmmm... I hope someone finds a fix for the tablet issues and whatnot.
  • vik
    Offline / Send Message
    vik polycounter lvl 9
    Any chance for a Vista version?
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    Hi guys,
    here's the new version:
    http://people.happycoders.org/kamih/lazyNezumi/lazyNezumi_20090725.zip
    Please read the README.txt in there.
    Hope you like it!
    cheers,
    kamih
  • Joseph Pomeisl
    One word: I love you. Awesome. Thanks for creating and sharing this! Only thing I can bring up is that on 50% gray bg the guidelines are completely invisible. Anyway, thanks again, mate:D
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    The problem is, I have to use a NXOR GDI pen to be able to draw and erase my lines over the app's stuff, and RED NXOR GRAY = GRAY... :)
    I've changed the color to (255, 128, 0), so it won't cancel out with a gray background, but that will cancel out with some other color, there's nothing I can do about it.

    In the next version I'll save all the parameters to the .ini file, and I'll add a color entry in there too, so you can set it up for a color that doesn't cancel out with your usual background color.
    cheers,
    kamih
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    I've set up a little page for LazyNezumi, where you can check back for updates and other info:
    http://people.happycoders.org/kamih/wordpress/?page_id=46
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    It works FANTASTIC for me..... in MS Paint.
    :(
    For some reason the latest version won't correctly connect with my photoshop window. The previous version (without the string) worked perfect in Photoshop, but now it doesn't look like its seeing my photoshop window. (theres no red border like in MS Paint)
    Do I need to uninstall anything from the previous version? I didn't think so since isn't it just an .exe you run every time you wanna use it?
    (I'm using Win XP SP3, photoshop CS2, and I even tried rebooting, still nothing)

    I can't wait to use this in Photoshop! It looks amazing in MS Paint! Thanks again for creating this and letting us use it for free. (I'm gonna provide this link tomorrow at work for all the Artists, I'm sure you'll gain some more new fans! :) )
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    Hmm... Qiwi, did you replace the .exe and the .dll?
    Did you try manually attaching it to the photoshop window?
    I will look at the code to see if I changed anything that could cause it to stop working..
    What I'm going to do also is put up a version that outputs debug info so people who can't get it running can send me the output so I can try to figure out what's wrong.
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    okay so I think I see where the problem might be. (I'm attaching a screenshot) Its choosing the wrong window to lock onto inside of Photoshop. I boot up PS first, then right when I boot up the Lazymouse exe it flashes the brushes tab-window thing. I've tried manually attaching it to the canvas window many times, and never get the red border.

    So since you only have to attach it once per program, I wonder if the fact that the last version was synched correctly is whats screwing this up now somehow?

    As far as 'replacing' anything, I just deleted the folder with the previous version and double-clicked the newest with the guide-data included. Do I need to manually find some dlls and delete them or something ya think?

    Thanks so much for the help with this!
    grrr.jpg
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    That's weird.
    Could you please try the following (if you haven't already):
    1.Close Photoshop and LazyNezumi.
    2.Open Photoshop, make a new canvas.
    3.Open LazyNezumi.
    It should attach to something in Photoshop, which window does it attach to in this case?
    If it's still attaching to the wrong window, use Microsoft's Spy tool to figure out the class names of the canvas, and that of the brush bar it's attaching to and let me know.
    If you don't have the Spy tool, you can download it here:
    http://people.happycoders.org/kamih/lazyNezumi/spyxx.zip
    Another thing you can try is deleting (keep a backup) the .ini file, so that it doesn't automatically attach to anything, and then manually attach with the menu.
    Let me know what the results are of these two tests.
    I have a debug version almost ready for you guys (with parameter saving too).
  • TheQiwiMan
    Offline / Send Message
    TheQiwiMan polycounter lvl 11
    K I tried the steps in the order you asked and it grabbed the same top toolbox thing as before.
    I even deleted the folder completely and re-downloaded the newest version, and right when I opened photoshop, before I even linked it manually it already grabbed the toolbox window, rather than the canvas, so its gotta be referencing some old bad info or something.

    I downloaded the Spy tool, but I'm sorry man I have no idea what I'm looking at or how to use this thing. I'm not even a noob at programming since that implies I've at least started learning something and I haven't. Its all pixy-magic to me. :(

    If you think it'd be at all helpful I could jump on messenger or skype or something?
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    If you click on the Binoculars icon in Spy++, it brings up a window that allows you to drag a target to the window you want to query info from.
    I just checked in Photoshop, and that toolbar and the main canvas have the same class name. That's a very good clue... I should be able to fix this.
  • kamih
    Offline / Send Message
    kamih polycounter lvl 11
    I've just put a new version up here:
    http://people.happycoders.org/kamih/wordpress/?page_id=46
    If you have trouble with it, run dbgView before LazyNezumi, and send me the log.
    DbgView can be found here:
    http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
    cheers,
    kamih
  • Bal
    Offline / Send Message
    Bal polycounter lvl 12
    Yeah the new version doesn't work on Photoshop CS4 either anymore... I'll try and get a debug log during lunch.
13
Sign In or Register to comment.