Home Technical Talk

3ds Max 2010: Triangulate selected faces?

Cubik
polycounter lvl 18
Offline / Send Message
Cubik polycounter lvl 18
Haven't used max in ages, is this even possible? Can't find any modifiers or anything hidden in edit poly that does the trick.

Replies

  • rumblesushi
    Options
    Offline / Send Message
    As far as I know, you can either select all verts within editable poly, and click connect, or do turn to poly, and limit the number of verts to 3.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    aFaces = (polyOp.getFaceSelection $) as array
    
    for currentFace in aFaces do
    (
    	aVerts = polyOp.getFaceVerts $ currentFace
    	polyop.setVertSelection $ aVerts
    	$.connectVertices()
    )
    

    drag and drop this onto your UI and name the button, This will only work on editable poly objects. Its more accurate than converting the face selection to verts as it doesnt triangulate extra border faces
  • Cubik
    Options
    Offline / Send Message
    Cubik polycounter lvl 18
    I have tried this and it generates faces all over the place. What I am after is something that follows Maxs invisible triangulation. I would like avoid triangulating the entire model.

    coonect.jpg
  • Adam L. Gray
    Options
    Offline / Send Message
    say, export that part of the model as a obj with faces set to triangles, then import it back in and weld it in place? =)
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    did this happen with the script?? I only wrote it in 2 seconds but it should work on a per face basis and definatelty not do what your images shows.

    Tiros: much easier to just convert to an editable patch model and back again, that will triangulate it
  • rumblesushi
    Options
    Offline / Send Message
    That's weird. I've tried manually triangulating a model using connect verts, and it did just use follow the same pattern as the internal triangulation. No nonsense like your image on the right.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Well the problem with the example shown here is that the polygon on the right has a valid edge connection path between all 3 vertices on the right. If you use connect it will always connect those.

    Although looking at the script that was posted, it should work, since it should only process each selected face one at a time...
  • Cubik
    Options
    Offline / Send Message
    Cubik polycounter lvl 18
    Haven't tried the script, will do that tommorow, thanks!
  • Mr. Bean
    Options
    Offline / Send Message
    The way I do it is simply:

    Right click on the editable poly and convert it to an editable patch.

    I don't use 2010, but I think it should still work.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Mr. Bean: I believe the point of the thread was to "triangulate selected faces" only, not triangulate the whole object.
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    Uhh...
    Convert the object to patch and then convert back to poly.
  • Mr. Bean
    Options
    Offline / Send Message
    MoP wrote: »
    Mr. Bean: I believe the point of the thread was to "triangulate selected faces" only, not triangulate the whole object.

    Ah, you're right. I guess you could detach the polys and convert that object to an editable patch and back to editable poly, then reattach, but I'm guessing that wouldn't be very efficient.
  • Sage
    Options
    Offline / Send Message
    Sage polycounter lvl 19
    Connect works fine, just select the two verts where you want the edge to appear, that's how I do it. You can also do like in Maya with the cut tool. If you look at other macros that max ships with you mimic the formatting of the header you can find it under customize and add a shortcut it. I think there are scripts that triangulate the model too.
  • Cubik
    Options
    Offline / Send Message
    Cubik polycounter lvl 18
    Yeah sorry guys I wasn't very clear, I'm needed to do this on a ton of objects so while things like selecting vertex pairs and connecting works it just took to much time.
    Converting to patch triangulates the whole object, what might be unclear was that I wanted only the selected faces to be triangulated.

    Sage: Ok, I will take a look.

    Howeever, r_fletch_rs script seems to work just the way I needed it to, thanks man!
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Cubik wrote: »

    Howeever, r_fletch_rs script seems to work just the way I needed it to, thanks man!

    very welcome, if you need to do this to a long list of objects the script could handle that aswell. Select your faces in each object select them all and run this. I havent tested the new bit (on a mac so no max) but its simple stuff so it should work

    for obj in selection do
    (
    aFaces = (polyOp.getFaceSelection obj) as array
    
    for currentFace in aFaces do
    (
        aVerts = polyOp.getFaceVerts obj currentFace
        polyop.setVertSelection obj aVerts
        obj.connectVertices()
    )
    )
    
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    Sorry to revive this ancient thread, but after having found this script through the forum search a while ago, and it having saved me at least a couple of hours of tedious work, i figured maybe i could point out some deficiencies.

    on to the pics!


    Example I works fine. Example II works fine except for the faces adjacent to the vertex lying flat on an edge with other vertices. Is there any way to check for such "coplanar" verts (for lack of better words) before executing the connectvertices command which goes by shortest edge distance i assume..?

    triangulationscriptrfle.jpg
    Uploaded with ImageShack.us
Sign In or Register to comment.