ZBrushCentral

Sketchup/ZBrush Import/Export: Scale Issues

Hi all!

Models that I export from Sketchup to ZBrush never come back the same size when I import them back from ZBrush. I could export a 500mm cube in obj format to ZBrush, but once I export it from ZBrush back to Sketchup, it invariably resizes to a 3.5mm cube.

I know I can always use the size ratio slider in the 3D printer export plugin, but there are circumstances where I it’s not feasible. For instance, I’d like for certain areas of an accessory part that I export to ZBrush to retain a specific size in order to fit into a particular item.

I’ve tried for weeks looking for a way around it, but it makes no difference if I simply exported the obj file from the tool menu or if I used the 3d print exporter.

I guess what I’m trying to ask is, can you retain the measurements of an object you imported into ZBrush (obj or stl) when you export it back to the software you exported it from?

Any advice is much appreciated.

I don’t have Sketchup and I can’t install it on my system but I’d like to look at the 500mm cube OBJ you’re sending to ZBrush. ZBrush does resize on import but this should be reversed when exporting (the value used is in the Tool>Export>Scale slider).

Also, this answer of mine might be of interest:
http://www.zbrushcentral.com/showthread.php?190961-Scale-units-Maya-to-Zbrush&p=1119988&viewfull=1#post1119988

Thanks for replying, Marcus!

I’d actually read the thread yesterday, which got me thinking about this whole thing. Initially, I’d just about given up and simply thought that ZBrush invariably resizes any and all imported files even when exporting them back out. But after reading your reply on that thread, it seems that’s not the case.

I’ve attached a zip file of the cube I used for testing.

Thanks that’s useful. OBJs are text files so you can actually open them in a Text Editor (if they’re not too large!).

This is the start of the file:

Alias Wavefront OBJ File Exported from SketchUp

with OBJexporter © 2013 TIG

Units = meters

mtllib Cube_Export_Test_500mm.mtl

g Cube_Export_Test_500mm-GRP-135-Default_Material
usemtl Default_Material
v 0.671849565586 0 -0.697927524321
v 0.171849565586 0 -0.197927524321
v 0.171849565586 0 -0.697927524321
v 0.671849565586 0 -0.197927524321
v 0.671849565586 0.5 -0.197927524321
v 0.171849565586 0.5 -0.697927524321
v 0.171849565586 0.5 -0.197927524321
v 0.671849565586 0.5 -0.697927524321

The lines that begin with "v " are the vertex positions. You can see from the values that 0.5 (half the generic unit) is equal to 500mm (the size you used in Sketchup) so the default unit in Sketchup must be 1 meter. This is confirmed at the top of the file where it says “# Units = meters”, though note that the “#” indicates this is a comment and so will be ignored by other programs.

In ZBrush I selected the PolyMesh3D Star and then imported the OBJ. The Tool>Export>Scale slider showed a value of 0.25. This means ZBrush has scaled the cube up four times on import and will scale it down to a quarter its size on export. However, when measured with the Transpose line it shows a size of 0.5 which we know is correct, so the Transpose line gives the correct reading whatever scaling ZBrush applies internally.

Exporting the OBJ from ZBrush gives this:

File exported by ZBrush version 4.6

www.zbrush.com

#Vertex Count 8
#UV Vertex Count 6
#Face Count 12
#Auto scale x=4.000000 y=4.000000 z=4.000000
#Auto offset x=-1.687398 y=-1.000000 z=1.791710
mtllib Cube_Export_Test_500mm-exZB.mtl
usemtl defaultMat
v 0.67184954 -0 -0.69792753
v 0.17184956 -0 -0.19792753
v 0.17184956 -0 -0.69792753
v 0.67184954 -0 -0.19792753
v 0.67184954 0.5 -0.19792753
v 0.17184956 0.5 -0.69792753
v 0.17184956 0.5 -0.19792753
v 0.67184954 0.5 -0.69792753

Although there is a slight difference in precision, you’ll see that the vertex positions are the same, so this file should import into Sketchup without any change in scale. If Sketchup changes the scale then it must be something to do with Sketchup’s import settings.

Attachments

500mmCube.jpg

Thanks, Marcus! At least it’s now confirmed that the problem isn’t with ZBrush.

Here’s something else I discovered just now, which probably creates more questions than answers. I did a test by exporting that cube to ZBrush in stl format, and then exported it back to Sketchup as an obj file, using the same obj importer plugin. Strangely, the cube retained it’s 500mm size!

For the time being, I guess I can retain size settings by exporting base meshes to ZBrush in stl format, and then import them back to Sketchup as obj files.

That’s interesting. So what value is in the Tool>Export>Scale slider?

I’ve spent a lot of time with Zbrush and other programs and the scaling issues involved.

http://www.zbrushcentral.com/showthread.php?168239-Scaling-Issues-(GoZ-Blender-Max-etc-)-Solution-and-explanation

Here’s a thread I made almost 3 years ago. Some of it might help explain what’s happening. I think I need to go through that and make some updates as I think Zbrush fixed some of the issues and how it deals with scaling on import/export.

@Marcus:

The slider says 249.9999. Does that mean it’s scaled 2.5 times? Admittedly, I’m an absolute noob when it comes to the more technical aspects of ZBrush (actually, I’m still pretty much a noob in general :D).

I also took a screenshot of the other sliders, just in case. I didn’t touch any of the settings, though.

Tool-Export-Slider.jpg

@MentalFrog: Thanks so much for the link! I’ll have to print this out and study it properly later, but I’m slowly getting a general idea of how it all works.

I think the second solution would work best in my case, since it doesn’t require any fiddling with the settings.

SKYWAYS128,

Many thanks. What this means is that Sketchup is exporting the STL file as millimeters (so that 1 generic unit = 1 mm). ZBrush is scaling that down on import (to 0.004 of its size) so that it is scaled up 250 times on export.

The OBJ import for Sketchup is obviously as millimeters which is why the transfer from ZBrush works OK. (Strange that Sketchup should export as meters and import as millimeters!)

The Offset sliders simply show that the cube you imported into ZBrush was offset from the origin. ZBrush automatically centers a model imported into the PolyMesh3D Star, so resets this on export.

MentalFrog,

Many thanks, that looks good information, though I wouldn’t recommend using the grid to judge scale. The grid size and divisions can be set in the Draw palette, so it’s not a fixed size.

It’s also worth remembering that the Transpose Line will give the correct size (in generic units) when ZBrush has auto-resized a model on import. For this, Transpose takes the Tool>Export>Scale setting into consideration, so if you change that setting then the Transpose measurement will adjust also. The advantage of the Transpose line is you can set the units to what you want. For a direct correspondence with another application you’d simply leave Preferences>Transpose Units>Units Scale at 1 and use the Set Units button to enter “cm” or whatever you want.

@Marcus: I did a check on the plugin, and according to the website, it exports in meters by default, for whatever reason. think it’s because the exporter and importer plugins were made by different people. The exporter plugin simply exports in meters by default, but the importer gives me the option of importing in various measurements (mm, cm, inches, meters, yards, etc.).

Sadly, Sketchup’s built-in obj exporter isn’t available on the free version of the software. I’ve been using free plugins for importing and exporting stl and obj files to and from Sketchup.

Well, I’m glad that the problem can be solved by simply exporting models from Sketchup as stl files, and them importing them back from ZBrush as obj files.

Either way, thanks so much for the helping to shed light on the issue! :smiley: :+1: :+1: :+1: