JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    V2: Feedback render sluggish on GTX1070

    Scheduled Pinned Locked Moved Development Discussions
    16 Posts 3 Posters 3.6k Views 2 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.
    • z3devZ Offline
      z3dev
      last edited by

      @hrgdavor can you provide some more feedback on the 'sluggish' behaviour?

      there are internal throttles on the number of rotations, pans, zooms per second. maybe that makes V2 seem 'sluggish'?

      1 Reply Last reply Reply Quote 0
      • hrgdavorH Offline
        hrgdavor
        last edited by

        sorry, have not noticed your responses. did not get email notify although I tried to enable it in settings.

        hm, yes, this is windows 10. and looking at it more closely, it it may not be performance issue.

        it is loke rotation is elastic and and lagging

        video showing difference V1 vs V2
        http://hrg.hr/tmp/bandicam 2020-10-12 11-10-44-928.mp4

        z3devZ 1 Reply Last reply Reply Quote 0
        • z3devZ Offline
          z3dev @hrgdavor
          last edited by

          @hrgdavor yup. thought that it might be 'rotate'. it feels a little sluggish at times.

          hrgdavorH 1 Reply Last reply Reply Quote 0
          • hrgdavorH Offline
            hrgdavor
            last edited by

            pan as well (it is even worse, moves like 10% of mouse movement)
            http://hrg.hr/tmp/bandicam 2020-10-14 09-35-02-460.mp4

            1 Reply Last reply Reply Quote 0
            • hrgdavorH Offline
              hrgdavor @z3dev
              last edited by

              @z3dev said in V2: Feedback render sluggish on GTX1070:

              @hrgdavor yup. thought that it might be 'rotate'. it feels a little sluggish at times.

              not just sluggish, it seems like intentional smoothing with bounce, it feels horrible

              z3devZ 1 Reply Last reply Reply Quote 0
              • z3devZ Offline
                z3dev @hrgdavor
                last edited by

                @hrgdavor yup. there are some settings.

                I think that you are working with a local version of V2. Just change the constants in this file.

                packages/web/src/ui/views/viewer.js
                

                And start the dev instance.

                npm run dev
                

                Let me know what works best.

                hrgdavorH 2 Replies Last reply Reply Quote 0
                • hrgdavorH Offline
                  hrgdavor @z3dev
                  last edited by

                  @z3dev all of that was tested on https://jscad.xyz/ ... but I will try local instance and settings

                  1 Reply Last reply Reply Quote 0
                  • hrgdavorH Offline
                    hrgdavor @z3dev
                    last edited by

                    @z3dev changing options only makes issue more visible but does not solve it. Are you not seing there is inertia when rotate is following the mouse....

                    if I move my mouse few times left / right the rotation does not end in same place if mouse is i nsam place as it does in V1. .. it is so anoying I cant describe :(.

                    http://hrg.hr/tmp/bandicam 2020-10-15 10-22-50-635.mp4

                    z3devZ 1 Reply Last reply Reply Quote 0
                    • z3devZ Offline
                      z3dev @hrgdavor
                      last edited by z3dev

                      @hrgdavor you need to play with those settings some more.

                      I suggest that you crank up the rates, which drives the number of updates going into the rendering, i.e. rotateRate. Set this to something higher, like 30, 40, 50.

                      In addition, there's the speed of the rotation; rotateSpeed. This controls the movement between rotation updates. The max is 1.0, and will be extremely fast and uncontrollable. Somewhere between 0.010 and 0.001 will work the best.

                      It may be possible to allow users to control these values as well, and choose a rotation speed. Something like choosing the speed of the mouse.

                      hrgdavorH 1 Reply Last reply Reply Quote 0
                      • hrgdavorH Offline
                        hrgdavor @z3dev
                        last edited by

                        @z3dev I think you are still missing the point. It is not the rate of refresh or amount of rotation that is the issue here. It is inertia. When I move mouse and stop moving, the rotation continues. Can you not see the difference with V1 where rotation follows the mouse and when mouse stops rotation stops imemdiatelly. In V2 it looks like some intentional elastic motion that does not match mouse position at all. If I move mouse faster it is like it gets more momentum and then takes longer to slow down and stop. it should stop the moment I stop moving my mouse ... pls, why dont u understand what I am saying 😞 😞 😞 😞 😞 😞

                        hrgdavorH z3devZ 2 Replies Last reply Reply Quote 0
                        • hrgdavorH Offline
                          hrgdavor @hrgdavor
                          last edited by

                          @hrgdavor I am playing with viewer.js
                          and was able to remove the nasty effect I dont like with rotation on V2 by setting:

                          controls.drag = 1;
                          

                          and changed how events are throttled

                              var delta = [0,0];
                              var timer;
                              // rotate
                              gestures.drags
                                .forEach((data) => {
                                  const ev = data.originalEvents[0]
                                  const shiftKey = (ev.shiftKey === true) || (ev.touches && ev.touches.length > 2)
                                  if (!shiftKey) {
                                    delta[0] -= data.delta.x;
                                    delta[1] -= data.delta.y;
                                    cancelAnimationFrame(timer);
                                    timer = requestAnimationFrame(doRotate);
                                  }
                                })
                              function doRotate(){
                                const updated = orbitControls.rotate({ controls, camera, speed: rotateSpeed }, delta)
                                delta = [0,0];
                                controls = { ...controls, ...updated.controls }
                              }
                          
                          

                          this way changes will acumulate if animationframe is not executed

                          hrgdavorH 1 Reply Last reply Reply Quote 0
                          • hrgdavorH Offline
                            hrgdavor @hrgdavor
                            last edited by hrgdavor

                            @hrgdavor here is video showing how I expect rotate to work
                            versus how it works on xyz

                            http://hrg.hr/tmp/bandicam 2020-10-16 16-52-05-763.mp4

                            I have also created a pull request. But this is not real pull request, just wanted to somehow share the code I hacked quickly to get rotation to work.

                            If the pull request has any potential, I welcome your input so I can make this my first code contribution 🙂

                            1 Reply Last reply Reply Quote 0
                            • z3devZ Offline
                              z3dev @hrgdavor
                              last edited by

                              @hrgdavor don't panic. i understand just fine. but i wanted to make sure that everything has been tried before making changes.

                              also, i'm not certain why 'exact' mouse position is important. i'm just fine working with V2, and don't find the inertia to be troublesome.

                              so, maybe this would be a user preference. no?

                              1 Reply Last reply Reply Quote 0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • First post
                                Last post
                              Powered by NodeBB | Contributors