1. #1
    New Member Follow User Gallery
    Join Date
    Oct 2015
    Location
    London
    Posts
    5

    Default Request: ZBrush -> VRmesh Format

    Hello Everyone,

    I've just seen a very small tool which would be the most insanely useful thing to have in ZBrush.

    Vlado at Chaosgroup has written a VRMesh exporter for Mudbox, it takes a lower subdivision level as the preview mesh and allows textures to be baked into the vertex color channels. This will cut out a huge portion of our workflow and make working with high resolution models painless and really easy to go from ZBrush to Max/Maya and render with VRay. And with the vertex color channel workflow we don't even need to save the textures out.

    At the moment exporting Displacement maps and getting them to displace correctly always seems to be some-what of a lottery and can eat RAM, so we normally export the full high-resolution models, import into 3dsmax and then convert to VRayProxy, which takes a little while and doesn't automatically create a preview model that is representative of the final mesh. The voxelised VrayProxy mesh is incredibly efficient to use for rendering with it dynamically loading data in when needed.

    I'm sure we could probably make a script which would export OBJ/PLY/FBX and then run the VRay Obj_to_VRmesh utility but for the sake of simplicity this would be a wonderful thing to have!

    Upon seeing the Mudbox version, lots of us are instantly asking for a ZBrush version but Vlado says he doesn't have API access to create this. can we find a way to help him? It would cut a hugely time-consuming portion of our workflow out and enable us to use ZBrush on more projects as it would be simpler to work with these amazing meshes we can make. We've just finally bought a site license here at www.TaylorJames.com and I would really like to see Zbrush used on every high resolution print job we do.


    thanks

    Dave

  2. #2
    New Member Follow User Gallery
    Join Date
    Oct 2015
    Location
    London
    Posts
    5

    Default

    Here's a video showing how this works going into Maya, but it's exactly the same across 3dsmax/Modo/etc....


  3. #3
    New Member Follow User Gallery
    Join Date
    May 2012
    Location
    Hollywood, CA
    Posts
    7

    Default

    Wow, yes please! This would be amazing

  4. #4
    New Member Follow User Gallery
    Join Date
    May 2004
    Location
    Jpn
    Age
    42
    Posts
    28

    Thumbs up

    Please to come true! 
    ---------------
    ZBrush 4R7, Windows7 64bit, 16gb RAM, Core i7, Geforce GTX 460.

  5. #5
    New Member Follow User Gallery
    Join Date
    Mar 2010
    Location
    Aarhus, Denmark
    Posts
    14

    Default

    Give it here! now, please!

  6. #6
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    43
    Posts
    2,561

    Default

    Hi Dave,

    Do you happen to know what the file format looks like and what it describes? Is it a point cloud 3D format or an efficient way to describe polygons and textures for the V-Ray renderer? I have never used V-Ray.

    Also, is there a link to the OBJ_to_VRMesh utility or were you just describing a possible solution.

    I could not find a file format description for .vrmesh. Perhaps it is part of the V-Ray SDK?
    Mark

  7. #7

    Default Great

    great feature! it is interesting to see how this works with textures.

  8. #8
    New Member Follow User Gallery
    Join Date
    Oct 2015
    Location
    London
    Posts
    5

    Default

    Hi Mark

    Yes it is part of the VRay SDK, all the information you might need is with the VRay installation. You can get this even from the demo, just download it from www.chaosgroup.com

    Then you will find links to the SDK documentation in the Program Files Menu...

    It's then stored locally on your computer such as...
    C:/Program%20Files/Chaos%20Group/V-Ray/3dsmax%202014%20for%20x64/docs/vrmesh_format.html

    It describes in detail, the format of the header, voxel table, voxel data and channel information with illustrated guides to how voxels are stored and example vrmesh data.

    The obj2vrmesh exe is also included with the demo version: Running it from the command line with no arguments will give you the following information. Making a script which uses this to convert an exported OBJ file should be easy enough! Does the PLY format keep the vertex color channel information?


    Converter of .ply .obj .bin .geo .abc and .vrscene files to .vrmesh files
    Copyright (C) 2003-2015 by Chaos Group Ltd. All rights reserved.
    Build from May 22 2015


    Usage:
    ply2vrmesh [] [options]
    or
    ply2vrmesh -info [options]


    Arguments:
    - .ply .obj .bin .geo (.hclassic) or .bgeo (.bhclassic) .abc
    .prt or .vrscene file name. The string may include wildcard
    s.


    - .vrmesh file name (extension must be specified). This
    string may not include wildcards. If this is not specified
    then the output is a file with the same name, but with the
    .vrmesh extension. If multiple input files are specified
    and is missing, then each input file will be
    written to a separate .vrmesh file. If multiple input
    files are specified and is also specified,
    all input files are sorted in lexical order and
    concatenated into one animated .vrmesh file.


    Options:
    -append - appends the information as a new frame to the .vrmesh file


    -smoothNormals - generates smooth vertex normals. Only valid for .obj and
    .geo files; always enabled for .bin files


    -smoothAngle - a floating point number that specifies the angle (in
    degrees) used to distinguish if the normals should be
    smoothed or not. If present it automatically enables the
    -smoothNormals flag.


    -flipNormals - reverses the face/vertex normals. Only valid for .obj,
    .geo, .bin and .abc files


    -flipVertexNormals - reverses the vertex normals. Only valid for .obj, .geo,
    .bin and .abc files


    -flipFaceNormals - reverses the face normals. Only valid for .obj, .geo,
    .bin and .abc files


    -flipYZ - swap y/z axes. Needed for some programs i.e. Poser,
    ZBrush. Valid for .ply, .obj, .geo and .bin files.


    -flipYPosZ - same as -flipYZ but does not reverse the sign of the z
    coordinate.


    -flipXPosZ - same as -flipYPosZ but swaps x/z axes.


    -mapChannel - stores the UVW coordinates to the specified mapping
    channel (default is 1). Only valid for .obj and .geo
    files. When exporting a mesh that will be used in Maya,
    currently this must be set to 0 or the textures on the
    mesh will not render properly


    -disableColorSetPacking - only valid for .geo and .bgeo files; disables the
    packing of float1 and float2 attributes in vertex color
    sets.


    -materialIDs - only valid for .geo and .bgeo files; assigns material IDs
    based on the primitive groups in the file.
    -materialIDs_splitGroups - only valid for .geo and .bgeo files; assigns materi
    al IDs
    based on the primitive groups. These groups are split into
    different voxels/meshes and appear in visibility lists.


    -sortMaterialIDs - only valid for .geo and .bgeo files; sorts the list of
    material IDs by the group name. Otherwise they are in
    the same order as they appear in the .geo/.bgeo file.


    -fps - a floating-point number that specifies the frames per
    second at which a .geo or .bin file is exported, so that
    vertex velocities can be scaled accordingly. The default
    is 24.0


    -previewFaces - specifies the maximum number of faces in the
    .vrmesh preview information. Default is 9973 faces.


    -previewType - specifies the method used to generate a preview.
    clustering - works very fast, but is less accurate
    edge_collapse - slower, but produces the best results
    combined - fast, produces slightly better results than clus
    tering
    face_sampling - copies triangles from the original
    (very fast, but leaves a disconnected mesh)


    -facesPerVoxel - specifies the maximum number of faces per voxel
    in the resulting .vrmesh file. Default is 10000 faces.


    -previewHairs - specifies the maximum number of hairs in the
    .vrmesh preview information. Default is 500 hairs.


    -segmentsPerVoxel - specifies maximum segments per voxel
    in the resulting .vrmesh file. Default is 64000 hairs.


    -hairWidthMultiplier - specifies the multiplier to scale
    hair widths in the resulting .vrmesh file. Default is 1.0.


    -previewParticles - specifies the maximum number of particles
    in the .vrmesh preview information. Default is 20000
    particles.


    -particlesPerVoxel - specifies maximum particles per voxel
    in the resulting .vrmesh file. Default is 64000 particles.


    -particleWidthMultiplier - specifies the multiplier to scale
    particles in the resulting .vrmesh file. Default is 1.0.


    -mergeVoxels - merge objects before voxelization to reduce
    overlapping voxels


    -velocityAttrName - specifies the name of the point attribute which
    should be used to generate the velocity channel. By
    default the 'v' attribute is used.


    -pointSize - if specified, turns on point cloud generation and
    specifies the smallest size of the points. Default is
    0.0 (point cloud generation is disabled).


    -velocityOffset - specifies that the starting position should be
    offset by a fraction of the velocity channel, f.e. -0.25.
    Only valid for .geo, .bgeo and .bin files.


    -mergeFiles - merges all input files into one .vrmesh file.
    Input files are specified using wildcard.
    Output file (with .vrmesh extension) must be specified.


    Alembic subdivision specific:
    -subdivideAllMeshes - subdivide all alembic polygonal meshes,
    not only subdivision objects.


    -subdivisionLevel - alembic subdivision level.


    -subdivideUVs - specifies the subdivision of the mapping channels.
    Value 0 to skip map channel subdivision and 1 to apply it.


    -preserveGeomBorders - skip the subdivision for all geometry borders.


    -preserveMapBordersMode - preserve map borders mode.
    Mode "none" to subdivide all map borders.
    Mode "internal" to preserve internal borders.
    Mode "all" to preserve all map borders.


    *.vrscene specific:


    -vrsceneList - Show a list of available Nodes in the .vrscene file.


    -vrsceneNodeName - Node name inside the .vrscene file.
    Must be specified!


    -vrsceneApplyTm - Apply Node transform matrix to the mesh.


    -vrsceneVelocity - Generate velocity channel (used for motion blur).


    -vrsceneFrames start-end - Export animation range.


    Generic:


    -info - show information about the specified .vrmesh file


    -frame - exports particular frame from the specified file.
    Combined with -info option it shows information about the
    specified frame from the .vrmesh file. Indices are 0-based.


    If this option is not specified, information is printed
    for each frame in the file.


    -oneFramePerFile - exports each frame in separate file.


    -padding - frame padding number between 1 and 10. Default is 4.




    C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\tools>

  9. #9
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    43
    Posts
    2,561

    Default

    Hi Dave,

    I registered on the Chaos Group website but could not download the SDK; it just did not show up when selected (I am on Mac btw). I think I will have to wait until I get back to my Windows machine.

    From watching the 'Mudbox to vray' video you linked I am guessing you would like similar options for the VRMesh export as those shown in the video? Because there are a lot of options in the command line tool

    Performing the simplest export of multiple subtools into a single .vrmesh file should definitely be possible. Being able to include polypaint might be tricky. ZBrush does export vertex colors into the .obj file format, but they are outside the Wavefront .obj specification and thus up to the interpreter to add support for.

    Does the PLY format keep the vertex color channel information
    It is supported, yes. The PLY format plugin Marcus wrote includes vertex coloring.
    Mark

  10. #10
    New Member Follow User Gallery
    Join Date
    Oct 2015
    Location
    London
    Posts
    5

    Default

    How did Marcus write the PLY exporter? Surely everything he did there he could also do for the VRMesh format if he had the specification?

    What DCC app do you have? Maya? You should be able to have a VRay demo on that. The SDK isn't a separate download it's included in the main installation.

    email support@chaosgroup.com and ask them about it, if you're saving Vlado the hassle of writing his own I'm sure they'll sort something out.

  11. #11
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    43
    Posts
    2,561

    Default

    What DCC app do you have? Maya? You should be able to have a VRay demo on that. The SDK isn't a separate download it's included in the main installation.
    I use Modo, but although the Modo demo is listed as a download, no link appears. I also tried the V-Ray standalone demo on my Windows machine and though it does create a shortcut to the ply2vrmesh command line tool, it does not exist. I searched high and low but it is not there. Maybe it is not included in the demo?

    It does not really matter anyway. After looking at the command line options you posted, they should be enough for me to write something simple that Vlado can expand upon.

    However, the plugin would be based on .obj export from ZBrush. In order to support polypaint the ply2vrmesh command line tool would need to add support for the vertex coloring that ZBrush adds to the exported .obj (the 'documentation' is included in each .obj file with vertex colors).

    How did Marcus write the PLY exporter? Surely everything he did there he could also do for the VRMesh format if he had the specification?
    I am pretty sure he exported as .obj first and parsed the file with a plugin he wrote (.dll/.lib). Yes, Marcus would most definitely be able to do the same thing that I was thinking of with the .ply format and much better. But he would end up supporting two .ply exporters instead of one. In any case that would be more of a Chaos Group - Pixologic discussion as Marcus works for Pixologic.
    Mark

  12. #12
    New Member Follow User Gallery
    Join Date
    Oct 2015
    Location
    London
    Posts
    5

    Default

    Another video showing how the vertex colour channel works.



    @TVeyes - Email support@Chaosgroup.com and tell them what you want to do and ask them for the exe.

  13. #13

    Default

    thanx for sharing the video

  14. #14
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    43
    Posts
    2,561

    Default

    Hi Dave,

    I am afraid I have some some bad news. My trusty 8 core Xeon PC died before I could even begin writing the VRMesh Export ZScript. It is either the motherboard or both CPUs that have met an untimely end (well, I bought it in 2006-2007). Rest in peace you big black noisy box

    But I also have some good news.

    The VRMesh Export ZScript is nearly finished ... hurray! I have primarily been working on the ZScript for OS X, but this evening I installed Windows and ZBrush on a VirtualBox and now also have a working .vrmesh export for Windows. There is still a fair amount of ZScript to add, more testing to do and much polish to apply. All depending on how much spare time I get in the next couple of days, I should have a first version of the ZScript ready for testing during the weekend.

    I have uploaded the first ZBrush to VRMesh file >>here<<. It is simply the DemoSoldier model included with ZBrush and exported with the ply2vrmesh -flipYZ parameter. Hopefully it looks as it does in ZBrush as I cannot test it right now (I only have Modo and that is not on the demo download list on Chaos Group's website). I hope it works.

    Going forward it would be interesting to know which programs can load a .vrmesh file from the command line. Could you, for example, do a 'maya.exe myZBrushExport.vrmesh' or something similar?

    In case you are wondering how I got the ply2vrmesh executable; I did not contact Chaos Group but tried a final demo download. The V-Ray for Maya demo includes the ply2vrmesh executable but all the other demos I tried did not.


    Take care,
    Mark

  15. #15
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    43
    Posts
    2,561

    Default

    Does anyone have any experience with the ply2vrmesh command line tool?

    I've run into a problem on OS X where I cannot export multiple .OBJs to a single .vrmesh. On Windows you can use a wildcard to merge the .OBJs into a single .vrmesh, like so:

    ply2mesh *.obj MyExported.vrmesh

    But on OS X it fails due to unrecognised arguments. If there are 3 or more .obj files the unrecognised argument is the third .obj. If there are 2 .obj files the unrecognised argument is the output file, MyExported.vrmesh. If there is only 1 .obj file it works !

    It seems like a bug in the ply2vrmesh tool on OS X or perhaps there is another way to format the command? The -mergeFiles option has no effect. Any ideas?
    Mark

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •