Goz Plugin not working in new version houdini?

   5184   7   1
User Avatar
Member
116 posts
Joined: June 2016
Offline
https://www.sidefx.com/tutorials/goz-plugin-for-zbrush/ [www.sidefx.com]

I did install plugin as instruceted in video but i do not get gz plugin shelf and yes i did restart Houdini
Hitting “+” sign and selecting “shelves” does not have GoZ listed
Edited by ISUther - Nov. 12, 2017 15:09:27
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
the tool has been updated:
https://www.dropbox.com/s/cibtavd9hm0686u/goz_installer16_5.hda?dl=0 [www.dropbox.com]
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
402 posts
Joined: June 2014
Offline
Yipppeee!
Henry Dean
User Avatar
Member
181 posts
Joined: Feb. 2013
Offline
Nice. Thanks, Michael.

Note that the otl assumes you're running Windows. I'd have to take a closer look to remap the paths for potential compatibility with other platforms.

User Avatar
Member
27 posts
Joined: May 2015
Offline
Cyzor
Note that the otl assumes you're running Windows. I'd have to take a closer look to remap the paths for potential compatibility with other platforms.

Yeah, I'd love to use this HDA, but sadly I'm on macOS. I know what I need to change in zbrush_dir and brush_proj_dir, but have no idea what to do about GoZMakeObjectPAth.exe and so on…

Have anyone figured it out?
User Avatar
Member
99 posts
Joined: March 2009
Offline
back when the Maya version was out of date, I wrote a script to do a similar thing just by dragging and dropping exported OBJ files onto the ZBrush app in macOS since that imports the mesh. I don't know what sort of interop you need but that type of thing is easy to write for Houdini since you just make a drag and drop of your geo the post-render script action. Try the attached scene – it works for me. You might need to change your path to ZBrush in the geometry ROP's script since I'm using floating license version that has a different path
Edited by cgbeige - Feb. 21, 2018 15:14:10

Attachments:
goz.hip (141.0 KB)

User Avatar
Member
27 posts
Joined: May 2015
Offline
The HIP you attach consists of three heightfield node and nothing about saving geo

Anyhow, I tried to fix the code from original HDA.
import os
import subprocess

zbrush_dir = "/Users/Shared/Pixologic/GoZBrush"
zbrush_proj_dir = "/Users/Shared/Pixologic/GoZBProjects/Default"

def get_mesh_paths(meshes_to_send):
    paths_to_meshes = []
    for mesh in meshes_to_send:
        ## object_path_file = os.path.join(zbrush_dir, "GoZ_ObjectPath.txt")
        object_path_file = "/Users/Shared/Pixologic/GoZBrush/GoZ_ObjectPath.txt"

        f = open(object_path_file, 'w')
        f.write(mesh + "\n")
        f.close()

        object_path_exe = "/Users/Shared/Pixologic/GoZBrush/GoZMakeObjectPath.app/Contents/MacOS/GoZMakeObjectPath"
        subprocess.call(object_path_exe)

        ## object_path_file = os.path.join(zbrush_dir, "GoZ_ObjectPath.txt")
        object_path_file = "/Users/Shared/Pixologic/GoZBrush/GoZ_ObjectPath.txt"
        f = open(object_path_file, 'r')
        for line in f.readlines():
            print line
            paths_to_meshes.append(line)

        f.close()

    return paths_to_meshes

def write_object_path(path_to_meshes):
    # object_path_file = os.path.join(zbrush_dir, "GoZ_ObjectList.txt")
    object_path_file = "/Users/Shared/Pixologic/GoZBrush/GoZ_ObjectList.txt"

    f = open(object_path_file, 'w')
    for path in path_to_meshes:
        f.write(path.replace("\\", "/") + "\n")
    f.close()

def export_subtool(instance):
    meshes_to_send = [instance.parm("tool_name").eval()]

    paths_to_meshes = os.path.join(zbrush_proj_dir, meshes_to_send[0])
    if instance.inputs():
        instance.node("OUT_MESH").parm("sopoutput").set(paths_to_meshes+ ".GoZ")
        instance.node("OUT_MESH").parm("execute").pressButton()

def export(kwargs):
    meshes_to_send = [hou.pwd().parm("tool_name").eval()]

    export_path = hou.pwd().node("OUT_MESH").parm("sopoutput").eval()
    paths_to_meshes = [os.path.join(zbrush_proj_dir, meshes_to_send[0]).replace("\\", "/")]

    write_object_path(paths_to_meshes)
    if hou.pwd().inputs():

        hou.pwd().node("OUT_MESH").parm("sopoutput").set(paths_to_meshes[0] + ".GoZ")
        hou.pwd().node("OUT_MESH").parm("execute").pressButton()

    # object_path_exe = os.path.join(zbrush_dir, "GoZBrushFromApp.exe")
    object_path_exe = "/Users/Shared/Pixologic/GoZBrush/GoZBrushFromApp.app/Contents/MacOS/GoZBrushFromApp"

    subprocess.call(object_path_exe)

The thing is, Zbrush starts after pressing the button, but immediately crashes. I dunno why. *goz files stays in the project folder, I tried to open it directly from Zbrush — same thing, crush. What can be the problem, somehow files are corrupted?

Maya GoZ works perfectly.
User Avatar
Member
27 posts
Joined: May 2015
Offline
I also have problems with GameDev Toolset because I'm a Mac user.

Sadly, there are HDAs what points to an app on file system… they never check (if it's possible in Python, and somehow I think it is) what OS user is running. GameDev Instant Mesh node will never work on Mac (*nix also) machine since it always points to “$HOUDINI_USER_PREF_DIR/Instant Meshes.exe”. And for some reason “/Applications/Instant Meshes.app” nor “/Applications/Instant`/n`Meshes.app” (I actually have no idea how to deal with spaces in filenames, Houdini Help just says to not use is ) doesn't work.

The Python node inside the asset shows this:
Python error: Traceback (most recent call last):
File "", line 38, in 
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

I dunno if it's a problem with old Python system uses, permission issues, file path string, or Instant Mesh itself doesn't support this interaction on Mac. Maybe someone can help.
  • Quick Links