Brick Wall created using Array Tool...question

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  09 September 2004
Brick Wall created using Array Tool...question

Hi all,

Somebody (in another thread), pointed me in the right direction to quickly create a wall of bricks. In Lightwave- it's created as one object consisting of many parts.

Using the Array- I can position the blocks so they stack...I need to keep this stack formation- but they need to be individual objects.

Any tips?
JB
 
  09 September 2004
Question

Originally Posted by HarverdGrad: I need to keep this stack formation- but they need to be individual objects.

Why separate objects? what are you doing this for??
__________________
Dr. Glass DPM Medical Learning Resources
http://www.youtube.com/DrGlassDPM
glass.dpm@gmail.com

Cmaddness
Xbox Live! Gamertag
 
  09 September 2004
Hello,

I'm exporting to Next Limit's Realflow. When the Object is imported with Dynamics applied- it is treated as one object.

Regards,
JB
 
  09 September 2004
do you mean in separate layers? if so



@version 2.0
@warnings
@script modeler
@define FILE 1
@define LAYER 2
fn; c1; d1..3; ei; objName; dir; ext; l; str; source;
pivotx; pivoty; pivotz;
// continue with pivot placements
setPivotOnCurrentObject
{
 pc = editbegin();
 if(!pc)
  return;
 tv = <0,0,0>;
 for(k=1;k<=pc;k++)
  tv = tv + pointinfo(points[k]);
 tv = tv / <pc,pc,pc>;
 editend();
 setpivot(tv);
}
exportLayerAsLWO
{
 while(true)
 {
  (polyc) = polycount();
  if(!polyc)
   break;
  editbegin();
  poly = polygons[1];
  editend();
  selpolygon(CLEAR);
  selpolygon(SET,POLYID,poly);
  if(mode == 1)
   selpolygon(SET,CONNECT);
  copy();
  selhide();
  new();
  paste();
  setPivotOnCurrentObject();
  asas = getdir(OBJECTSDIR);
  ei = ei + 1;
  str = string(objName,ei,ext);
  save(str);
  close();
 }
}
activeLayers: ndx
{
 if(ndx == 2)
  return(false);
 else
  return(true);
}
main
{
 ei = 0;
 f = recall("FILENAME","*.lwo");
 mode = integer(recall("MODE",1));
 oDir = string(getdir(OBJECTSDIR),"<A href="file://\",f">\\",f);
 (polyc) = polycount();
 if(!polyc)
  error("No data.");
 reqbegin("MultiFid A");
 c0 = ctlchoice("Source",1,@"Current Layer","All Layers"@);
 c1 = ctlchoice("Output",2,@"To File","To Layers"@);
 c1b = ctlfilename("File",oDir,80,false);
 c2 = ctlchoice("Mode",mode,@"Per Connected","Per Polygon"@);
 d1 = ctlchoice("Pivot X",1,@"No Change","--","==","++"@);
 d2 = ctlchoice("Pivot Y",1,@"No Change","--","==","++"@);
 d3 = ctlchoice("Pivot Z",1,@"No Change","--","==","++"@);
 ctlactive(c1,"activeLayers",c0,c1b);
 return if(!reqpost());
 gvfn = getvalue(c1b);
 if(gvfn)
 {
  (d,p,f,ext) = split(gvfn);
  ext = ".lwo";
  objName = string(d,p,f);
  sf = string(f,ext);
  store("FILENAME",sf);
 }
 else
  objName = nil;
 pivotx = getvalue(d1);
 pivoty = getvalue(d2);
 pivotz = getvalue(d3);
 
 source = getvalue(c0);
 output = getvalue(c1);
 mode = getvalue(c2);
 store("MODE",mode);
 if(output == LAYER) // if layer output then there could only be one layer as reference
  source = 1;
 reqend();
 return if(!pointcount());
 mainLayer = lyrfg();
 l = mainLayer[1];
 selmode(USER);
 selpolygon(CLEAR);
 while(true)
 {
  editbegin();
  poly = polygons[1];
  editend();
  selpolygon(SET,POLYID,poly);
  if(mode == 1)
   selpolygon(SET,CONNECT);
  selmode(GLOBAL);
  (polycGLOBAL) = polycount();
  selmode(USER);
  (polyc) = polycount();
  if(polycGLOBAL == polyc)
  {
   selunhide();
   setPivotOnCurrentObject();
   break;
  }
  if(output == FILE)
  {
   exportLayerAsLWO();
   if(source == 1)
   {
	selunhide();
	break;
   }
   else
   {
	selunhide();
	lyrsetfg(++l);
   } 
  }
  if(output == LAYER)
  {
   selinvert();
   cut();
   setPivotOnCurrentObject();
   editend();
   lyrsetfg(++l);
   paste();
  }
 }
}


caveat: if i remember correctly, only the toLayers func works. i'm not sure if i finalised the export to lwo feature.
__________________
"If in this life only we have hope in Christ, we are of all men most miserable."

Advert:
Janus - multi-pass rendering for LightWave3D
 
  01 January 2006
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:52 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.