New to the forums? Click here to read the How To guide. -- Developers click here.

Medium - Export Pipeline guide



  • Sterling77Sterling77 Posts: 491 Poster of the Week

    Sorry to see you have had so much trouble - have a look at my tutorial on centering and zeroing model for export. 
  • ClampinatorClampinator Posts: 15
    Thanks Sterling. That was very interesting, and a cool look at your sculpture style.
    However I may have missed where you showed how to center the sculpt for translation, rotation and scale in all axis, such that it matches *exactly* the location, rotation and scale of the imported reference mesh.
    This is vital for reprojection in Reality Capture.

    I think I have the workflow now if I just *never* touch the clay layer itself (except perhaps to change the rez or material), and make sure I do all my manipulation of the sculpt using the parent sculpt layer.

    This seems to have proven to be the way to go... I guess I'm hoping for confirmation on that idea, or a better way (perhaps to completely reset the transforms?) if there is one.
  • Sterling77Sterling77 Posts: 491 Poster of the Week
    So do you have to leave the ref mesh TSR in its original position for reality capture. Did you look the 4 part series on YouTube I made it does cover zeroing and keeping things intact for export. Usually you center the ref mesh to zero and work from there. If you import the ref mesh an leave the oringinal position ( don't grip scale or move through space ) - work away at cleanup and then when finished center sculpt to lathe > export 

    if if you want send me an FR and chat more on messenger :) 
  • ClampinatorClampinator Posts: 15
    Yeah, there came a point the other day where I just didn't transform the clay at all besides a single 5x scale increase, and then walked around it (and stood on a chair) to smooth the capture out for decimation and reprojection.
    It was while I was on the chair that I realised I was doing it wrong.
    Your video above where you keep zeroing out the sculpt rotation, and then the world rotation, and then find that the sculpt rotation has changed (adopted the world's previous settings) and then you zero those out and now the world rotations are back...! Made me wanna cry. I had the same issue.
    I can not say I understand how this all works yet. Only that I *think* I have a workflow now.
    I do feel I'm very much working around Medium though- not working with it. Not yet anyway.
  • Sterling77Sterling77 Posts: 491 Poster of the Week
    Yea technical 3d artists think in terms of TSR but mediums overall marketing is jump in and sculpt - it all falls over when you want to get the model out with some sane orientation :smile: VR gets a bit over whelming with too much UI so I think the balance is still present in medium. Hopefully in the next update medium gets tightened up. 
  • ClampinatorClampinator Posts: 15
    I've been working in 3D for over 25 years, so Medium is a welcome addition to my toolkit. 
    I never thought it would be such a struggle to get a simple reference import / export workflow running though. Still, I think I have it now.
  • Sterling77Sterling77 Posts: 491 Poster of the Week
    Haha try importing a model from Maya to Houdini lol cm to meters etc makes Maya look a little embarrassed. 
  • ClampinatorClampinator Posts: 15
    I worked in Max, so the Maya weirdness is unknown to me. I've heard stories. Max is no picnic either. Unit rounding errors...
  • JPBensonJPBenson Posts: 15
    could someone break down this workflow and ELI5? I understand that you need to zero out some scales and orientation, but which layers/objects and in what order? A very short youtube video where 1 edit to the sculpt is made (but the size and orientation are manipulated) would be really helpful. I feel like I am just guessing and it's taking a lot of time (so far many hours spent with trial and error and no good results).
  • ClampinatorClampinator Posts: 15
    Here's what I do.
    I use Reality Capture to make my source mesh. This mesh is usually really huge. Many tris.
    I then export it at full size.

    Now I go to Medium, and I open it fresh. If you had a previous scene open, close Medium and re-launch it.
    The first button I press is Import Mesh. Takes a minute, but once it's in there TOUCH NOTHING. By this I mean don't move, scale, rotate anything. Leave it alone till we're done making the clay version how we need it.
    Now press "Copy to Clay" or whatever it says.

    This will make a blobby, low-rez Medium clay version of your imported source mesh. Again, TOUCH NOTHING. Do NOT move it even a little bit. You can do that later. Hide the reference mesh layer.

    Select the layer that the clay is on. Not the root Sculpt layer or the reference mesh layer. You should see (if you use the down menu on the left stick) an option to increase the resolution. Do this a few times. You're shrinking the voxel cage, increasing the density of the voxels each time. You might notice the black cube around the outside of the scene get smaller each time. This is what you want. Do this a few times. I find myself doing it a bit too much, but I like working with a high-resolution clay and this is how you get it.

    Once you're happy with the size of the voxel cage, get up your Clay brush, set it on erase and erase the entire clay. Manually. Delete it all. 

    What we've done now is created an empty, very dense voxel cage in the exact location and size you want it.

    Now unhide the reference mesh layer. Your reference mesh should be visible, with a thin black cube around it. How tight that cube is around the mesh is up to you. Mine is generally quite close. Though this does slow things down. If you want it to go faster, don't increase the resolution so much. Practice this a few times. You'll find the settings you like.

    Select the reference mesh layer, and make Copy to Clay again. This will take a while, depending on how much you increased the density of the voxel cage. What you're doing is creating a very high resolution version of your reference mesh, but in Medium clay. TOUCH NOTHING. Make sure you're not moving the reference mesh OR the clay layer. EVER. This is super important.

    The result will be a very accurate reproduction of your reference mesh, but now you can get to work.

    Once you can see your clay copy, select the Sculpt layer. This is the ONLY layer you will work in. You can manipulate the model as much as you like, as long as you're only doing it to the Sculpt layer.

    Do your thing. Smooth, fill in holes and whatever. You can move, rotate and scale all day long, using only the Sculpt layer.

    If you want to see the clay without the textures, select the clay layer and manipulate the material settings. One of them turns the object white. Very helpful for finding flaws in the model for filling or smoothing.

    Make sure you don't move, rotate or scale the clay layer from the clay layer. Do that only from the Sculpt layer.

    Once you're done, you're ready to export.

    If you've not done anything wrong, when you unhide the reference mesh layer, it will be in the exact same location as the clay object still. I check this every few minutes to make sure I've not messed up. It happens. When it does, I often just start over. Cause the save function is just slightly too slow, and I'm lazy.

    Go to export. Pick your settings. If you're going to take this back to Reality Capture (which I do each time) you'll want to decimate a LOT. Reality Capture can take hours to import a high-rez reference mesh. Like 6 hours. If you decimate it in Medium down to like 15,000 tris, it only takes seconds.

    Here's the tricky bit.
    Once you've exported, go to the place where you exported the mesh from Reality Capture. There's going to be a file with the same name as the .obj file you exported from RC, but the extension will be ***.obj.rcinfo

    Copy this and paste it back into explorer. This will make a copy you can edit. Edit the name to be the same as the name of the .obj you exported from Medium, but keep the .obj.rcinfo bit at the end.

    Reality Capture should import your smoothed mesh now, and if you've not moved the clay layer in Medium, it will come in at the exact location if your original source mesh in RC.

    Then I just press the texture button in RC. This re-projects the original textures back on to the imported mesh. As RC's UVs are much better than Medium's, you'll get a nice low-poly mesh with decent UVs. You can tweak the texture size and tri count more in RC if you want. Point is you have a clean, smooth mesh with re-projection, and you didn't need a 3D app like Blender to do it.

    If Medium allowed us to export unlit textures, that last stage would not be necessary. _shrug_ In fact the whole "don't touch it" thing wouldn't be necessary.

    Anyway, now you can export an unlit, clean model from RC.

    It took me 3 days to work this out.
  • Sterling77Sterling77 Posts: 491 Poster of the Week
    It's sad that whole workflow is so convoluted :) 
  • ClampinatorClampinator Posts: 15
    There's an additional step if you want the cleaned mesh to be animatable. I don't need that, so I don't bother. But making it animatable is a whole other thing with more programs and more steps.
  • JPBensonJPBenson Posts: 15
    These steps worked flawlessly! I dont use RC but regardless, I was able to import the model into my tool! This is the workflow I am going to go with. Thank you so much for this @Clampinator! you saved me countless hours! I can finally sculpt!

  • jessicazetajessicazeta Posts: 139 Oculus Staff
    Thanks @Clampinator and @Sterling77 for walking us through your process and all the tips! We're noting these painpoints. Glad this is a pinned post!
  • ClampinatorClampinator Posts: 15
    Happy to help.
    @jessicazeta, if you folks would accept a feature request... an "Unlit Textures" tickbox in the export panel would be amazing. Just don't apply whatever lighting voodoo you use, and let us keep the original untouched textures.

    We can talk about your UVs later. :)
  • tolitttolitt Posts: 3
    How to export poly mesh and sculpting layer? 
    When exporting, only the sculpting layer is saved

Sign In or Register to comment.