discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Need help with inputdriver5 for SpaceMouse

S
sibjo
Sat, Feb 3, 2018 5:45 PM

I have done a little bit more testing and thinking now :)

The SpaceNavDriver is ignoring the settings. The SpaceNavDriver is directly

affecting the ViewPort.

Meaning: When you are using the SpaceNavDriver, the axis mapping has no

effect and the axis indicators >have no function.

(I do not know whether this is a feature, a bug or an artifact from the

early development phase)

So in Torsten's screencast is it the Joystick and DBus-driver that are
making the move on the axis indicators? There he is showing that the mapping
is taking effect and he got the HIDAPI disabled so I thought it was the
SpaceNav-driver doing the work.

The feature works for my use case (left thumbstick of a XBox360 Controller

controlling the camera). I >have one axis of the stick mapped to ViewPort
rel. Translation X and the other to Z.

ViewPort rel. Translation on Y has no effect when you are in orthogonal

view ().

When you are in perspective view (), the effect of "ViewPort rel.

Translation on Y" is similarly to zooming, >but in a very strange way.

That the two relevant axis are X and Z  (and not as a user might think X

and Y) has to do with the >internal working of openSCAD.

Maybe we should hide the option to configure the "ViewPort rel. Translation

on Y".

(but as a developer, I have the tendency to leave in any potentially useful

feature - "ViewPort rel. >Translation on Y" combined with the Zoom can be
used for a vertigo effect, which can be used to precisely >match the
perspective of a photo with a render)

Well, 99% of the time I'm in perspective view so that is usually not a
problem.
This morning just after I started the computer the ViewPort rel. Translation
actually worked!
I changed the gain-setting and it completely stopped working again :/
I restarted OpenSCAD - still not working. Restarted the computer - still not
working. I have no idea why it stopped working and even less idea how it
started to work.

Could you please be more specific? Maybe we need yet an other kind of

translation.

First off everyone got different preferences with stuff like this and I
understand that. I've been learning just by spending time designing stuff in
OpenSCAD plus reading Jeremie Francois's tutorial. I'm by no means good at
it since I don't have any programming background and I don't know and don't
use all of its functions but I've still managed to get to a level where
designs are getting a bit complex (at least for me). When working with
multiple objects relating to each other the actual translation is getting
less important than working with single objects. My wish would be to use all
controls in ViewPort rel. both for Translation and rotation. Imagine the
camera is just floating in space and you don't have to think about what's
XYZ. For example, you could "fly" in halfway through a hole in a design,
then stay on that exact spot and rotate 180degress to look back out again
without having to think about where the crosshairs/point of rotation is.
Great for checking stuff and catch design flaws I would most likely miss
otherwise. You can also mimic "traditional" rotation quite easily by
rotating at the same time as you are panning sideways.

The best option for multiuse would probably be to have two standard settings
you could swap between easily by pushing a button/keystroke (kind of like
perspective and orthogonal). Use the rotation around center and  ViewPort
rel. Translation for single objects. For multiobjects and complex design use
the "camera-in-space" setting (viewport rel. translation and rotation). Just
my 2c but if I could change any setting that would be the most
efficient/less frustrating way to do it for me.

I have no idea if it's even possible to implement but we already have the
Viewport: translate, the rotate and the distance so if the Viewport
translate would be just where the "camera" is that would be nice.
I'm not sure if that makes sense. I will see if I can get those settings to
work on Blender and make a screencast if I explained it too badly. (I don't
use Blender btw, just tried it since SpaceMouse was supported..)

/ Simon

--
Sent from: http://forum.openscad.org/

I have done a little bit more testing and thinking now :) > >The SpaceNavDriver is ignoring the settings. The SpaceNavDriver is directly affecting the ViewPort. >Meaning: When you are using the SpaceNavDriver, the axis mapping has no effect and the axis indicators >have no function. >(I do not know whether this is a feature, a bug or an artifact from the early development phase) So in Torsten's screencast is it the Joystick and DBus-driver that are making the move on the axis indicators? There he is showing that the mapping is taking effect and he got the HIDAPI disabled so I thought it was the SpaceNav-driver doing the work. >The feature works for my use case (left thumbstick of a XBox360 Controller controlling the camera). I >have one axis of the stick mapped to ViewPort rel. Translation X and the other to Z. >ViewPort rel. Translation on Y has no effect when you are in orthogonal view (). >When you are in perspective view (), the effect of "ViewPort rel. Translation on Y" is similarly to zooming, >but in a very strange way. > >That the two relevant axis are X and Z (and not as a user might think X and Y) has to do with the >internal working of openSCAD. > >Maybe we should hide the option to configure the "ViewPort rel. Translation on Y". >(but as a developer, I have the tendency to leave in any potentially useful feature - "ViewPort rel. >Translation on Y" combined with the Zoom can be used for a vertigo effect, which can be used to precisely >match the perspective of a photo with a render) Well, 99% of the time I'm in perspective view so that is usually not a problem. This morning just after I started the computer the ViewPort rel. Translation actually worked! I changed the gain-setting and it completely stopped working again :/ I restarted OpenSCAD - still not working. Restarted the computer - still not working. I have no idea why it stopped working and even less idea how it started to work. >Could you please be more specific? Maybe we need yet an other kind of translation. First off everyone got different preferences with stuff like this and I understand that. I've been learning just by spending time designing stuff in OpenSCAD plus reading Jeremie Francois's tutorial. I'm by no means good at it since I don't have any programming background and I don't know and don't use all of its functions but I've still managed to get to a level where designs are getting a bit complex (at least for me). When working with multiple objects relating to each other the actual translation is getting less important than working with single objects. My wish would be to use all controls in ViewPort rel. both for Translation and rotation. Imagine the camera is just floating in space and you don't have to think about what's XYZ. For example, you could "fly" in halfway through a hole in a design, then stay on that exact spot and rotate 180degress to look back out again without having to think about where the crosshairs/point of rotation is. Great for checking stuff and catch design flaws I would most likely miss otherwise. You can also mimic "traditional" rotation quite easily by rotating at the same time as you are panning sideways. The best option for multiuse would probably be to have two standard settings you could swap between easily by pushing a button/keystroke (kind of like perspective and orthogonal). Use the rotation around center and ViewPort rel. Translation for single objects. For multiobjects and complex design use the "camera-in-space" setting (viewport rel. translation and rotation). Just my 2c but if I could change any setting that would be the most efficient/less frustrating way to do it for me. I have no idea if it's even possible to implement but we already have the Viewport: translate, the rotate and the distance so if the Viewport translate would be just where the "camera" is that would be nice. I'm not sure if that makes sense. I will see if I can get those settings to work on Blender and make a screencast if I explained it too badly. (I don't use Blender btw, just tried it since SpaceMouse was supported..) / Simon -- Sent from: http://forum.openscad.org/
TP
Torsten Paul
Sat, Feb 3, 2018 10:05 PM

