Home Technical Talk

3ds max : caping scan 3d holes

greentooth
Offline / Send Message
Noors greentooth
lo guys.
How would you go to create quickly a triangulated topology homogeneous with the rest of the scan in term of density, in place of that big ngon ?

scan_cap.jpg

Actually i kinda do it manually with some tesselate and pro-optimizer. Maybe are there dedicated tools to fix 3d scans ?

Thankyous

Replies

  • Mark Dygert
    Options
    Offline / Send Message
    Actually i kinda do it manually with some tesselate and pro-optimizer.
    That's how I would do it. *shrug*
    I would probably detach that n-gon and tessellate/optimize it with protect boarders turned on then weld it back into place. Unless pro-optimize works on a selection of tris instead of the whole mess, if it does then forget about detaching it.

    There might be some scripting mastermind out there that could automate that process to some degree? Given its based on triangles it would be easier to do than on quads.

    In an ideal world this feature would have a sculptris style optimize brush where you can subdivide the area only under the brush, then use optimize to click from the outer area to the inner area to get them to match a little better.

    humm... I guess you could use sculptris but that's a bit a long work around and probably a bit dodgy.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Ty. Yeah i don't think sculptris will do.
    I might have a look at Meshlab when not in the hurry. This is just for a POC but i have to think for a full project with thousands of corrupted geometries ^^
  • Mark Dygert
    Options
    Offline / Send Message
    I daisy chained some commands together into a script that MIGHT help with automate the manual process a bit. It isn't anything too complex and there might be better, more advanced ways to generate the needed topology but this should get close to the same results you're getting manually.

    When executed it does the following:
    • Selects ngons with more than 3 sides
    • meshsmooths the selected faces
    • proOptmizes
    • and sets everything to smoothing group1
    You'll probably want to turn on the paint deform and relax some of the verts around the edges they tend to bunch up.

    CapHoles.gif
    try ( [COLOR=DarkOliveGreen]--makes all of the actions undo-able[/COLOR]
        modPanel.addModToSelection (Edit_Poly ()) ui:on [COLOR=Teal][COLOR=DarkOliveGreen]--apply edit poly modifier[/COLOR][/COLOR]
        subObjectLevel = 4 [COLOR=DarkOliveGreen]--switch to polygon subobject mode[/COLOR]
        PolyToolsSelect.NumericFace 3 3 false [COLOR=Teal][COLOR=DarkOliveGreen]--select polygons with > 3[/COLOR] [/COLOR][COLOR=DarkOliveGreen]sides[/COLOR]
    
    [COLOR=DarkOliveGreen]    --meshsmooth only the ngons[/COLOR]
        $.modifiers[#Edit_Poly].SetOperation #MeshSmooth
        $.modifiers[#Edit_Poly].smoothness = 1
        $.modifiers[#Edit_Poly].separateByMaterial = off
        $.modifiers[#Edit_Poly].separateBySmoothing = off
        $.modifiers[#Edit_Poly].CommitAndRepeat ()[COLOR=DarkOliveGreen]--meshsmooth it one more time[/COLOR]
    
    [COLOR=DarkOliveGreen]    --proOptimize[/COLOR]
        modPanel.addModToSelection (ProOptimizer ()) ui:on [COLOR=DarkOliveGreen]--apply proOptimizer [/COLOR]
        $.modifiers[#ProOptimizer].OptimizationMode = 1 [COLOR=DarkOliveGreen]--turn on Protect Boarders[/COLOR]
        $.modifiers[#ProOptimizer].Calculate = on[COLOR=DarkOliveGreen] --turn on Calculate[/COLOR]
        $.modifiers[#ProOptimizer].VertexPercent = [COLOR=Red]50[/COLOR] [COLOR=DarkOliveGreen]--set Optimization Level to 50%[/COLOR] 
        subobjectLevel = 0 [COLOR=DarkOliveGreen]-- exit subobject mode[/COLOR]
    
    [COLOR=DarkOliveGreen]    --Deselect and set smoothing groups to 1[/COLOR]
        modPanel.addModToSelection (Poly_Select ()) ui:on [COLOR=DarkOliveGreen]--deselect polys[/COLOR] 
        modPanel.addModToSelection (smooth ()) ui:on [COLOR=DarkOliveGreen]--apply Smooth modifier[/COLOR]
        $.modifiers[#Smooth].smoothingBits = 1 [COLOR=DarkOliveGreen]--set everything to smoothing group 1[/COLOR]
      
    )
    catch ()
    
    I'm not sure how familiar you are with maxscript but you can set a lot of the properties to whatever you think works best.

    To run the script you can go Main Menu > MaxScript > Run Script
    Or...
    Open the script in the MaxScript Editor and press ctrl-E to evaluate and run it. From the editor you can also highlight the script and drag it into the toolbar to make a button.
  • Zpanzer
    Options
    Offline / Send Message
    Zpanzer polycounter lvl 8
    I would do it this way:

    1. Export hole edge as a spline
    2. Select the spline and apply a 'Garment Maker' modifier
    3. Adjust density until the resolution fits.
    4. Attach to mesh and weld at a somewhat big weld threshold.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Oh i didn't notice i had new answers. Thank yous <3

    Sadly the garment maker only works for flat surfaces.

    hey thanks for your time Mark. Yeah i'm fine with basic stuff in maxscript. In fact, i don't want to modify any of the existing geometry so I might cook up something with holes as splines, the quadify modifier and a bit of watyadid.
  • xXm0RpH3usXx
    Options
    Offline / Send Message
    xXm0RpH3usXx polycounter lvl 13
    well.. max isnt built for handling stuff like this nativly, so maybe it would be a good thought to look into Meshlab aswell?

    if u want to stay in max, go with mark, i think thats the best you can do.
    maybe chamfer the vertex in the middle?
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Zpanzer wrote: »
    I would do it this way:

    1. Export hole edge as a spline
    2. Select the spline and apply a 'Garment Maker' modifier
    3. Adjust density until the resolution fits.
    4. Attach to mesh and weld at a somewhat big weld threshold.

    +1 for this method.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    doesnt meshmixer have dedicated tools for fixing holes in scans?

    http://www.youtube.com/watch?v=VV0wJGovQwM&feature=player_embedded#t=80s
Sign In or Register to comment.