How to paint Rhinoceros FBX from Rino3D to Substance Painter workflow

JAN 2020 WIP update

DEVELOPMENT WORKFLOW FOR RENDERING FROM SURFACE TO MESH

I’m developing a new way of making hard surface modelling for game design and real-time VR.

STEPS For SubD to Substance Painter

  • In Rh6 use _ExtractRenderMesh or in Rh7 convert to _Mesh to reduce triangles
  • In Rh6 (Rh7 WIP is not working because of RH-58198) if you are using Rh7 WIP copy and past the mesh to Rh6.
  • Export the mesh as OBJ and Import it as OBJ. This will fix some weld issues
  • _WeldVertices but not the hard edges
  • Now the is possible to apply boolean operations, UV mapping or export it as FBX

Rhino>Rizom>Rhino>Blender>Rhino>Painter>…

  • Have fun making the 3D model in Rhino as usual.
  • When is finish inspect that there are no flipped surfaces. I use a specific custom display mode done for this task where flipped UV is purple: View Mode: Flipped UV Normals Inspector
  • Put the model in one main Object main layer.
  • Select the surface by materials and make sub-layers for each material. Put the surface you need in each sub-layer (the material).
  • In each sub-layer, assign a material and give it a name.
  • Select the surfaces and joint them to polysurface for each material. Joint them where is possible using: ! _Join
  • Experimental: export to InstaLOD. It will convert to mesh and use to “combine” [ctrl+b] to reduce draw calls (I need to find the equivalent in Rhino). I make LOD here. And reimport to Rhino as mesh.
  • If It is a surface, start making unwrapping for a preliminary texture UV projection mapping for each joining surface. If it is not possible to use one unwrapping technic and you need a different technique for portions of the same polysurface, then extract individual polysurface for each unwrapping:
    You can follow this tutorial: https://www.youtube.com/watch?v=75cQX-iF8YA . When you can’t make a unique type of unwrapping, you can divide the object into a polysurface for each unwrapping technic. But you can not join them later[Bug]: If the projection black wireframe pops up and persists, then delete it and press undo. So if I’m unable to make a good UV mapping, I prefer to join the polysurface to a big polysurface for each material, because converting the multiple polysurface to mesh creates holes between polymeshes. In this case, I make the UV mapping to the mesh and not to the polysurface.
  • Since some UV projection mapping is overlapping you need to separate the overlapping projections. I try to stay inside the UV mapping 0 to 1 space. Using the UV editor I stay inside 00 to 99 space to prevent UI problems. To prevent this bug, I replace the UV mapping texture gride. Take a look of this video: https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/0/b/0b051d7bcc065e9414fc98e3123168969f20dcd0.mp4 Or read this full article: [UVEditor TIP] UV mapping: Replace your UV Grid Texture - #8 by AlanMattano
  • Convert the surface or polysurface into triangles excellent tool ! _Mesh.(and better option is ! _ExtractRenderMesh ) But much better is to create a custom tool polysurface to mesh in Grasshopper for converting into the mesh and inspect triangles smoothness in realtime. Then convert to mesh using Grasshopper HummanUI for inspecting better the final result dynamically and accuracy instead of just using the mesh command. Sceenshot. Since the UV mapping info is missing in the mesh using Grasshopper graph, you need to run Rhino mesh command using the info you get in Grasshopper. If not stay with ! _ExtractRenderMesh. If I use ! _ExtractRenderMesh, and the default render settings setup to quality.
  • Control that the new mesh has the same UV mapping: There is a bug in the UV editor. It does not update properlly. As a solution you can export as FBX and reimport or inspect the FBX UV mapping in Painter.
  • For Tessellation purpose I try to make square quads so that tessellation does not have a zigzag stretch problem. For this, I export the mesh to Blender. I add an edge loop inside the rectangular quad and import it back to Rhino. I use a custom Rhino command button for this.

! -_Export _GeometryOnly=_Yes _SaveTextures=_No _SaveNotes=_No _SaveSmall=_Yes
“X:\path\Blender\mesh.obj”
VertexWelding=Unmodified YUp=Yes enter enter

  • and to import

! -_Import
“X:\path\Blender\mesh.obj”
MapYtoZ=Yes
enter

  • Now is possible to import all the several meshes to RizomUV Real Space to fix UV mapping projection or to make a better UV packing optimization. Real Space guarantees vertex normal preservation. I use a fast export button as a bridge:

