PDA

View Full Version : Script problem: ZBrush (transformset) gets very imprecise on big tool scales ?


gamePat
08-06-09, 05:49 AM
Hi guys, so I created a quick script for quickly switching between 2 "camera positions". Everything works fine so far, exept when I am storing the transform values of the tool when I zoomed in (tool scale) to the maximum or close to it.
Then, when I switch back to another camera view I stored, the position is not the same as before, the object is actually out of the "camera view".

Since I have no problems with switching between views, that are NOT! zoomed in very close, I suspect ZBrush gets imprecise on big zoom scales.

Btw. I experienced the same problem in the zapplink plugin. There the transformation values don't differ so much, but you still don't get the view back perfectly how it was.

I attached my script, so can anybody please have a look at it ? Or maybe somebody experienced a similar problem already...

Svengali
08-06-09, 08:50 AM
Hi Gamepat,

Here's a link to a thread which includes a plugin (called ModelViews.txt) somewhat similar in functionality to what you are constructing. I wrote it to demonstrate several ZScripting techniques and commands implementation - you might find some parts of the listing helpful, especially the MTransformGet and MTransformSet commands which will greatly simplify what you are trying to do.

ModelViews Thread (http://www.zbrushcentral.com/zbc/showthread.php?t=61903)

On the other hand, you may need to store and retrieve some additional information about the WINDOW position, too. I tried to resolve this issue in a general way with another plugin called

ZoomFit Plugin (http://www.zbrushcentral.com/zbc/showthread.php?t=71913)
(no source)

Svengali

gamePat
08-07-09, 01:29 AM
Nice! thanks Svengali. I will definitely check this out.