Coder Social home page Coder Social logo

Brush inputs/settings not calibrated for viewzoom and viewrotation (ascension, direction, dab-angle, speed, et al.) about libmypaint HOT 6 CLOSED

briend avatar briend commented on June 14, 2024
Brush inputs/settings not calibrated for viewzoom and viewrotation (ascension, direction, dab-angle, speed, et al.)

from libmypaint.

Comments (6)

achadwick avatar achadwick commented on June 14, 2024

The brush engine is currently unaware of the zoom level.

from libmypaint.

briend avatar briend commented on June 14, 2024

Not sure how I closed the issue. Anyway, that makes sense. So we'd have to pass zoom level just like pressure to brush lib?

from libmypaint.

briend avatar briend commented on June 14, 2024

I'm working on a branch that passes zoom and view-rotation data as input data to libmypaint. So now with the data the brush engine should be able to correct for them. I've had success correcting Direction and Ascension, and will try to correct speed next:
https://github.com/briend/libmypaint/tree/view-zoom
https://github.com/briend/mypaint/tree/view-zoom
Any help/suggestions are appreciated! I'm not a math-person so I basically trial-and-error 15 different formulas until the result is what I expect :-)

from libmypaint.

briend avatar briend commented on June 14, 2024

Ok I have speed corrected for zoom in the branched in the previous post (yay!). Funny the values stay between 0 and 4 so there is no need to change the brush settings. I clamp at 4.0 just in case-- if you really whip the stylus I saw values around 5.0. I also removed the division by base_radius since that is unnecessary now.

What I didn't realize is the gamma setting isn't supposed to let you have huge values-- it's supposed to CHANGE the values more quickly (with higher gamma) and more slowly with lower gamma. When I saw speeds of over 200 I assumed the gamma was responsible for inflating the numbers but really it was just quickly reporting the actual speed (yikes!).

Here's a demo video showing a brush w/ jitter controlled by speed-- works consistently at all zoom levels!
https://www.youtube.com/watch?v=JAQ5wUKbUOw&feature=youtu.be

from libmypaint.

briend avatar briend commented on June 14, 2024

community discussion here:
https://community.mypaint.org/t/zoom-and-view-rotation-corrections-rfc/465

from libmypaint.

briend avatar briend commented on June 14, 2024

Changed title to reflect the scope of this issue, which I think should be tackled as a whole. I've updated the view-zoom branches to adjust for zoom(speed) and viewrotation(ascension, direction, dab angle). Please give it a try!

from libmypaint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.