Latest list of colors?


RE: Latest list of colors?
#12
(2018-02-12, 18:15)Roland Melkert Wrote:
(2018-02-12, 2:07)Michael Horvath Wrote: LDCad seems to assign ldMat382 to parts in a model I created in MLCad. I don't understand why it does that, since I did not set this color manually.

If you're talking about datsville, building_024_andershouse.ldr is using color 382. So even if its not in the LDConfig.ldr pallette the missing color willl be gray and yellow dithered.

Below is how I handle those colors, the actual RGB is (a+b)/2 of the two source colors.
might be useful for your script:

Code:
if (calcMissingDitheredMaterial) {  int cnt=0;  TLDMaterial *a, *b, *mat;  for (int i=256; i<512; i++)  {    mat=findMaterial(i);    if (mat==NULL || mat->isMissing())    {      a=findMaterial((i-256) >> 4);      b=findMaterial((i-256) & 0x0F);      if (a!=NULL && b!=NULL)      {        if (mat==NULL)        {          mat=new TLDMaterial(i, a, b);          addMaterial(mat);        }        else          mat->reInit(i, a, b);        ++cnt;      }    }  }  LOG_REPORT1(log, LL_Progress, logMsg_LDraw_doneCalcDitherMat, cnt); }

My mistake. I changed the color in building_024_andershouse.ldr to light gray.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Latest list of colors? - by Michael Horvath - 2018-02-08, 1:26
RE: Latest list of colors? - by Chris Dee - 2018-02-09, 9:30
RE: Latest list of colors? - by Michael Horvath - 2018-02-12, 20:06
RE: Latest list of colors? - by Jarema - 2018-02-10, 16:54
RE: Latest list of colors? - by Steffen - 2018-02-11, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)