To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 5864
5863  |  5865
Subject: 
Re: LDraw color codes needed for rendering program
Newsgroups: 
lugnet.cad.dev
Date: 
Mon, 8 Jan 2001 23:32:43 GMT
Viewed: 
420 times
  
Gary Williams wrote...
Apparently not all LDraw color codes are specified in the LDraw FAQ ... and
some that are, are missing the RGB assignments (for instance: 11, 3, 12, 5).
Code 39 is used by the car.dat file that is included with LDraw, but it
seems to be missing from the FAQ.

Is there a definitive list of color code assignments somewhere that I can
use?

You may have a look in this L3Lab generated table:
http://home16.inet.tele.dk/hassing/ldcolors.html
which has colors 0..63 for LDraw, LDLite+MLCad and L3P.
I'm working on adding more colors and more color schemes.

LDraw draws transparent colors (32 + 0..15) by dithering,
i.e. it only paints every other pixel in a checker board pattern.
It uses the 0..15 color for that.

Other programs may use different colors for the transparent color
and the non-transparent color.
E.g. LDLite+MLCad use (153,153,153) for the transparent grey 39 (32+7)
and (170,170,170) for the non-transparent grey 7.

How are you going to implement transparent colors?
Blending is rather difficult if it has to support multiple transparent
layers correctly...
In L3Lab you may try out blending (which is not perfect...)

I can offer you a C subroutine, Color2RGB, which
converts any valid LDraw color into RGB according to
various color schemes. It also supports extended colors,
see http://home16.inet.tele.dk/hassing/l3p.html#extcol
/Lars



Message has 2 Replies:
  Re: LDraw color codes needed for rendering program
 
----- Original Message ----- From: "Lars C. Hassing" <lch@ccieurope.com> To: <lugnet.cad.dev@lugnet.com> Sent: Monday, January 08, 2001 5:32 PM Subject: Re: LDraw color codes needed for rendering program (...) and (...) 5). (...) can (...) Thanks, (...) (23 years ago, 9-Jan-01, to lugnet.cad.dev)
  Re: LDraw color codes needed for rendering program
 
----- Original Message ----- From: "Lars C. Hassing" <lch@ccieurope.com> To: <lugnet.cad.dev@lugnet.com> Sent: Monday, January 08, 2001 5:32 PM Subject: Re: LDraw color codes needed for rendering program (...) Hmmm. How's this? (URL) simple and it (...) (23 years ago, 9-Jan-01, to lugnet.cad.dev)

Message is in Reply To:
  LDraw color codes needed for rendering program
 
Hello, Over a year ago, I mentioned on this list that I was considering making a new Lego CAD program for Windows and Linux, but until now I've been really pressed for time. This weekend I finally resumed the project and got the rendering engine (...) (23 years ago, 8-Jan-01, to lugnet.cad.dev)

7 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