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 / 1378
1377  |  1379
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
Re: POV Color Cheat?
Newsgroups: 
lugnet.cad.ray
Date: 
Mon, 5 Aug 2002 20:45:35 GMT
Highlighted: 
(details)
Viewed: 
818 times
  
In lugnet.cad.ray, Dave Schuler writes:
Would it be possible to inline certain hard-to-achieve POV-Ray colors in a
primitive file so that the color would be available in rendered models without
having to tweak the output file?  Something like this:

0 stud.dat primitive
0 L3P IFNOTPOV
1 16 0 0 0 6 0 0 0 1 0 0 0 6 4-4EDGE.DAT
1 16 0 0 0 6 0 0 0 -4 0 0 0 6 4-4CYLI.DAT
1 16 0 -4 0 6 0 0 0 1 0 0 0 6 4-4DISC.DAT
1 16 0 -4 0 6 0 0 0 1 0 0 0 6 4-4EDGE.DAT
0 L3P ELSEPOV
0  #declare color384 =
0  { whatever RGB values you like}
0  { as well as any textures, etc...}

[ snipped ]

Intresting, and yes it will work but with a few buts.
First you will need to do the color-declaring before you do your model. And
you have to (well, not "have to" but is saver to) "undeclare" (or undef) the
old color definition.
This syntax works:

0 L3P IFPOV
0 #undef Color384  // just to be sure
0 #ifndef (Color384)
0 #declare Color384 =  #if (version >= 3.1) material { #end texture {
0 pigment { rgb <0.8,0.5,0.15> }
0 finish { ambient 0.45 diffuse 0.85 }
0 finish { phong 0.5 phong_size 40 reflection 0.5 }
0 #if (BUMPS) normal { BUMPNORMAL } #end
0 #end
0 } #if (version >= 3.1) } #end
0 L3P ENDPOV
1 10 0 0 0 1 0 0 0 1 0 0 0 1 4198.DAT
1 384 140 0 140 0 0 1 0 1 0 -1 0 0 4198.DAT
0

Again, I used #undef to clear the old definition (line 2) and line 3 checks
if there already is a definition for Color384.
Line 3 to 10 is copied from the normal L3P/POV color-definition. You can add
or change parameters if you want. After the ENDPOV the LDraw model starts.
Good idea Dave!!!



Message has 2 Replies:
  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 (...) (17 years ago, 9-Apr-07, to lugnet.cad.ray)
  colors.dat (Was: POV Color Cheat?)
 
Here's an "include file" with some redifinitions of the most horrible L3P colors: 0 Color Redifinition Include File 0 Name: colors.dat 0 Author: Tore Eriksson 0 L3P IFPOV 0 #undef Color1 0 #ifndef (Color1) 0 #declare Color1 = #if (version >= 3.1) (...) (17 years ago, 29-Jan-08, to lugnet.cad.ray)

Message is in Reply To:
  POV Color Cheat?  [DAT]
 
Would it be possible to inline certain hard-to-achieve POV-Ray colors in a primitive file so that the color would be available in rendered models without having to tweak the output file? Something like this: 0 stud.dat primitive 0 L3P IFNOTPOV 1 16 (...) (22 years ago, 5-Aug-02, 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