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 / 5865
5864  |  5866
Subject: 
Re: LDraw color codes needed for rendering program
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 9 Jan 2001 00:53:33 GMT
Viewed: 
442 times
  
----- 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


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.

Thanks, this is helpful.


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?

I have several algorithms in mind, that I want to test them before I commit.
However, in a CAD program, I think blazing rendering speed is more important
than having true transparency.  In other words, transparent parts might
appear as brightly-colored solid parts in the initial releases, or I might
fake them in some other way.

Eventually I envision assigning an opacity of 0 to 255 to every transparent
color code.  There would be a rendering option that the user could use to
control the level of photorealism.


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


I would like to take a look at your function.

Up till now I've been planning to store the color assignments in a simple
text file that would be parsed upon running the program.  This way users can
create custom colors, specifying the Red/Green/Blue/Opacity components of
each.

-Gary



Message has 1 Reply:
  Re: LDraw color codes needed for rendering program
 
(...) Me too! I was just about to say he could get a copy of the function from the L3 parser code in ldglite but it wasn't there. Even worse, it turns out I just commented out the call to Color2RGB() in L3Input.cpp when I couldn't find a copy of (...) (23 years ago, 9-Jan-01, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDraw color codes needed for rendering program
 
Gary Williams wrote... (...) You may have a look in this L3Lab generated table: (URL) 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 (...) (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