On 02/03/2018 06:45 PM, sibjo wrote:

So in Torsten's screencast is it the Joystick and DBus-driver
that are making the move on the axis indicators? There he is
showing that the mapping is taking effect and he got the HIDAPI
disabled so I thought it was the SpaceNav-driver doing the work.

Looks like it's indeed picking up multiple drivers, which should
not happen. After disabling all the other drivers, I do get the
same result.

I've changed the driver so it will now go through the axis mapping.
Fetching the latest code should give you a SpaceNav driver that
can be configured in the OpenSCAD config screen.

I've only tested with the freshly installed spacenavd so far, no
change of the spacenavd configuration file.

ciao,
Torsten.

On 02/03/2018 06:45 PM, sibjo wrote: > So in Torsten's screencast is it the Joystick and DBus-driver > that are making the move on the axis indicators? There he is > showing that the mapping is taking effect and he got the HIDAPI > disabled so I thought it was the SpaceNav-driver doing the work. > Looks like it's indeed picking up multiple drivers, which should not happen. After disabling all the other drivers, I do get the same result. I've changed the driver so it will now go through the axis mapping. Fetching the latest code should give you a SpaceNav driver that can be configured in the OpenSCAD config screen. I've only tested with the freshly installed spacenavd so far, no change of the spacenavd configuration file. ciao, Torsten.
S
sibjo
Wed, Feb 7, 2018 6:15 PM

I've changed the driver so it will now go through the axis mapping.
Fetching the latest code should give you a SpaceNav driver that
can be configured in the OpenSCAD config screen.

That's good! Seems to work a lot better now!

I got a reply from Michael as well that did not show here on the forum but
things are looking better. I had also missed this little nice tool
https://sourceforge.net/projects/spacenav/files/spacenavd%20config%20gui/spnavcfg%200.3/
where you can set the sensitivity for individual axes which helps a lot. You
can also invert stuff there as well but nothing more than you can in the
axis mapping.

Since Torsten's update, I'm getting movement from the SpNav and changes are
taking effect so I'm ditching HidApi for now. The really nice thing is that
I talked with Michael about view port relative rotation and with SpNav I'm
actually kind of getting it on X and Y (Z is not relative...). Only around
point of rotation of course but still not too bad. The really weird thing is
that it's only acting this well-behaved when you are on >Z and tilted less
than 90 degrees in any direction XY-wise. If not it's kind of a mix with
rotation around axis and view port relative rotation. Mindboggling to say
the least! :/

The view port relative translation is sadly not working and neither are the
buttons but they've started to highlight again when pushed which is good I
guess.

I'm not really sure what to do now but I'm happy that it's kind of working
at least :)
/ Simon

--
Sent from: http://forum.openscad.org/

>I've changed the driver so it will now go through the axis mapping. >Fetching the latest code should give you a SpaceNav driver that >can be configured in the OpenSCAD config screen. That's good! Seems to work a lot better now! I got a reply from Michael as well that did not show here on the forum but things are looking better. I had also missed this little nice tool https://sourceforge.net/projects/spacenav/files/spacenavd%20config%20gui/spnavcfg%200.3/ where you can set the sensitivity for individual axes which helps a lot. You can also invert stuff there as well but nothing more than you can in the axis mapping. Since Torsten's update, I'm getting movement from the SpNav and changes are taking effect so I'm ditching HidApi for now. The really nice thing is that I talked with Michael about view port relative rotation and with SpNav I'm actually kind of getting it on X and Y (Z is not relative...). Only around point of rotation of course but still not too bad. The really weird thing is that it's only acting this well-behaved when you are on >Z and tilted less than 90 degrees in any direction XY-wise. If not it's kind of a mix with rotation around axis and view port relative rotation. Mindboggling to say the least! :/ The view port relative translation is sadly not working and neither are the buttons but they've started to highlight again when pushed which is good I guess. I'm not really sure what to do now but I'm happy that it's kind of working at least :) / Simon -- Sent from: http://forum.openscad.org/