how can i subdivide edges like in xsi


#1

how can i subdevide edges so the split continue allover the object like the pic of xsi
i used mj poly tools
but there is no option of how many subdivision to split
are there any way?


#2

MJ Poly Tools has a loop split…(with slide function)

http://www.maya3d.dk/Scripts/MJPolyTools/


#3

the result is not as persize as in xsi
are there any other way or script


#4

Try BPT
search this forum or check www.byronimo.de


#5

MJ PolyTools will work, say as per your example, select your edge, then select Multi Loop Split, change the slider to .333, then select the bigger edge and just do an adge loop split on that(ie50/50) to get your equal three sections.Might not be as sexy as XSI’s method but it sure works.

MunCH


#6

http://www.cgtalk.com/showthread.php?t=154088


#7

thank u for help

but the idea is if i want to split it to 10
that will be very uneasy
i hope that i can found ascript in future can do it
or alias can do somthing about it


#8

why dont you script it? make it your first script if you havent started already. using the same method as described above. just test for the number of edges before a loopsplit, and the next indexed edge should be the new edge added/split into your intially selected edge.


#9

i am thinking of this now
but it will take so long time since i have no idea about scripting or programming
but i shall try


#10

just record your action. Look back at the command you like and drag it from the script editor to your shelf… No programming needed.


#11

glad to hear it.:slight_smile:
people will be more than happy to help you out as you go along. good luck!


#12

Hi,
the only way I know to subdivise edges like that is to use de “Draw split tool”. You can find this plug in the bonus tool modeling menu. It has a Multiloop split function that works very well.
You can find doc for this tool in the bonus tool documentation.


#13

Here is a little script which I hople will help you :). It simply performes a poly cut in a need plane and position, needed number of times. After that does a poly merge vertex with a tiny tolerance to avoid unwanted bugs.

The only issue is that i didn’t write the cut plane orientation to the boundary edges, that’s why it is prefered that the faces will “lye” on a cut axis. It won’t replace edge loop split anyway so implementing this feature wouldn’t be very useful.

To use first execute the script, select faces to cut, and call:

HKSubdivideFace($Axis,$Divisions);

// for example HKSubdivideFace(0,10)

Constants:
int $Axis - cut plane axis: 0 - x, 1 - y, 2 - z.
int $Divisions - number of divisions to subdivide.

 
global proc HKSubdivideFace(int $CutAxis, int $Subdivisions)
{
// Axis the faces will be cut in 0 -X, 1 - Y, 2 - Z;
 int $CutAxis; 
string $TxtAxis;
if($CutAxis == 0) { $TxtAxis = "x";}
if($CutAxis == 1) { $TxtAxis = "y";}
if($CutAxis == 2) { $TxtAxis = "z";}
//  Subdivision number to cut faces;
 int $Subdivisions;
 $Subdivisions +=1;
 string $SelectedFace[];
 $SelectedFace = `ls -sl`;
  PolySelectConvert 3;
 string $BoundVtx[] = `ls -sl`;
 float $Limit[] = `polyEvaluate -bc`;
  string $Tmp[] = `ls -hl`;
  string $Obj = $Tmp[0];
select -r $Obj;
PolySelectConvert 3;
string $BeforeCutVtx[] = `ls -sl -fl`;
string $Array[]; clear $Array;
string $New[]; clear $New;
float $Add = 0;
 select -r $SelectedFace;
for($i = 1; $i < $Subdivisions; $i++)
{
  string $CutNode[] = `polyCut  -ws 1 -cd $TxtAxis -ch 1`;
  $Add = $Add + ($Limit[2*$CutAxis+1]-$Limit[2*$CutAxis])/$Subdivisions;
  
  setAttr ($CutNode[0]+".pc" + $TxtAxis) ($Add+$Limit[2*$CutAxis]);
   select -r $Obj;
   PolySelectConvert 3;
   $Array = `ls -sl -fl`;
   $New = stringArrayRemove($BeforeCutVtx, $Array);
   $New = stringArrayCatenate($BoundVtx, $New);
   $Array = `polyListComponentConversion -fv -tf -in $New`;
  select $Array;
}
hilite $Obj;
polyMergeVertex  -d 0.001 -ch 1 $Obj;
select -clear;
}


#14

I’ve been curious about the way the bonus tools work… are they 3rd party scripts that if people find them useful, Alias will implement them directly into Maya? or will they simply just remain as bonus tools?


#15

thank u mr.hawk
i will test it now


#16

mr hawk

great script
it does exactly what i want
but
that script will be great if u make anice interface
with sliders to increase and decrease the divisions
and thank u again


#17

From the Documentation…

Maya Bonus Tools Menu v6.0

The Maya Bonus Tools Menu adds a pull down menu to the standard Maya UI. It contains a variety of tools for daily use and should be useful to most Maya users. These tools were previously known as the bonusGame tools.

These tools are unsupported. Most, if not all of these tools were developed on personal time by a number of people. Problems reports and suggestions are encouraged and can be addressed to bonusTools@alias.com.
Feel free to modify these scripts and share them.


#18

