To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 6982
6981  |  6983
Subject: 
Re: Tutorial Subject List (was: Re: The LDraw Community is what each person makes it)
Newsgroups: 
lugnet.cad, lugnet.cad.dev, lugnet.cad.dev.org.ldraw
Date: 
Fri, 28 Dec 2001 20:53:52 GMT
Viewed: 
961 times
  
In lugnet.cad, Sun Yun writes:
In lugnet.cad, Tim Courtney writes:
- How to make images of your models for building instructions, web
publications, and print media.

I'd be willing to help out or write this up as soon as I figure out the
logistics myself.  I've been using Ldraw and MLCad for a little over a week
now so there is still a lot of learning to be done, especially with the
rendering programs.

To get you started, here's a small piece of the puzzle for printing
images (culled from several recent threads.  This still needs work,
perhaps some sample command lines containing the -w edge width values
and -s scale values used by the pros to get the best printouts.   Also
I don't know which program is preferred to actually print the resulting
image.  In addition, I know of a method documented here:

  http://news.lugnet.com/cad/?n=5344

to do some cheesy antialiasing effects with ldglite that could probably
be duplicated with LDLite and ImageMagick, but that's beyond my abilities.

Enjoy,

Don

--------------------------------------------------------------------
QUESTION:

How do I change the edge colors on my printouts so they are clearer?
(eg. change the edge color for red to black instead of the pinkish
color it is now)

-----------------------------------------------------------------------

ANSWER:

Some folks use LDLite for final rendering due to the edge line
thickening feature that LDLite introduced in version 2.1.  With
LDLite, you can also add lines to the main DAT files to control the
colors.  To modify red to use black edges you'd add a line like:

  0 COLOR 4 red 0 196 0 38 255 196 0 38 255

The '4' is because you're modifying color #4, the 'red' is a name for
the color (which you could use in place of the 4 in later commands, if
you desired), the '0' is the code for the edge-color you want to use
(black), the remaining codes specify the RGB-A values of the color,
which are very important, but beside the point for this example.

When LDLite renders a model it will render red parts with black edge
lines instead of pink for the rest of the model after it encounters
that line.  Put this line at the top of the file, modifying it for
each color you want to change.

Unfortunately, I don't think MLCAD will recognize this command. :(
Supposedly, MLCad doesn't like mods to color numbers under 60.

Another example, let's redefine Blue to use black edges:

  0 COLOR 1 Blue 0 255 153 0 0 255 153 0 255

The syntax of a color definition is:

  0 COLOR index name edge_color r g b alpha d_r d_g d_b d_alpha

The index is an index into the color palette.  LDLite allows you to
use the numbers 0 to 255.  By default, the numbers from 0 to 64 are
defined to match LDRAW's, the rest are currently undefined.  LDRAW
used the numbers from 256 to 511 to represent dithered combinations of
the first 16 palette entries.  You can still use the numbers from 256
to 511 in your models, but to make life easier, LDLite allows you to
set palette entries to dithered combinations directly. The COLOR
command expects two sets of rgb values which it will dither.  For
solid colors, set both r,g,b,a and d_r,d_g,d_b,d_a to the same values
and no dithering will occur.  Alpha should be 255 (or 0xff) for opaque
colors.  For transparent colors, set d_alpha (i.e. on the dithered
color) to 0.  If you set alpha to zero on both colors, nothing will be
drawn at all.  Here are the default color values used by LDLite.

  0 COLOR 0 Black 8 0x22 0x22 0x22 0xff 0x22 0x22 0x22 0xff
  0 COLOR 1 Blue 9 0x00 0x33 0xb2 0xff 0x00 0x33 0xb2 0xff
  0 COLOR 2 Green 10 0x00 0x7f 0x33 0xff 0x00 0x7f 0x33 0xff
  0 COLOR 3 Dark-Cyan 11 0x00 0xaa 0xaa 0xff 0x00 0xaa 0xaa 0xff
  0 COLOR 4 Red 12 0xcc 0x00 0x00 0xff 0xcc 0x00 0x00 0xff
  0 COLOR 5 Magenta 13 0xff 0x33 0x99 0xff 0xff 0x33 0x99 0xff
  0 COLOR 6 Brown 0 0x66 0x33 0x00 0xff 0x66 0x33 0x00 0xff
  0 COLOR 7 Light-Gray 8 0xaa 0xaa 0xaa 0xff 0xaa 0xaa 0xaa 0xff
  0 COLOR 8 Dark-Gray 0 0x66 0x66 0x58 0xff 0x66 0x66 0x58 0xff
  0 COLOR 9 Light-Blue 1 0x00 0x80 0xff 0xff 0x00 0x80 0xff 0xff
  0 COLOR 10 Light-Green 2 0x33 0xff 0x66 0xff 0x33 0xff 0x66 0xff
  0 COLOR 11 Cyan 3 0x55 0xaa 0xff 0xff 0x55 0xaa 0xff 0xff
  0 COLOR 12 Light-Red 4 0xff 0x55 0x55 0xff 0xff 0x55 0x55 0xff
  0 COLOR 13 Pink 5 0xff 0xb0 0xcc 0xff 0xff 0xb0 0xcc 0xff
  0 COLOR 14 Yellow 8 0xff 0xe5 0x00 0xff 0xff 0xe5 0x00 0xff
  0 COLOR 15 White 8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  0 COLOR 16 Main-Color 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0xff
  0 COLOR 17 Pastel-Green 2 0x66 0xf0 0x99 0xff 0x66 0xf0 0x99 0xff
  0 COLOR 18 Light-Yellow 14 0xff 0xff 0x80 0xff 0xff 0xff 0x80 0xff
  0 COLOR 19 Tan 6 0xcc 0xaa 0x66 0xff 0xcc 0xaa 0x66 0xff
  0 COLOR 20 Light-Purple 8 0xe0 0xcc 0xf0 0xff 0xe0 0xcc 0xf0 0xff
  0 COLOR 21 Glow-In-The-Dark 0 0xe0 0xff 0xb0 0xff 0xe0 0xff 0xb0 0xff
  0 COLOR 22 Purple 8 0x99 0x33 0x99 0xff 0x99 0x33 0x99 0xff
  0 COLOR 23 Purple-Blue 8 0x4c 0x00 0xcc 0xff 0x4c 0x00 0xcc 0xff
  0 COLOR 24 Edge-Color 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0xff
  0 COLOR 25 Orange-Solid 8 0xff 0x66 0x00 0xff 0xff 0x66 0x00 0xff
  0 COLOR 26 Dark-Pink 0 0xff 0x33 0x99 0xff 0xff 0x33 0x99 0xff
  0 COLOR 27 LimeGreen 0 0xad 0xdd 0x50 0xff 0xad 0xdd 0x50 0xff
  0 COLOR 28 Tan-Solid 0 0xcc 0xaa 0x66 0xff 0xcc 0xaa 0x66 0xff
  0 COLOR 29 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0xff
  0 COLOR 30 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0xff
  0 COLOR 31 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0xff
  0 COLOR 32 Trans-Black 8 0x22 0x22 0x22 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 33 Trans-Blue 9 0x00 0x00 0x99 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 34 Trans-Green 10 0x00 0x50 0x18 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 35 Trans-Dark_Cyan 11 0x00 0xaa 0xaa 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 36 Trans-Red 12 0xcc 0x00 0x00 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 37 Trans-Magenta 13 0xff 0x33 0x99 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 38 Trans-Brown 0 0x66 0x33 0x00 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 39 Trans-Light-Gray 8 0x99 0x99 0x99 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 40 Trans-Dark-Gray 0 0x66 0x66 0x58 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 41 Trans-Light-Blue 1 0x99 0xc0 0xf0 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 42 Trans-Light-Green 2 0xcc 0xff 0x00 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 43 Trans-Cyan 3 0x55 0xaa 0xff 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 44 Trans-Light-Red 4 0xff 0x55 0x55 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 45 Trans-Pink 5 0xff 0xb0 0xcc 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 46 Trans-Yellow 8 0xf0 0xc4 0x00 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 47 Trans-White 8 0xff 0xff 0xff 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 48 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 49 unused 2 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 50 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 51 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 52 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 53 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 54 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 55 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 56 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 57 Trans-Orange 8 0xff 0x66 0x00 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 58 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 59 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 60 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 61 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 62 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00
  0 COLOR 63 unused 0 0x7f 0x7f 0x7f 0xff 0x7f 0x7f 0x7f 0x00

Edge colors for colors 0 to 15 are documented in the LDraw FAQ
at the very end of question 27.

  http://www.ldraw.org/memorial/archive/FAQ/#question-27

As of LDLite version 2.2 you can place the 0 COLOR meta-commands in
the ldliterc.dat file in the working directory.

Example 3:

Just add something like this to the ldliterc.dat file or at the
beginning of your model file:

  0 COLOR 0 black 15 34 34 34 255 34 34 34 255
  0 COLOR 4 red 0 196 0 38 255 196 0 38 255
  0 COLOR 1 blue 0 0 51 178 255 0 51 178 255
  0 COLOR 2 green 0 0 127 51 255 0 127 51 255
  0 COLOR 7 light-gray 0 170 170 170 255 170 170 170 255

It comes out like this is ldglite (with antialiased lines enabled).

  http://www.brickshelf.com/cgi-bin/gallery.cgi?i=81479

That should make for a clearer printout.


Warning:

It is occasionally suggested that there is a way to do this in the
LDraw.ini file (created by LDAO and used by several other programs)
but it only contains lines for the basic colors and NOT the edge
colors, like this:

  [Colors]
  0=0,Black
  1=8388608,Blue
  2=32768,Green
  3=8421376,Dk Cyan



Message has 2 Replies:
  Re: Tutorial Subject List (was: Re: The LDraw Community is what each person makes it)
 
Don Heyse wrote in message ... (...) Yes, MLCad complains when you have a line like this in the file. It does still load the file but it chucks out the line when you save the file in MLCad. So if you're going to use this with MLCad you'll need to (...) (22 years ago, 29-Dec-01, to lugnet.cad, lugnet.cad.dev, lugnet.cad.dev.org.ldraw)
  Re: Tutorial Subject List (was: Re: The LDraw Community is what each person makes it)
 
Don Heyse wrote in message ... (...) This is great info Don! Is there a specific directory ldliterc.dat needs to go into? I've tried it in the ldraw and ldlite directories and ldlite doesn't seem to pay any attention to it, although putting the (...) (22 years ago, 29-Dec-01, to lugnet.cad, lugnet.cad.dev, lugnet.cad.dev.org.ldraw)

Message is in Reply To:
  Re: Tutorial Subject List (was: Re: The LDraw Community is what each person makes it)
 
(...) I'd be willing to help out or write this up as soon as I figure out the logistics myself. I've been using Ldraw and MLCad for a little over a week now so there is still a lot of learning to be done, especially with the rendering programs. sun (22 years ago, 28-Dec-01, to lugnet.cad, lugnet.cad.dev, lugnet.cad.dev.org.ldraw)

30 Messages in This Thread:













Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR