Add divisions


#1

Hi there, see attached image I have mocked up… moving for Softimage to Maya…

How do I add divisions easily like the image on the right… ? The add divisions function in Softimage was great to divide something up evenly like this and or the Bevel plus tool also had controls to subdivide the new faces based on area etc. Maya’s one works fine for like nice quads but how to quickly subdivide some thing like this. Is there something I am missing? This is buggin me!

Thanks a mill for any pointers.


#2

Cut faces tool does the basics… so I can divide, in a global grid fashion, but it’s one by one… don’t think it can be scripted as it doesn’t hold the face selection… or the face ids keep changing obviously. … hmmm must be a few ways to do this.


#3

Try using Edit Mesh —} Add Divisions. Select whichever faces you want and add divisions/subdivide them.


#4

Thanks, that works great and as expected but I’m looking for a way to do Global/Grid type subdivision on the underlying object. So for example add divisions to a 20 vertex n-gon like the example above will divide weirdly across the face…
In Maya Cut faces tool does the job exactly, but I want it to cut and divide multiple times…

Another way is projecting curves and using them to divide, but this seems to work on a full mesh and not on selected faces…


#5

In softimage it’s called Dice polygons op


#6

So I’m going to write a script for this…
I can do it with polyCut and iterate… or I can do it for an object by making planes and using
a difference boolean to grid divide an object.

The polyCut has the advantage of operating on a selected face.

Perhaps I will come across another way also!
Thanks.


#7

I really can’t remember where I got this from so I hope whoever wrote it doesn’t mind me posting it.

Set the number of divisions with the top three variables. Only cut one axis at a time (face selections aren’t updated between axis cuts, you could add that if you wanted). It’ll get you started regardless.

Best,
Ian


    int $x = 0;
    int $y = 0;
    int $z = 10;
    
    string $selectedObjects[ ] = `ls -sl`; 

	float $bbox[]=`exactWorldBoundingBox $selectedObjects[0]`;

	
	if ($x > 0) {
	 $xlo= $bbox[0];
	$xhi=$bbox[3];
	$xstep = ($xhi-$xlo)/$x;
	for ($i=0;$i<$x;$i++)
		polyCut -pc ($xlo+$i*$xstep) 0 0 -ro -180 -90 0 -ps 1 2 $selectedObjects[0];
	}
	
	if ($y > 0) {
	$ylo= $bbox[1];
	$yhi=$bbox[4];
	$ystep = ($yhi-$ylo)/$y;
	for ($i=0;$i<$y;$i++)
		polyCut -pc  0 ($ylo+$i*$ystep) 0 -ro -90 0 0 -ps 1 2 $selectedObjects[0];
	}
	
	if ($z > 0) {
	$zlo= $bbox[2];
	$zhi=$bbox[5];
	$zstep = ($zhi-$zlo)/$z;
	for ($i=0;$i<$z;$i++)
		polyCut -pc  0 0 ($zlo+$i*$zstep) -ro 0 0 0 -ps 1 2 $selectedObjects[0];
	}


#8

Ha thanks Ian,
I literally have the Maya command page open (exactWorldBoundingBox)!!
Much appreciated…

I raised the issue on Maya beta forums too… see attached, other subdivision methods are more suitable for say faces generated when extruding text. (The image shows Softimage text with a choice of Delunay divisions on the front face - super to prep extrusions for deformation.)

Will have a tinker around.


#9

Yes I saw your post on the beta forums.

Delunay is cool, I hope we see it in a future version of Maya too :slight_smile:

You can actually make the current text tools output deformable, but it’s a right pain in the neck, you have to remove all edges running down flat faces, then triangulate, then quadrangulate, then subdivide edges over a certain length, then triangulate, then add mayo, cheese, and griddle.

Simple ! :wink:
Ian


#10

Ah nice, at least it’s another option to script and see what works best…

Another way I was tinkering with was booleans and grids.
1.make grid at position of selected poly ngon.
2.Delete face then Difference boolean

Using miniscule offsets, seems to work, keeping a sort of live subdivision level (subdivisions of the plane)

Thanks a lot.


#11

Well bones of a solution using some of your suggesions above…
The slider is just using the live undo, to undo the op and redo… (Not robust). The value is the min size in the polySubdivideEdge. See attached image.



global proc aed_DivideTriangulate(float $minSize){
    //nice quick technique...
    Undo;// allows use of the slider.
    //1.Triangulate.
    Triangulate; //
    
    //Quadrangulate
    polyQuad  -a 30 -kgb 1 -ktb 1 -khe 1 -ws 1 -ch 1 ;
    
    //contained edges.
    ConvertSelectionToContainedEdges;
    //add vertices.
    polySubdivideEdge -ws 1 -size ($minSize) -dv 8 -ch 1;
    
    //Triangulate again.
    Triangulate; //
    }

global proc aed_DivideTriangulateWin(){
     if (`window -query -exists AED_DIVIDEWIN`==1){deleteUI AED_DIVIDEWIN;}
     
     window -title "Divide-Triangulate" -toolbox 1  -resizeToFitChildren 1  AED_DIVIDEWIN;
            columnLayout;
                $t = `text -label ""`;
                
                floatSliderGrp -label "size?" -field true -precision 4
                        -columnWidth3 50 50 100 -columnAlign3 "left" "left" "left"
                        -minValue 0 -maxValue 3 -value 0
                        -changeCommand "aed_DivideTriangulate(#1);" ;
                       
                        
                        button -label "OK" -width 100  -command "deleteUI -window AED_DIVIDEWIN;";
        
        showWindow AED_DIVIDEWIN;
}


aed_DivideTriangulateWin;

#12

Oh sorry to get that working, select the poly twice (as undo is undoing the first selection.)
Then run script. Drag slider to do the meshing and re-meshing.
Just for testing, if its something useful in due course Ill script it properly.


#13

This looks quite nice already as is. Hope you will put some more work into it and make proper script out of it.

It would be nice also to have also quad remeshing of whole object something like 3ds max quad mesh or quadrilateral tessellation option. Nice not for text only but also for cleaning geo after boolean operation.
Just a thought… :slight_smile:
http://help.autodesk.com/view/3DSMAX/2015/ENU/?guid=GUID-EC3DD1B9-6524-418C-B18C-567938A9DD24

Keep it up.


#14

Yep but Autodesk owns all these packages, I know it’s silly to port everything across, but this is an obvious day to day missing feature. So instead of 10 people working on Bi-frost this should have been in Maya 5, I know they are sorting simple workflow stuff now. What we really need is a “Delunay” triangulation tickbox/slider in “Add subdivisions” function. Anyway I suppose we learn from scripting, but not everybody can script!


#15

Great, just thought of a way I can make this workable…
Once the stage is reached above…

1.have a slider for max edge length…
2.make selection based on a threshold
3.subdivide edges
4.triangulate

That should even out the subdivisions and give “Delunay-esque” subdivision Ahemmmmm.


#16

With your help from above… getting there.
So add divisions mapped to c+d, then this to c+s+d.


#17

Nice! It is getting there indeed! :wink:


#18

Nice work, this is almost exactly how I go about making deformable text right now.


#19

I just checked Maya2016 … hoping adding divisions in x y and z grid widths was implemented … but nothing new on this as far I can tell.