Ok, here you are. To use it call HKFaceCutterCall(); Select some faces and hit Cut Again. To decrease or increase divisions drag the slider( it will update on slider set, not while dragging).
If you want to cut new faces select them and use Cut Again:) That’s it.

 
global proc string[] HKSubdivideFace()
{
string $Nodes[]; clear $Nodes;
// Axis the faces will be cut in 0 -X, 1 - Y, 2 - Z;
 int $CutAxis = `radioButtonGrp -q -sl HKFaceCutterRadio` - 1;
string $TxtAxis;
if($CutAxis == 0) { $TxtAxis = "x";}
if($CutAxis == 1) { $TxtAxis = "y";}
if($CutAxis == 2) { $TxtAxis = "z";}
//  Subdivision number to cut faces;
 int $Subdivisions = `intSliderGrp -q -v HKFaceCutterSlider`;
 $Subdivisions +=1;
string $SelectedFace[];
 $SelectedFace = `ls -sl`;
  PolySelectConvert 3;
 string $BoundVtx[] = `ls -sl`;
 float $Limit[] = `polyEvaluate -bc`;
  string $Tmp[] = `ls -hl`;
  string $Obj = $Tmp[0];
select -r $Obj;
PolySelectConvert 3;
string $BeforeCutVtx[] = `ls -sl -fl`;
string $Array[]; clear $Array;
string $New[]; clear $New;
float $Add = 0;
 select -r $SelectedFace;
for($i = 1; $i < $Subdivisions; $i++)
{
  string $CutNode[] = `polyCut  -ws 1 -cd $TxtAxis -ch 1`;
  $Add = $Add + ($Limit[2*$CutAxis+1]-$Limit[2*$CutAxis])/$Subdivisions;
  $Nodes[`size ($Nodes)`] = $CutNode[0];
  setAttr ($CutNode[0]+".pc" + $TxtAxis) ($Add+$Limit[2*$CutAxis]);
   select -r $Obj;
   PolySelectConvert 3;
   $Array = `ls -sl -fl`;
   $New = stringArrayRemove($BeforeCutVtx, $Array);
   $New = stringArrayCatenate($BoundVtx, $New);
   $Array = `polyListComponentConversion -fv -tf -in $New`;
  select $Array;
}
 hilite $Obj;
  $Tmp = `polyMergeVertex  -d 0.001 -ch 1 $Obj`;
 $Nodes[`size ($Nodes)`] =$Tmp[0];
 select -r $SelectedFace;
 return $Nodes;
}

global proc HKFaceCutterCall()
{
 global string $Nodes[]; clear $Nodes;
 global int $HKFCSlideVal = 0;
if(`window -ex HKFaceCutter`)
  deleteUI HKFaceCutter;
 window -t "HKFaceCutter v 1.0" HKFaceCutter;
 formLayout HKFaceCutterForm;
 radioButtonGrp -sl 1 -l "Cut Axis: " -nrb 3 -l1"X"-l2"Y"-l3"Z" HKFaceCutterRadio;
 intSliderGrp -f 1 -l "Divisions" -v 1 -max 25 -cc HKFaceCutSet HKFaceCutterSlider;
 button -l " Cut Again " -w 150 -c "HKFaceCutCutAgain;" HKFCCutAgainButton;
 button -l " Close " -c "deleteUI HKFaceCutter;" HKFCCloseButton;
  formLayout -e
	-af HKFaceCutterRadio top 5 
	-af HKFaceCutterRadio left -65 
	-af HKFaceCutterRadio right 5 
	-ac HKFaceCutterSlider top 9 HKFaceCutterRadio
	-af HKFaceCutterSlider left -65
	-af HKFCCutAgainButton bottom 5 
	-af HKFCCutAgainButton left 5
	-af HKFCCloseButton bottom 5 
	-ac HKFCCloseButton left 8 HKFCCutAgainButton
	-af HKFCCloseButton right 5 
 HKFaceCutterForm;
 showWindow HKFaceCutter;
}
proc HKFaceCutSet()
{
  global string $Nodes[];
  if(size (`filterExpand -sm 34`) > 0) 
  {
   if(`objExists $Nodes[0]`) 
   delete $Nodes; 
  $Nodes = HKSubdivideFace();
  }
}
proc HKFaceCutCutAgain()
{
   global string $Nodes[];
   clear $Nodes;
	if(size (`filterExpand -sm 34`) == 0)
	 error "No faces selected to cut.";
   $Nodes = HKSubdivideFace();
}
 

And BTW there is another way to achive this without a script, with interactive subdivision number update.
You can delete the faces which you want to subdivide, then select one of the resulting border edge loops, extrude edge them, move close to the other side and apply Merge verts on top of your model with low tolerance. After that go to ExtrudeEdge params and change the division parameter until you’re satisfied with the number of your divisions:)


#19

greaaaaaaaaaaaaaaaaaaaaaaaaaaat

thank u very much


#20

small little bug
when i cut the selected face it subdivide it good
but it subdidvide other faces which i dont want and it subdivide it unequally
and the otherway resulting in malformation of the object
and thank u again