ZBrushCentral

Question: how to use mesh3DGet

I am trying to get a measurement of the z extents or size for an object (tool) so that I can scale it to the size I need it to be. I am scripting a bunch of objects that have to be scaled the same way so that they relate to a third object. All of these objects vary in z depth by a random amount starting out.

I would like to query mesh3DGet the object size. I cant even get a variable out of it to print in a note so that I can see the format.

Ive tried unify but it didnt work. I think the objects pivot points are not at 0,0,0

Thanks to anyone who can help. All my hack workarounds are failing.

Rich

Also is there a way to move the tools pivot point to the center of the object (in z) without moving the tool?

If I was to do this to all models before unifying them then they should be aligned properly for further scaling.

I noticed that if I unify two objects (one as a subtool of another,) zbrush postions them together so that they exist in the same extents. (which is what I want) but that separately it seems to center them based on the single objects center.

Any clearification or correction on this observation would be apreciated.

Hi Rich,

Unfortunately XYZ bounds function for Mesh3DGet is not implemented. You can get the mesh area but naturally that is not the same thing. You might be able to use that to get some idea of the scale of your models but it won’t be that reliable:

[VarDef,area,0]

[IButton,GetMeshArea,,
	[Mesh3DGet,8,,,area]
	[Note,#area]
]

The unify function scales the mesh and sets its pivot point to the center based on the ZBrush unit cube, as indicated in the Tool:Preview. For subtools, unifying will always position the pivot point at the position of the top subtool. Essentially the pivot point is the mesh position, so you can’t set it without moving the model. You can set the pivot point without scaling by using Transform:SetPvt. (This sets the pivot to the center of the visible mesh.)

You may be able to do what you want by using unify first and then the Deformation:Offset and Size sliders.

marcus_civis,

Thank you,

I just need a new top of the subtool chain that is common and sets the position

then. At that point I could unify and translate.

thanks for the information as well on setPvt, Mesh3DGet and note!