Zbrush Petition

If you have questions or comments concerning any non-support related 3Dconnexion topic, please use this forum.

Moderator: Moderators

yogurt6
Posts: 1
Joined: Sat Mar 21, 2020 1:11 am

Re: Zbrush Petition

Post by yogurt6 » Sat Mar 21, 2020 1:14 am

Wish I saw u/WintrySnowman post on Reddit earlier.
https://www.reddit.com/r/ZBrush/comment ... /?sort=old
I happened to work on zBrush/3DConnexion integration too.
I derived all rotation formulas and was thinking how to move all calculations to dll, as sin and cos don`t work in zscript since zBrush 2019.
I`m not very good at C++ (to say the least). Thus I upload this as a proof of concept, and so that more knowledgeable folks could use formulas in "zConnexion.txt". Doing everything in C++ will take me another year.
I only ask that, if you happen to make everything work, please pm the source code for me to learn.

zConnexion adds 3DConnexion`s devices support to zBrush.

*************************WILL WORK ONLY IN zBRUSH 2018 or lower ************************
(since 2019 SIN and COS are broken in zscript)
Installation:
1. 3DConnexion driver needs to be installed in the system.
2. Copy "zConnexion.zsc", "zConnexion.dll" and "zConnexion.exe" to [zBrush folder]\ZStartup\ZPlugs64.
3. Make shortcut of "zConnexion.exe" and place it on desktop.
4. "zConnexion" subpalette will appear in "Tools" after next zBrush start.
CTRL+ALT CLICK - assign "F12" key as "Tools:zConnexion:Execute" button`s keyboard shortcut.
5. Start "zConnexion.exe".
How it works:
"zConnexion.exe" gets all data from spacemouse driver, then sends it to "zConnexion.dll"
and at the same time triggers "zConnexion.zsc" via virtual keystroke of "F12" button.
When "Tools:zConnexion:Execute" button is pressed, zscript reads data from "zConnexion.dll",
calculates new position and applies it with [TransformSet, ] command.
What works?
Basically everything (pan, zoom, rotate, pie menus, shortcuts assigned via 3DConnexion driver etc.)
EXCEPT 3DConnexion specific commands (like QickZoomIn, change to top view etc.).
Why .exe and not HID data:
Free pie menus that come with the 3DConnexion driver.
IMPORTANT NOTES / ISSUES:
1. While "zConnexion.exe" is running ALL data from spacemouse is routed to it, no matter what window is now in focus.
So when you switch to other than zBrush app, in order to have spacemouse support there, you need to close "zConnexion.exe".
2. Performance depends heavily on CPU speed. Navigations become laggy on high-poly models. Try increasing sensivity to somewhat mitigate that via:
"Tool:zConnexion:Pan sens." "Tool:zConnexion:Zoom sens." "Tool:zConnexion:Rot. sens." or 3DConnexion driver.
3. Sometimes model flips (very very rare), that is most likely due to the fact that we have access only to Euler angles and
not to more appropriate matrices or quaternions. Sorry i`m too tired to debug this, maybe later.
4. Those who want to dig into zScript code - don`t ask me how rotation formulas work :)))
I don`t know myself, despite my hair being significantly more gray, than a year ago, when i started this project.
Guys and gals at Pixologic are very uncoventional, to say the least.
Tested on and works:
Windows: 10 64-bit Professional
zBrush: 2018

LINKS:
Github:
https://github.com/glushkov89/zConnexion
If you wish to support:
https://gum.co/AjmDo

ngomes
Moderator
Moderator
Posts: 1967
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Zbrush Petition

Post by ngomes » Tue Mar 24, 2020 5:20 am

Hi @yogurt6,

Had quick look at the Reddit posts by WintrySnowman and RevolutionaryCold.

They seem to have take a similar approach to what we at 3Dconnexion attempted to do back in 2011, using ZBrush's "right-click navigation". There's a topic on that solution.

Post Reply