PDA

View Full Version : Greebling in Maya


Fess
07-18-2006, 12:32 AM
Already searched guys,

All I could find was thousands of references to a plugin for Max or C4d.

I was trying to create "Greebles" in the "Selection Constraints" dialogue box in Maya but was having a hard time.

I examined the defination of "greebles" here:
http://en.wikipedia.org/wiki/Greeble

The cube looks like it would take forever to make. Don't understand the multi-level detail workflow.

Anyone care to share greeble worlflow?

Thanks
Fess

Fess
07-19-2006, 05:18 PM
I was able to get semi-contorl using displacement maps via photoshop using various shades of gray, but its not complex enough.

Need some techinque, grease my wheels guys.....:shrug:

Fess

Venkman
07-19-2006, 07:10 PM
Try this script off high end 3d- supposedly it had greeble control in it:

http://www.highend3d.com/maya/downloads/mel_scripts/modeling/misc/3187.html

It says Windows only (isn't Mel cross platform?). But if it works for you please post about it here.

Venkman
07-19-2006, 07:12 PM
Also try this:

Here is the thread:
http://www.3dbuzz.com/vbforum/showthread.php?t=78038



The attachment:

http://www.3dbuzz.com/vbforum/attachment.php?attachmentid=43558

Venkman
07-20-2006, 04:35 AM
DeeGreebler is a lot of fun. I just tried it. Coolness! Here are the instructions to get it to work:

Paste this Mel script in your script editor:


//
// Deesine's Greebler
// Version 0.1
//

global proc extrudeSelectedFaces()
{
if(`checkBox -q -v ctrl_useSubdivide` == true)
{
string $select[] = `ls -sl`;

int $faceCount[0] = `polyEvaluate -f`;

for( $node in $select )
{
polySubdivideFacet -dv 1 $node;
}
int $faceCount2[0] = `polyEvaluate -f`;

for($i=$faceCount[0];$i<$faceCount2[0];$i++)
{
//select -r ( $node+".f["+$i+"]");
}
}
extrudeSelectedFaces2();
}
global proc extrudeSelectedFaces2()
{
string $select[] = `ls -sl`;

int $extMin = `intFieldGrp -q -value1 extMinMax`;
int $extMax = `intFieldGrp -q -value2 extMinMax`;

float $scaleMin = `floatFieldGrp -q -value1 scaleMinMax`;
float $scaleMax = `floatFieldGrp -q -value2 scaleMinMax`;

float $translateMin = `floatFieldGrp -q -value1 translateMinMax`;
float $translateMax = `floatFieldGrp -q -value2 translateMinMax`;
print ("ext min: "+$extMin+"\n");
print ("ext max: "+$extMax+"\n");
print ("scale min: "+$scaleMin+"\n");
print ("scale max: "+$scaleMax+"\n");
print ("Translate min: "+$translateMin+"\n");
print ("Translate max: "+$translateMax+"\n");

for( $node in $select )
{
select -cl;
select -r $node;
int $numExtrusions = rand($extMin, $extMax);

for( $j = 0; $j <= $numExtrusions; $j++ )
{
float $A = rand($scaleMin, $scaleMax);
float $randTranslate = rand($translateMin, $translateMax);
print($randTranslate + "\n");
polyExtrudeFacet -kft 1 -scale $A $A $A;
polyExtrudeFacet -kft 1 -localTranslateZ $randTranslate;
}
}
}

global proc extrudeSelectedMeshes()
{
string $select[] = `ls -sl`;

for( $node in $select )
{
select -r $node;
int $faceCount[0] = `polyEvaluate -f`;
int $progress = $faceCount[0];
int $curFace = 0;
int $prog;

int $extMin = `intFieldGrp -q -value1 extMinMax`;
int $extMax = `intFieldGrp -q -value2 extMinMax`;

float $scaleMin = `floatFieldGrp -q -value1 scaleMinMax`;
float $scaleMax = `floatFieldGrp -q -value2 scaleMinMax`;

float $translateMin = `floatFieldGrp -q -value1 translateMinMax`;
float $translateMax = `floatFieldGrp -q -value2 translateMinMax`;

print( $node + " has " + $faceCount[0] + " faces.\n" );

progressWindow
-title "Extruding faces"
-progress $progress
-status "Working on face: 0"
-isInterruptable true;

int $randomFaceCount = rand(1, $faceCount[0]);
if($randomFaceCount > 30)
$randomFaceCount = rand(1, 30);

$progress = $randomFaceCount;

print ("Random face count: " + $randomFaceCount + "\n" );

// For a random number of faces.
for( $i = 0; $i < $randomFaceCount; $i++ )
{
int $numExtrusions = rand($extMin, $extMax);

//print( $A + "\n" );

// Select face $i.
int $faceNum = rand(0, $faceCount[0]);
select -r ( $node+".f["+$faceNum+"]");

for( $j = 0; $j <= $numExtrusions; $j++ )
{
float $A = rand($scaleMin, $scaleMax);
float $randTranslate = rand($translateMin, $translateMax);
print($randTranslate + "\n");
polyExtrudeFacet -kft 0 -scale $A $A $A;
polyExtrudeFacet -kft 0 -localTranslateZ $randTranslate;
}

$progress--;
$curFace++;
if($progress > 0)
$prog = 100 / $progress;

if( `progressWindow -query -isCancelled` )
break;

if( `progressWindow -query -progress` <= 0 )
{
progressWindow
-edit
-progress $prog
-status ("Working on face: " + $curFace + " of " + $randomFaceCount + ". All Done!");
progressWindow -endProgress;
break;
}
progressWindow
-edit
-progress $prog
-status ("Working on face: " + $curFace + " of " + $randomFaceCount);
}
progressWindow -endProgress;
}

// Reselect selection.
select -r $select;
}

proc createMainWindow(string $name)
{
string $window = `window -title $name -widthHeight 200 55 $name`;

$windowWidth = 128;
$windowHeight = 256;
$windowGap = 5;
$buttonHeight = 22;


///////////////////////////////////////////////////////////////

frameLayout -l "Greeble Test" -la "center" -cll false -bs "etchedOut" -mh 5 -mw 5;
columnLayout -adjustableColumn true -columnAttach "both" 10;

button -label "Extrude Selected Faces" -command extrudeSelectedFaces;
button -label "Extrude Selected Meshes" -command extrudeSelectedMeshes;

///////////////////////////////////////////////////////////////

separator -style "none" -w $windowWidth -h 10;

///////////////////////////////////////////////////////////////
int $colWidth = $windowWidth / 4;
int $labelWidth = 85;

intFieldGrp -numberOfFields 2
-label "Ext Min/Max"
-w $windowWidth
-cw3 $labelWidth $colWidth $colWidth
-value1 1 -value2 2
extMinMax;

floatFieldGrp -numberOfFields 2
-label "Scale Min/Max"
-w $windowWidth
-cw3 $labelWidth $colWidth $colWidth
-value1 0.1 -value2 0.9
scaleMinMax;

floatFieldGrp -numberOfFields 2
-label "Transl Min/Max"
-w $windowWidth
-cw3 $labelWidth $colWidth $colWidth
-value1 0.1 -value2 1.0
translateMinMax;

separator -style "none" -w $windowWidth -h 10;

checkBox -label "Use subdivide (only selected faces)" -align "left" ctrl_useSubdivide;

///////////////////////////////////////////////////////////////

separator -style "none" -w $windowWidth -h 10;

///////////////////////////////////////////////////////////////

button -label "Close" -command ("deleteUI -window " + $window);

setParent ..;

///////////////////////////////////////////////////////////////

showWindow $window;
}

global proc DeeGreebler()
{
if((`window -exists DeeGreebler`) == true)
deleteUI DeeGreebler;
createMainWindow("DeeGreebler");
}



And invoke the greeble window with this code and make a shelf button out of it:
source DeeGreebler;
DeeGreebler;

Visual_E
07-20-2006, 04:45 AM
thanks a lot Venkman for pasting it. i love it, but was too lazy to grab it from highend myself.

Venkman
07-20-2006, 04:58 AM
thanks a lot Venkman for pasting it. i love it, but was too lazy to grab it from highend myself.


The one I pasted (DeeGreeble) is not the one from high end 3d. The one from highend has a whole of folder scripts and icons that need to be installed. It's crazy. There are all sorts of tools in the highend3d package, called goomoo utilities.

The greeble in goomoo utilities, however, is a totally different style and you can keep changing params and hit "update" to see the changes.

I've already gotten greedy for greebles and crashed Maya with it. ;)

Visual_E
07-20-2006, 05:46 AM
The one I pasted (DeeGreeble) is not the one from high end 3d. The one from highend has a whole of folder scripts and icons that need to be installed. It's crazy. There are all sorts of tools in the highend3d package, called goomoo utilities.

The greeble in goomoo utilities, however, is a totally different style and you can keep changing params and hit "update" to see the changes.

I've already gotten greedy for greebles and crashed Maya with it. ;)

ah, if that's so going then to try goomoo one to see the difference. thanks again

sheepfilms
07-20-2006, 10:57 AM
If you're not concerned about overlapping geometry or potential z-fighting you could try using geometry paint or other object spreading tools:

http://ndhaussy.free.fr/maya_object_spreading/

Fess
07-20-2006, 03:15 PM
Wow,

Great info guys. I appreciate your effort.

I'll take my time & absorb it all.

Much Thanks :thumbsup: :thumbsup:
Fess

Fess
07-20-2006, 03:41 PM
Just found this thread,


http://forums.cgsociety.org/showthread.php?t=304050

CGTalk Moderation
07-20-2006, 03:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.