! -_Export _GeometryOnly=_Yes _SaveTextures=_No _SaveNotes=_No _SaveSmall=_Yes
“X:\path\Rizom\mesh.obj”
VertexWelding=Unmodified YUp=Yes enter enter

  • And in RizomUV import with UV using the Lua script:

mypath = “X:\path\Rizom\mesh.obj”
ZomLoad({File={Path=mypath, ImportGroups=true, XYZUVW=true, UVWProps=true}})

  • Make the modifications and press control S to save. Then in Rhino use a similar button to import the mesh and UV for final adjustment. Thread: UV MAPPING: RizomUV Rhinoceros3D Bridge workflow (AM Mesh Bridge)

  • Back in Rhino, Inspect that there are no holes open triangle meshes: ! _AlignMeshVertices. Sometimes is necessary to select the points and ! _WeldVertices. I use a specific inspector view mode [WIP]

  • I use to scale in one dimension and move the UV mapping and make a better job manually in Rhino.

  • Sometimes I convert the quads into triangles: ! _TriangulateMesh.

  • Select the triangle polysurface and you need to rotate them having your Y up before exporting.
    I usually do this in Blender. But you need to rotate around X clockwise 90°. Try to use a button command for this so that your workflow is persistence.

  • Export as OBJ or FBX. [The OBJ is for the Blender step; Final UV mapping. The FBX if you go to substance directly]. There is bug in Blender exporting in FBX to Painter. In Blender, for example, you can take out some extra loops and add additional extra loops. This is useful to preserve quads squares where tessellation is necessary (if not there will be a zigzag issue in the tessellation).

  • Open other 3D software, for example, the free one Blender for making the final UV mapping manipulation. Do not make a UV mapping projection because you can lose your custom vertex normal. First, pick the UV mapping and put them out from the center. Then join the meshes (for game developers this will reduce the number of draw calls; If you are using Rizom in some cases it does it for you).

  • Move, scale and pack the mapping island UV. Do not make the UV unwrapping in Blender because you can lose the Rhino custom vertex normal. Add bones, separate the moving parts, animation, etc…

  • [Just in case] I do not remember well if you need to add here the materials.

  • Check and change the correct naming in the mesh and materials (I use Blender).In Painter 2019 you can change the material name there.

  • Since Substance Painter AO is not excellent as an alternative bake the Ambien occlusion in Blender.

  • As an option, make the AO mesh with different materials to bake it later inside Painter.

  • Check that the vertex normals, normal maps, and textures work well.

  • Add one extra empty mesh (this helps Painter) just in case if you want to improve later or change the meshes. Substance Painter does not allow you to change the mesh easily and this fixes that problem.

  • Export the final mesh model from Blender as OBJ. DO NOT USE FBX because it has a bug and vertex normals are not preserved correctly [video explanation] [Bug report]. And now, export the AO texture.

  • Import the OBJ file back into Rhino. This prevents some vertex normal tangent in edges anomaly between Blender and Painter. Or use directly the OBJ into Painter.

! -_Import
“X:\DoNotMove\Rhino-Blender\BlenderToRhino.obj”
MapYtoZ=Yes
enter

  • In Rhino. make the final FBX file. For this back and forward I use a specific Rhino command button:

! -_Export _GeometryOnly=_Yes _SaveTextures=_No _SaveNotes=_No _SaveSmall=_Yes
“X:\DoNotMove\Painter\Mesh.fbx”
ExportNurbsObjectsAs=Mesh ExportMaterialsAs=Phong YUp=No ExportFileAs=Version7Binary enter enter

  • Before starting painting, I import the FBX meshes separately into Painter. It allows backing the AO and saves them to use it later.
  • Import the OBJ or FBX to your render editor (example Unity Unreal) and later,
  • Open from your editor (Unity, Unreal, etc) the Rhino FBX(/OBJ) using the real-time live link extension for Substance Painter. It will import the FBX(/OBJ) automatically. ( Import manually to S. Painter the texture AO).
  • In Painter bake the starting AO and other information of the 3D model or import it (I use 4K).
  • Have fun painting…
  • Use the dynamic live-link exporter to visualize the final result in real-time. I use Iray to make renders.
  • Export the textures to Rhino or else.
  • When the model and textures are finished, remember to put them into your main Library folder as a final object with a shortcut link to your full project. I learn to have the main library from Syd Mead, bye-bye Master!
1 Like