Hello, ZBC community,
I’m newbie in ZB (both ZBrush and ZScript), though I had several experiences in the computer graphics & programming.
At this moment, I am exploring ZScript programming to support 3D modeler.
What I want to do in the end is reproducing the 3D transformation (translation, rotation and scale) in ZBrush from another tool, but I’m stucking in the Transform in ZBrush. I have no idea what exactly doing inside of ZBrush in the sense of “3D”, not “2.5D”.
It has two aspects, rotation and translation. I will explain the detail of my problem below.
Even though I can access 3 rotation values from ZScript by MTransformGet, but I cannot reproduce the exactly same image from ZBrush. I implemented both GL and DX orthographic rendering programs and apply them in various ways, and found a simple rule in two-axes (ZX, no Y rotation) cases. However, I’m struggling with finding universal 3-axes cases with many trials, but I cannot success yet.
Someone may want to mention on “gimbal lock”, but I guess it is not a really gimbal lock problem, because there is no axes degeneration. Rather, I strongly assume that ZB has two principles, because the rotation view are quite different when cos(rotY) > 0 and cos(rotY) <= 0.
Is there anybody tried to find this kind of universal rule before?
- weirdness in ‘translation’ (named “Move” in ZBrush)
Another weird thing is Z-translation (to the depth direction). Even though ZScript API provides getter/setter to Move-Z value, but it does not affect at all in my test. That means, I can only ‘scale’ 3D object (“Tool” in ZBrush) in my viewport (“Document” in ZBrush) to look closer even in the perspective mode? Or, is it possible in some tricky way?
Is there anybody tried this kind of operation before?
Well, I guess that ZBrush is basically started from 2.5D, so the ZB developers did not want to adjust translation Z value in the 3D coordinate.
Thank you for your reading.