sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Fluid freehand

    Scheduled Pinned Locked Moved Developers' Forum
    15 Posts 7 Posters 1.7k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BoxB Offline
      Box
      last edited by

      I'm not really sure if this is a feature request or a plugin.
      With the increase in touch screen interface and stylus input I'm wondering if the freehand tool can be made better.
      With a mouse it has always been a fairly jagged tool but with a stylus it would be nice to be able to produce a fluid line.
      There seems to be a correlation between the speed of the stroke and the number of segments which is sort of counter intuitive. If you do a fast smooth arc it will give it four segments, but the same arc done slowly will be 37 segments, but they won't be smooth. They can be smoothed with fredo's curvizard but I'd rather a freehand tool that will follow your stylus smoothly. Or one that I can tell it how many segments per mm.
      Any ideas? or examples needed?

      1 Reply Last reply Reply Quote 0
      • Rich O BrienR Offline
        Rich O Brien Moderator
        last edited by

        Thomthom made a Stylus tool a few years ago. Never released it though but maybe PM him.

        Download the free D'oh Book for SketchUp πŸ“–

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          The stylus tool I'd been tinkering with was a means to quickly generate meshes - mainly focused on quads. The idea was that you'd trace an image and build your quads from that. (Or create new topology on top of existing geometry.)

          Stylus.gif

          I'm not sure how easy Box' request would be. At least with what control you have from the SU API. Because the smoothness of the points depend on how quickly you can receive the input. In my stylus I collect points as fast as I receive callbacks. And as you can see it's still somewhat jagged:

          StylusDraw.gif

          Granted, it'll be more jagged the more I do during mouse movement and drawing to the viewport. Maybe it could be improved. But I think that in general, with user input like this you need to interpolate in order to get smooth result.

          I actually had a similar conversation a couple of weeks ago, while talking to some VR developers in a co-working space nearby. They were playing around with VR presentation tool in Unity and had added a tool to do drawing in the VR world. But also there you had the problem of jittery input

          Same thing, if you move fast you got fewer more jagged points, if you move slow you get more points (not necessarily smoother, as your hand create jitters) It all boils down to how quickly you are able to sample input.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • BoxB Offline
            Box
            last edited by

            Hmm yep, I see the issues involved.
            What about if the freehand line could somehow be converted into one of fredos beziers.
            ie: draw a line as fast or slow as you like but when you stop it makes a smooth curve based on a certain number of control points? more points in the slow section and less in the fast section. or a predetermined number spread over the length of the curve, but smooth.

            1 Reply Last reply Reply Quote 0
            • JQLJ Offline
              JQL
              last edited by

              That would be cool and the bezier aproach would be nice to have.

              I also love the idea of the quad stylus. It looks like some retopology tool I've seen in some software I don't remember anymore. Tracing an image with that and having a quadmesh created seems very useful but I can think of a lot of useful scenarios...

              Maybe one day my architecture will have some motive to get out of the boxed state it's in...

              www.casca.pt
              Visit us on facebook!

              1 Reply Last reply Reply Quote 0
              • Rich O BrienR Offline
                Rich O Brien Moderator
                last edited by

                @box

                What about Fredo's Smooth Contour in Curvizard?

                Download the free D'oh Book for SketchUp πŸ“–

                1 Reply Last reply Reply Quote 0
                • BoxB Offline
                  Box
                  last edited by

                  Yeah Rich I mentioned that in my original post, it works, but I'm trying to get it built in rather than a workaround.

                  1 Reply Last reply Reply Quote 0
                  • BoxB Offline
                    Box
                    last edited by

                    And I agree with you JQL.

                    I can see this sort of touch interface being quite important pretty soon.
                    People already avoid mouse and keyboard if they can.
                    A well structured Stylus tool would will be invaluable in the near future, in my humble opinion.

                    1 Reply Last reply Reply Quote 0
                    • pbacotP Offline
                      pbacot
                      last edited by

                      Seems to me this might be effective if you could draw on a surface. So you establish a base framework by drawing on a sphere, plane or other shape to define how your grid begins.

                      MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                      1 Reply Last reply Reply Quote 0
                      • BoxB Offline
                        Box
                        last edited by

                        @pbacot said:

                        Seems to me this might be effective if you could draw on a surface. So you establish a base framework by drawing on a sphere, plane or other shape to define how your grid begins.

                        Sounds goood, come on Thomas, SUbD is fantastic, this could be brilliant.

                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          @box said:

                          Hmm yep, I see the issues involved.
                          What about if the freehand line could somehow be converted into one of fredos beziers.
                          ie: draw a line as fast or slow as you like but when you stop it makes a smooth curve based on a certain number of control points? more points in the slow section and less in the fast section. or a predetermined number spread over the length of the curve, but smooth.

                          Yup, that should work. Though there is many ways to convert to a curve. I suspect in most cases you want a smooth curve that is as close as possible to the original.

                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          1 Reply Last reply Reply Quote 0
                          • BoxB Offline
                            Box
                            last edited by

                            @thomthom said:

                            I suspect in most cases you want a smooth curve that is as close as possible to the original.

                            That would be very nice.

                            Feel free to bombard me with test .rb's

                            1 Reply Last reply Reply Quote 0
                            • JQLJ Offline
                              JQL
                              last edited by

                              @thomthom said:

                              Yup, that should work. Though there is many ways to convert to a curve. I suspect in most cases you want a smooth curve that is as close as possible to the original.

                              Do we really need a curve? I'd love it to be grouped and SUbDeable instead of a curve.

                              A curve in sketchup is very hard to manipulate, however, if you'd find some way to subdivide edges as you do with faces in SUbD...

                              We would be talking big game here! We could go inside the group and simply edit a vertex and the curve would change!

                              After all if you can subdivide faces... it should be way easier with edges and people that follow SUbD logic would easilly adapt to SUbE logic

                              www.casca.pt
                              Visit us on facebook!

                              1 Reply Last reply Reply Quote 0
                              • PixeroP Offline
                                Pixero
                                last edited by

                                @thomthom
                                Is there any way of getting hold of your stylus script?
                                Would love to try it.

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  driven
                                  last edited by

                                  the way it works in Preview.app would be good...

                                  in_preview.gif

                                  john

                                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                                  1 Reply Last reply Reply Quote 0
                                  • 1 / 1
                                  • First post
                                    Last post
                                  Buy SketchPlus
                                  Buy SUbD
                                  Buy WrapR
                                  Buy eBook
                                  Buy Modelur
                                  Buy Vertex Tools
                                  Buy SketchCuisine
                                  Buy FormFonts

                                  Advertisement