home *** CD-ROM | disk | FTP | other *** search
- /*
- Configrable marble textures by Norm Bowler
-
- This marble texture hase 4 zones:
-
- 1 Base color only 0 - MfLo
- 2 Blend from base to fade color MfLo - MfHi
- 3 Blend from fade to vein color MfHi - .95
- 4 Vein color only .95 - 1
-
- You can declare Mbase, Mfade and Mvein to set
- marble colors. Additionaly, you can declare
- MfLo and MfHi to adjust the bandwidth of the
- fade color.
-
- MfLo can have a value from 0 to MfHi
- MfHi can have a value form MfLo to .95
-
- Increasing MfLo increases area of base color only.
- Decreasing MfHi increases width of vein.
-
- */
-
- //////////////////////
- // Textures
- //////////////////////
-
- #include "colors.inc"
- #include "textures.inc"
-
- //#1: White / Black
- #declare Mbase = color Gray95
- #declare Mfade = color Gray65
- #declare Mvein = color Gray10
- //my idea of "standard" values
- #declare MfLo = .2 //low boundary of fade
- #declare MfHi = .85 //high boundary of fade
-
- #declare NBmarble=
- texture {
- pigment {marble
- turbulence 1.15
- color_map{
- [0 color Mbase]
- [MfLo color Mbase]
- [MfHi color Mfade]
- [.95 color Mvein]
- [1 color Mvein]
- }
- rotate <57,33,-19>
- }
- finish {Shiny
- reflection .2
- }
- }
-
-
-
- //#2: White / Dk Blue
- #declare Mbase = color Quartz
- #declare Mfade = color LightSteelBlue
- #declare Mvein = color MidnightBlue
- //not much base, thick vein
- #declare MfLo = .05
- #declare MfHi = .75
-
- #declare NBmarble2=
- texture {NBmarble
- pigment{
- color_map{
- [0 color Mbase]
- [MfLo color Mbase]
- [MfHi color Mfade]
- [.95 color Mvein]
- [1 color Mvein]
- }
- }
- }
-
-
-
- //#3: Wheat / Green
- #declare Mbase = color Wheat
- #declare Mfade = color red .4 green .5 blue .45
- #declare Mvein = color HuntersGreen
- //not much base, thin vein
- #declare MfLo = .05
- #declare MfHi = .92
-
- #declare NBmarble3=
- texture {NBmarble
- pigment{
- color_map{
- [0 color Mbase]
- [MfLo color Mbase]
- [MfHi color Mfade]
- [.95 color Mvein]
- [1 color Mvein]
- }
- }
- }
-
-
-
- //#4: White / Red
- #declare Mbase = color Quartz
- #declare Mfade = color red .8 blue .65 green .55
- #declare Mvein = color red .33 green .1
- //lots of base, very thick vein
- #declare MfLo = .5
- #declare MfHi = .65
-
- #declare NBmarble4=
- texture {NBmarble
- pigment{
- color_map{
- [0 color Mbase]
- [MfLo color Mbase]
- [MfHi color Mfade]
- [.95 color Mvein]
- [1 color Mvein]
- }
- }
- }
-
-
-
- //#5: Black / Gold
- #declare Mbase = color Gray10
- #declare Mfade = color red .5 green .5 blue .05
- #declare Mvein = color BrightGold
- //lots of base, very thin vein
- #declare MfLo = .8
- #declare MfHi = .94
-
- #declare NBmarble5=
- texture {NBmarble
- pigment{
- color_map{
- [0 color Mbase]
- [MfLo color Mbase]
- [MfHi color Mfade]
- [.95 color Mvein]
- [1 color Mvein]
- }
- }
- }
-
-
-
- //////////////////////
- // Setup
- //////////////////////
-
- #declare Cht=(3)
-
- camera {
- location <0, Cht+2,-3>
- direction <0, 0, 1>
- up <0, 1, 0>
- right <4/3, 0, 0>
- look_at <0, Cht/2, 1.5>
- }
-
- light_source {<50, 500, -200> color White}
-
- background {color Gray50}
-
- default {
- finish {
- ambient .3
- diffuse .8
- }
- }
-
-
-
- //////////////////////
- // Demo Objects
- //////////////////////
-
- #declare Mrad = .3
-
- cylinder {
- <-2,0,0>,
- <-2,Cht,0>, Mrad
- texture {NBmarble}
- }
-
-
-
- cylinder {
- <-1,0,0>,
- <-1,Cht,0>, Mrad
- texture {NBmarble2}
- }
-
-
-
- cylinder {
- <0,0,0>,
- <0,Cht,0>, Mrad
- texture {NBmarble3}
- }
-
-
-
- cylinder {
- <1,0,0>,
- <1,Cht,0>, Mrad
- texture {NBmarble4
- rotate y * 90 //default is boring at this point
- }
- }
-
-
-
- cylinder {
- <2,0,0>,
- <2,Cht,0>, Mrad
- texture {NBmarble5}
- }
-
-
- // Supplied textures
-
-
- cylinder {
- <-1,0,2>,
- <-1,Cht,3>, Mrad
- texture {Red_Marble}
- }
-
-
-
- cylinder {
- <0,0,2>,
- <0,Cht,3>, Mrad
- texture {White_Marble}
- }
-
-
-
- cylinder {
- <1,0,2>,
- <1,Cht,3>, Mrad
- texture {Blood_Marble}
- }
-
-
-