• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Fluid freehand

Scheduled Pinned Locked Moved Developers' Forum
15 Posts 7 Posters 1.7k Views
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.
  • B Offline
    Box
    last edited by 26 Apr 2017, 16:04

    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
    • R Offline
      Rich O Brien Moderator
      last edited by 26 Apr 2017, 20:25

      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
      • T Offline
        thomthom
        last edited by 15 May 2017, 08:59

        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
        • B Offline
          Box
          last edited by 15 May 2017, 11:17

          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
          • J Offline
            JQL
            last edited by 15 May 2017, 12:33

            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
            • R Offline
              Rich O Brien Moderator
              last edited by 15 May 2017, 13:15

              @box

              What about Fredo's Smooth Contour in Curvizard?

              Download the free D'oh Book for SketchUp

              1 Reply Last reply Reply Quote 0
              • B Offline
                Box
                last edited by 15 May 2017, 13:23

                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
                • B Offline
                  Box
                  last edited by 15 May 2017, 13:59

                  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
                  • P Offline
                    pbacot
                    last edited by 15 May 2017, 15:04

                    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
                    • B Offline
                      Box
                      last edited by 15 May 2017, 15:11

                      @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
                      • T Offline
                        thomthom
                        last edited by 15 May 2017, 15:20

                        @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
                        • B Offline
                          Box
                          last edited by 15 May 2017, 15:24

                          @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
                          • J Offline
                            JQL
                            last edited by 15 May 2017, 15:46

                            @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 16 May 2017, 11:28

                              @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 16 May 2017, 15:22

                                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