To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.rayOpen lugnet.cad.ray in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Ray-Tracing / 2783
2782  |  2784
Subject: 
Re: POV Color Cheat! Turn Pink into Medium Blue
Newsgroups: 
lugnet.cad.ray
Date: 
Mon, 9 Apr 2007 23:39:09 GMT
Viewed: 
7103 times
  
In lugnet.cad.ray, Tore Eriksson wrote:
Here's an example of how to turn all Color13 (pink) parts into Color73 (medium
blue):

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

0 Color 73 Test
0 Name: Color73.ldr
0 Author: Tore Eriksson

1 16  0 0 0  1 0 0  0 1 0  0 0 1  C13-73.dat
1 1  0 0 0  1 0 0  0 1 0  0 0 1  3001.dat
1 13  0 -24 0  1 0 0  0 1 0  0 0 1  3001.dat
0


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

0 POV-Ray Redefine Color 13 (pink) into Color 73 (medium blue)
0 Name: C13-73.dat
0 Author: Tore Eriksson
0 REM Idea ripped from Jeroen de Haan and Dave Schuler
0 REM http://news.lugnet.com/cad/ray/?n=1378

2 24  0 -2 0  0 2 0

0 L3P IFPOV
0 #undef Color13  // just to be sure
0 #ifndef (Color13)
0 #declare Color13 =  #if (version >= 3.1) material { #end texture {
0 pigment { rgb <0.43,0.6,0.785> }
0 pigment { rgb <0.43,0.6,0.785> }
0 finish { ambient AMB diffuse DIF }
0 #if (QUAL > 1)
0 finish { phong 0.5 phong_size 40 reflection 0.08 }
0 #if (BUMPS) normal { BUMPNORMAL } #end
0 #end
0 } #if (version >= 3.1) } #end
0 #end
0 L3P ENDPOV
0

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

Just note that the LDraw viewer programs will not change the colors, only the
POV-Ray output.

If you want to see the medium blue in LDView, just add the following line to
C13-73.dat (anywhere outside the IFPOV section):

0 !COLOUR Medium_Blue CODE   13  VALUE #6E99C8  EDGE 0

Tore, is the color 24 line in the file necessary in order to make it work in
L3P?  It won't show up in L3P output, but it will show up in other renderers.

--Travis



Message has 2 Replies:
  Re: POV Color Cheat! Turn Pink into Medium Blue
 
(...) Good to know. Thanks! (...) I kind of recall that. In some cases, I've seen that L3P ignores an LDraw file with just Type 0 lines. I haven't checked if the IFPOV code makes it not ignore C13-73.dat, but I just did it in a routine manner. /Tore (18 years ago, 9-Apr-07, to lugnet.cad.ray)
  Re: POV Color Cheat! Turn Pink into Medium Blue
 
(...) I thought it was, but in this case it wasn't. The color 24 line can be skipped. And the double pigment declaration was just a pure mistake; one definition is of course sufficient. :) /Tore (18 years ago, 9-Apr-07, to lugnet.cad.ray)

Message is in Reply To:
  Re: POV Color Cheat! Turn Pink into Medium Blue  [DAT]
 
(...) This is a great idea that deserves to be highlighted while we're waiting for L3P and other programs to support ldconfig.ldr! Inpired be the objects like timers, dialog objects, menu items etc I add to a Form in a Delphi project, I just came up (...) (18 years ago, 9-Apr-07, to lugnet.cad.ray)

11 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