mayation_

Wireframe render

Posted in tools by A. Benjasem on September 1, 2009

Many times while designing, I find it more interesting to look at a solid object in wireframe mode. In any 3D software the modeling is done through wireframe. When rendering the model however, it becomes solid. This tool allows you to convert any object made with Nurbs or surfaces in Maya to wireframe. You can change the number of sections or frames in every column and row. You can also change the radius of each frame.

mayation_wireframeCombo

     

global proc wireframe(int $u, float $v) {
  $obj = `ls -sl`;
  rebuildSurface -ch 1 -rpo 1 -rt 0 -end 1 -kr 0 -kcp 0 -kc 0 -su $u -du 3
                                          -sv $v -dv 3 -tol 0.01 -fr 0  -dir 2 $obj;
  int $i;
  string $curIso;
  float $inc_v;
  float $inc_u;
  float $curIsoValue;
  float $j = 0;
  $inc_v = (1.0 / $v);
  $inc_u = (1.0 / $u);
  $profile_radius = 0.05;  //change this value to change the size of the wireframe.
  $profile = `circle -ch on -o on -nr 0 1 0 -r $profile_radius ` ;
  for ($i = 0; $i <= $v; $i++) {
    $curIsoValue = ($inc_v * $j);
    $curIso = $obj[0] + ".v[" + $curIsoValue + "]";
    select -r  $curIso;
    $curve = `duplicateCurve -ch 1 -rn 0 -local 0  $curIso` ;
    extrude -ch true -rn false -po 0 -et 1 -fpt 1 -upn 0
                                  -rotation 0 -scale 1 $profile[0] $curve[0] ;
     $j = $j + 1;
   }
  $j = 0;
 for ($i = 0; $i <= $u; $i++) {
   $curIsoValue = ($inc_u * $j);
   $curIso = $obj[0] + ".u[" + $curIsoValue + "]";
   select -r  $curIso;
   $curve = `duplicateCurve -ch 1 -rn 0 -local 0  $curIso` ;
   extrude -ch true -rn false -po 0 -et 1
                            -fpt 1 -upn 0 -rotation 0 -scale 1 $profile[0] $curve[0] ;
    $j = $j + 1;
 } print "\n written by mayation.wordpress.org\n"  }
 

SolidForm solid to wireframe wireframeForm

2 Responses

Subscribe to comments with RSS.

  1. yuhankurnia said, on June 15, 2011 at 2:06 PM

    is that a script for maya, just like script in rhino or grasshopper? and whats the parameter on that design?

    • Amenah Benjasem said, on June 16, 2011 at 8:56 AM

      Yes it’s a script for Maya written in MEL .. It basically converts the structure into a renderable wireframe


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: