Adding divisions in a regularized grid-like manner (a la XSI "dicing") - Maya - Highend3d Artists Discussion Forums

We're sorry, but something went wrong.

Error: Backend Fetch Failure

We've been notified about this issue and we'll take a look at it shortly.

If you need to reach us, email support@highend3d.com

Oct 2012
1 / 8
Oct 2012
Oct 2012

I'm looking to add lots of divisions to a polygonal model in a regular fashion order to deform it.  I find that Maya's Add Divisions, either in linear or exponential, generally does a really poor job of this.

Softimage has a tool called dicing, which merely subdivides an object in a grid-like fashion by splitting the surfaces according to user input amounts in X, Y, & Z, using the bounding box as the limit.

Is anyone aware of a similar tool for Maya?

Thanks! 

  • created

    Oct '12
  • last reply

    Oct '12
  • 7

    replies

  • 9.7k

    views

  • 1

    user

  • 1

    link

yeah its pretty trivial to do. However your question is unclear about at what POINT in time you want the dicing to happen. Does the solution need to be a node or is a offlime/semioffline solution fine (because its way easier on you)*. However im not aware of any thing that does this but then again its no more work than perhaps an hour so it doesn't really matter.

Not the most useful tool IMHO, as dicing a complex mesh gives you more problems than it solves. See the act of dicing the surface absolutely kills all the normal interpolation completely. So its only usefull in some brder cases**. Even if you account for this. I mean its fine for something thats facetted tough.

Thing is if you alter your workflow then this becomes a non issue.

  • its essentially 3 for loops calling poly cut faces. Or just enable the tool and start shift dragging on screen for custom distribution.

** you can imporve solution by transfering normals

Yeah i know what dicing is. Thats how a reyes/rasterizing renderer works builta few ones in my time.

The Cut Faces tool isn't what I'm looking for, because I want to add lots of subdivisions in a regular fashion all at once.

Theers no such thing as doing it all at once, the computer has to do them in some order one at a time. Thus calling the thing severeal times results in same thing. So just because it would be tedious to do manually doesnt mean that its a big deal for the computer to take over your task.

So what you do is you is you call the tool in loop and viola its done in one go.

/* jooCCRequestedWSDice.mel  0.1
 
  Authors:     Janne 'Joojaa' Ojala
  Testing:     if it works after a suitably long time without 
               much problems let me know. Report any problems.
  License:     Creative Commons, Attribution, Share Alike
  Request by:  Michael Kory
 
  About:
  A simple script that will dice specified object in
  worldspace
 
  Install Instructions:
  place this text in a file named:
       jooCCRequestedWSDice.mel 
  that resides in your personal Maya script directory.
 
  Usage example run:
  
  $prism = `polyPrism -l 2 -w 1 -ns 3 -sh 1 -sc 0 -ax 0 1 0 -cuv 3 -ch 1`;
  jooCCRequestedWSDice $prism[0] 10 10 10;
 
  Changelist:
      14.10.2012  - Original file 
*****************************************************************/
 
global proc jooCCRequestedWSDice(string $obj, int $x, int $y, int $z){
	float $bbox[]=`exactWorldBoundingBox $obj`;
	$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 $obj;
	$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 $obj;
	$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 $obj;
}

if you run the example ite makes the prism. This si just a veeeery quick hack.

Ok you may want to run amerge vertex with a tiny distance after this.

Thanks again.  But just to be certain - your script only makes the prism, and can't be applied to an existing non-primative shape, correct?

it works on any polygonal object just type in the name as first variable.