ZBrushCentral

GoB: an unofficial GoZ for Blender.

Hello there,
I propose my version of a bridge between Blender and ZBrush (for Windows, and maybe for Mac if there are a Max GoZ entry) .
It is a simple Python script to import and export .obj file.
(This is only Blender side, no Zscript or modification of ZBrush)

The script use the official Blender obj importer and exporter.
In fact there is many ways to bridge Blender with ZBrush and I show you two of this ways:

First way: The semi-automatic method
ZBrush open automatically Blender each time you click on the ZBrush GoZ button.
In Blender an other button export objects and then close Blender.
After in ZBrush you need to click on the import button to open the file named ‘GoB.obj’ in your ‘Pixologic/ZBrush 4.0/ZExportImport’
Be carefull to the Projection range slider to avoid some surprise :slight_smile:
To use this method, install the first script in the joined zip.

Second way : manual method
You have to open Blender manually. It is strange but this method is better (if you have double screens) because you can work fastest.
In ZBrush export your objects with the GoZ features and import with the standard import button.
In Blender export and import with the same button in the info header.
To use this method, install the second script in the joined zip.

There are some inconveniences to use the standard .obj importer/exporter.
So maybe other version of GoB will emerge, or not if official GoZ will be released :slight_smile:

Known problem: all objects imported are renamed ‘GoB’, so rename manually your tools…GoB for Blender2-57.zip (4.89 KB)

Thank you Stunton, I’ll give it a try.

very nice pluginhope it can import models from blender automatic soon
thanks~~

Does not work for mac, because there is no entry for max. I have tried to edit script for maya entry, but it doesn’t work for me.
Would be great if script will work also for mac users.

Hello there,
I release a new version of GoB with more features:

  • Polypainting
  • Polygroup
  • Masking
  • material (diffuse, displacement, normal map)

