Subject:
|
Fix for Trans - light - blue showing as trans-dark-blue in POV-RAY
|
Newsgroups:
|
lugnet.cad.ray, lugnet.cad
|
Date:
|
Tue, 28 Nov 2000 02:46:04 GMT
|
Viewed:
|
797 times
|
| |
| |
I recently posted to lugnet.cad.ray asking for a solution to this problem.
When you use L3p to convert .dat files to .pov, it seems to convert the
trans-light-blue parts into trans-dark-blue.
Based on the suggestions, I think I've isolated the problem and have a few
work arounds.
The problem is that the color definition for color 41 (trans-light-blue) is
wrong. I believe that L3p is the culprit.
I used the fact that MLCAD displays the colors properly as a hint.
MLCAD lists color 41 as having the following RGB values:
R:153, G:192, B:240
These values are out of a maximum of 255. You can get this dialog by
clicking on 'more' in the color toolbar and clicking on that color, and then
"custom."
POV-RAY uses values from 0-1 to represent colors. So, if I divide the above
values by 255, I get (roughly):
R:.6, G:.75, B:.94
In fact, L3p generated the following (incorrect) value for color 41!
rgb <0.313726,0.313726,1>
If you understand RGB colors, you can see that the L3P version has much less
intensity in the red and green channels than the (presumably correct) MLCAD
values.
So, if I change the values in the resulting POV file, I get the same color
match as in MLCAD!
Here is a building rendered with the "normal" (incorrect) color:
http://members.home.net/hmltn1/ldraw/office1.htm
Here is the building rendered with the "modified" (correct?) color:
http://www.brickshelf.com/cgi-bin/gallery.cgi?i=21719
I think that the second version is far more accurate
There are at least 2 ways of fixing the color:
1) In your final POV-RAY file, search for "(Color41)" and change the text
(about 3 lines below) "rgb <0.313726,0.313726,1>" to "rgb(.6,.75,.94>"
2) Create an include file called legocolors.inc (you can use notepad to
paste the text from below). Bram just posted this to the lugnet.ray group.
I've reposted it below with color41 added.
To use it, you must manually insert the line:
#include "legocolors.inc"
in your POV-RAY file.
This file also "corrects" other colors. These corrections do not fix any
other nasty color issues, but they do modify the colors a bit to make them
more closely match the LEGO version.
As an example, here is a brickshelf page showing the above model in two
versions.
http://www.brickshelf.com/cgi-bin/gallery.cgi?f=2129
The left one shows it with the trans-lt-blue corrected, but without any of
the corrections in the include file. Notice how the tan is a bit too dark
and appears a bit too orange compared to real LEGO
The second one (on the right) uses the include file (actually, I just
patched the colors manually, but the effect is the same as using the include
file). Notice how the tan is slightly lighter. I think the second version
looks more like real LEGO.
I hope that helps!
(P.S. Thanks to all the folks who replied to my plea for help. Each reply
added a bit more information)
//
// Name: legocolors.inc
// Description: Contains material declarations
//
// Note: These colors are based on those created by Anton Raves
//
// Pigments:
#declare black = color rgb <0.05, 0.05, 0.05>;
#declare _blue = color rgb <0.1, 0.3, 1>;
#declare _blue2 = color rgb <0.1, 0.2, 0.6>;
#declare lt_blue = color rgb <0.3, 0.7, 1>;
#declare t_blue = color rgb <0.2, 0.6, 0.8>;
#declare t_bluex = color rgb <0.6, 0.75, 0.94>;
#declare brown = color rgb <0.4, 0.2, 0>;
#declare brown2 = color rgb <0.7, 0.4, 0.2>;
#declare chrome = color rgb <0.15, 0.15, 0.15>;
#declare cyan = color rgb <0.5, 0.825, 1>;
#declare t_cyan = color rgb <0.6, 0.925, 0.925>;
#declare dark_grey = color rgb <0.1, 0.1, 0.1>;
#declare _green = color rgb <0, 0.5, 0>;
#declare _green2 = color rgb <0, 0.7, 0>;
#declare t_green = color rgb <0, 1, 0>;
#declare gold = color rgb <0.95, 0.85, 0>;
#declare grey = color rgb <0.55, 0.55, 0.55>;
#declare grey2 = color rgb <0.35, 0.35, 0.35>;
#declare grey3 = color rgb <0.8, 0.8, 0.8>;
file://#declare t_grey = color rgb <0.15, 0.15, 0.15>;
file://#declare t_grey = color rgb <0.1, 0.1 0.095>;
#declare t_grey = color rgb <0.45, 0.45 0.4>;
#declare orange = color rgb <1, 0.5, 0.15>;
#declare orange_bright = color rgb <1, 0.35, 0.15>;
#declare _red = color rgb <1, 0, 0>;
#declare _pink = color rgb <1,.6,.65>;
#declare _tan = color rgb <.8,.7,.4>;
#declare white = color rgb <1, 1, 1>;
#declare yellow = color rgb <1, 0.8, 0>;
#declare t_yellow = color rgb <1, 0.95, 0>;
#declare yellowgreen = color rgb <0.6, 1, 0.15>;
#declare t_yellowgreen = color rgb <0.9, 1, 0.45>;
// Finishes:
#if (QUAL <= 1)
#declare lego_finish = finish { ambient 0.4 specular 1 roughness 0.005
reflection 0 }
#declare t_lego_finish = finish { ambient 0.6 specular 1 roughness 0.005
reflection 0 }
#else
#declare lego_finish = finish { ambient 0.3 specular 1 roughness 0.005
reflection .1 }
#declare t_lego_finish = finish { ambient 0.6 specular 1 roughness 0.005
reflection .1 }
#end
// Textures:
#declare black_tex = texture { pigment { color black } finish
{ lego_finish } }
#declare blue_tex = texture { pigment { color _blue } finish
{ lego_finish } }
#declare blue2_tex = texture { pigment { color _blue2 } finish
{ lego_finish } }
#declare brown_tex = texture { pigment { color brown } finish
{ lego_finish } }
#declare cyan_tex = texture { pigment { color cyan } finish
{ lego_finish } }
#declare green_tex = texture { pigment { color _green } finish
{ lego_finish } }
#declare green2_tex = texture { pigment { color _green2 } finish
lego_finish } }
#declare grey_tex = texture { pigment { color grey } finish
{ lego_finish } }
#declare grey2_tex = texture { pigment { color grey2 } finish
{ lego_finish } }
#declare orange_tex = texture { pigment { color orange } finish
lego_finish } }
#declare red_tex = texture { pigment { color _red } finish { lego_finish } }
#declare pink_tex = texture { pigment { color _pink } finish
{ lego_finish } }
#declare tan_tex = texture { pigment { color _tan } finish { lego_finish } }
#declare white_tex = texture { pigment { color white } finish
{ lego_finish } }
#declare yellow_tex = texture { pigment { color yellow } finish
lego_finish } }
#declare yellowgreen_tex = texture { pigment { color yellowgreen } finish
lego_finish } }
#declare chrome_tex = texture { pigment { color chrome } finish
lego_finish metallic reflection 0.5 brilliance 6 } }
#if (QUAL <= 1)
#declare t_blue_tex = texture { pigment { color t_blue filter 0 } finish
t_lego_finish } }
#declare t_bluex_tex = texture { pigment { color t_bluex filter 0 } finish
{ t_lego_finish } }
#declare t_cyan_tex = texture { pigment { color t_cyan filter 0 } finish
t_lego_finish } }
#declare t_green_tex = texture { pigment { color t_green filter 0 } finish
{ t_lego_finish } }
#declare t_orange_tex = texture { pigment { color orange filter 0 } finish
{ t_lego_finish } }
#declare t_red_tex = texture { pigment { color _red filter 0 } finish
t_lego_finish } }
#declare t_yellow_tex = texture { pigment { color t_yellow filter 0 }
finish { t_lego_finish } }
#declare t_yelgrn_tex = texture { pigment { color t_yellowgreen filter 0 }
finish { t_lego_finish } }
#declare t_white_tex = texture { pigment { color white filter 0 } finish
t_lego_finish } }
#declare t_grey_tex = texture { pigment { color t_grey filter 0 } finish
t_lego_finish } }
#else
#declare t_blue_tex = texture { pigment { color t_blue filter 1 } finish
t_lego_finish } }
#declare t_bluex_tex = texture { pigment { color t_bluex filter 1 } finish
{ t_lego_finish } }
#declare t_cyan_tex = texture { pigment { color t_cyan filter .9 } finish
{ t_lego_finish } }
#declare t_green_tex = texture { pigment { color t_green filter 1 } finish
{ t_lego_finish } }
#declare t_orange_tex = texture { pigment { color orange filter 0.85 }
finish { t_lego_finish } }
#declare t_red_tex = texture { pigment { color _red filter 1 } finish
t_lego_finish } }
#declare t_yellow_tex = texture { pigment { color t_yellow filter .9 }
finish { t_lego_finish } }
#declare t_yelgrn_tex = texture { pigment { color t_yellowgreen filter
0.9 } finish { t_lego_finish } }
#declare t_white_tex = texture { pigment { color white filter .95 } finish
{ t_lego_finish } }
#declare t_grey_tex = texture { pigment { color t_grey filter 1 } finish
t_lego_finish } }
#end
// Materials:
#declare Color0 = material { texture { black_tex } }
#declare Color1 = material { texture { blue2_tex } }
#declare Color2 = material { texture { green_tex } }
#declare Color4 = material { texture { red_tex } }
#declare Color6 = material { texture { brown_tex } }
#declare Color7 = material { texture { grey_tex } }
#declare Color8 = material { texture { grey2_tex } }
#declare Color9 = material { texture { blue_tex } }
#declare Color10 = material { texture { green2_tex } }
#declare Color12 = material { texture { orange_tex } }
#declare Color13 = material { texture { pink_tex } }
#declare Color14 = material { texture { yellow_tex } }
#declare Color15 = material { texture { white_tex } }
#declare Color33 = material { texture { t_blue_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color34 = material { texture { t_green_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color36 = material { texture { t_red_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color39 = material { texture { t_white_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color40 = material { texture { t_grey_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color41 = material { texture { t_bluex_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color42 = material { texture { t_yelgrn_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color43 = material { texture { t_cyan_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color44 = material { texture { t_orange_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color46 = material { texture { t_yellow_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color47 = material { texture { t_white_tex } #if (QUAL > 1)
interior { ior 1.25 } #end }
#declare Color382 = material { texture { tan_tex } }
#declare Color462 = material { texture { orange_tex } }
#declare Color383 = material { texture { chrome_tex } }
#declare Color503 = material { texture { chrome_tex } }
// EOF
|
|
Message has 3 Replies:
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|