A short video to see the script in action (the model used is from http://www.ir-ltd.net):
http://vimeo.com/25621241
– edit: fixed, thx saika –

To use it:
Copy the two files in the zip in this directory:
C:/Users/Public/Pixologic/GoZApps/Max

Then in ZBrush, choose Preferences->GoZ->Path to 3D Studio Max and locate the Blender.exe and Skip the 3DS install.

Next open this file with notepad:
C:/Users/Public/Pixologic/GoZApps/Max/GoZ_Config.txt
and add this parameter:
-P GoZ_ExportToBlender.py

so the first line is:
PATH = “C:/your_path_to_blender/blender.exe -P GoZ_ExportToBlender.py”

– edit: you need to install the GoZ update 1 –
Enjoy :slight_smile:

For Mac user:
I dont know how GoZ for Mac works, so if you can help me to adapt this Python script to Mac world, it would be fine.GoB_v0.2.2.zip (6.14 KB)

really nice!!
but the vimeo seems broken…

Thanks!!
It works and nice too :smiley: . But the model is imported upside down in blender.
It’s actually 180 degree roteted on x axis in blender. Could it be solved?

Yep, you need to install the GoZ update 1.

Thanks. Now it works perfectly. :+1:

Hi Stunton,
Thanks for the exporter, I’m having a bit of an issue though.
At first installed and it worked great… imported into blender upside down, THen I saw the install the GoZ update 1. I updated goz and now I am getting a error = ZSCRIPT Note:
Tool:Export:Scale
In…
[IGET,“Tool:Export:Scale”]

Any sugestions?
-= Update=-
Got it running, Awesome :+1:
dunno wut I did to get it running, I just went over the install again and it worked.
Thanks again.

and on another note, I have gimp instead of photoshop… can I link to the gimp.exe? or as anyone tried it?

Thanks angain for all of your time and knowledge :slight_smile:
Cheers,
~Tung

I think you cannot use Gimp instead Photoshop with GoZ update 1.
(Gimp dont have a 3D module).

Happy ZBrushing/Blending

Yeah, thought i was reaching way our there for that one :confused:
Tis, all good though :slight_smile:
Thanks again,
Cheers,
~Tung

Stunton:
This is most excellent![color=Lime]
May your efforts be rewarded for this!
The Blender community is indebted to you for this contribution.

Superb!!! Absolutely beautiful tool.
Thank you so much for sharing your talent and skills with us.

Thank you so much for your work on this plugin. ^^

The Vimeo Vid looks awesome. I’d like to help with the right OSX paths, but the main problem ist that theres no support for 3ds Max in OSX in zBursh, cause there no 3ds Max aviable for Mac OSX. So theres also no Max Folder in the Pixologic/ZApps directory.

I’ve tried it with the Modo Folder instead of the Max. But it didn’t work. Maybe someone can help to get this cool plugin working for mac users?

Greetings

Hi
i think you can change the folder from max folder to maya folder…
and change the goz default setting in zbrush form max to maya…then you can
use this awesome tool ,cheers~

Allright, i will try it later.
Thanks so far.

Hi,
@Mauk:
Thank you for the help!
If Max folder doesn’t exists, you can change it by Maya like saika wrote it.
Then you need to change some paths like the import path:

pathImport = "C:/Users/Public/Pixologic/GoZProjects/Default"

and the script path:


sys.path.append('C:/Users/Public/Pixologic/GoZApps/Max')

(and maybe the path for the ‘GoZ_ObjectList’).

This line need to be corrected too:


os.system(pathApp+'/GoZBrushFromApp.exe')

Finally, you need use the script attached to avoid the big-endian/little-endian problem.

Hope it helps?pixoGozFile_for_Mac.zip (4.52 KB)

Hey Stunton, thanks for the help.

But i cant get it work. Problem is, when i add

" -P GoZ_ExportToBlender.py"

in Goz_Config.txt and i restart zBrush the path to the maya/blender app gets lost. So zBrush finds no Maya/Blender under preferences/goz. If i’m not adding the -P GoZ_ExportToBlender.py to the GoZ_config.txt and i restart maya everything works as usual. GoZ Maya Path is linked to /Applications/Blender_2.57/blender.app like it should.

I changed everything in the GoZ_ExportToBlender.py like you said:

import sys
pathImport = “/Users/Shared/Pixologic/GoZProjects”
sys.path.append(’/Users/Shared/Pixologic/GoZApps/Maya’)

##### BEGIN GPL LICENSE BLOCK

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software Foundation,

Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

##### END GPL LICENSE BLOCK

import bpy,os,pixoGozFile
from pixoGozFile import importGoZ,exportGoZ

pathApp = pathImport.rsplit(’/’,2)[0]+’/GoZBrush’
objectList = []
scn = bpy.context.scene
try:
fic = open(pathApp+’/GoZ_ObjectList.txt’,‘rt’)
line = fic.readline()
while line:
objectList.append(line.strip()+’.GoZ’)
line = fic.readline()
fic.close()
except:
pass
def GoZit():
for obj in scn.objects:
if obj.name == ‘Cube’:
scn.objects.unlink(obj)
break
for obj in objectList:
importGoZ(scn,obj)
class INFO_HT_header(bpy.types.Header):
bl_space_type = ‘INFO’
def draw(self, context):
layout = self.layout
window = context.window
rd = scn.render
row = layout.row(align=True)
row.template_header()
if context.area.show_menus:
sub = row.row(align=True)
sub.menu(“INFO_MT_file”)
sub.menu(“INFO_MT_add”)
if rd.use_game_engine:
sub.menu(“INFO_MT_game”)
else:
sub.menu(“INFO_MT_render”)
sub.menu(“INFO_MT_help”)
if window.screen.show_fullscreen:
layout.operator(“screen.back_to_previous”, icon=‘SCREEN_BACK’, text=“Back to Previous”)
layout.separator()
else:
layout.template_ID(context.window, “screen”, new=“screen.new”, unlink=“screen.delete”)
layout.template_ID(context.screen, “scene”, new=“scene.new”, unlink=“scene.delete”)
layout.separator()
layout.operator(“scene.gob_export”, icon=‘MAN_TRANS’, text=“GoB”)
layout.separator()
if rd.has_multiple_engines:
layout.prop(rd, “engine”, text="")
layout.separator()
layout.template_running_jobs()
layout.template_reports_banner()
layout.label(text=scn.statistics())
layout.operator(“wm.window_fullscreen_toggle”, icon=‘FULLSCREEN_ENTER’, text="")
class GoB_export(bpy.types.Operator):
bl_idname = “scene.gob_export”
bl_label = “Export to Zbrush”
def execute(self,context):
fic = open(pathApp+’/GoZ_ObjectList.txt’,‘wt’)
for obj in scn.objects:
if obj.type == ‘MESH’ and obj.select:
bpy.ops.object.mode_set(mode=‘OBJECT’)
exportGoZ(scn,obj,pathImport)
fic.write(pathImport+’/{0}
‘.format(obj.name))
fic.close()
os.system(pathApp+’/GoZBrushFromApp.app’)
unregister()
bpy.ops.wm.quit_blender()
return{‘FINISHED’}
def register():
bpy.utils.register_class(GoB_export)
bpy.utils.register_class(INFO_HT_header)
GoZit()
def unregister():
import bl_ui
bpy.utils.unregister_class(GoB_export)
bpy.utils.unregister_class(INFO_HT_header)
bpy.utils.register_class(bl_ui.space_info.INFO_HT_header)
if name == “main”:
register()
I really dont know whats the problem is. I’m not an expert in Python.

Greetings