POV-Ray : Newsgroups : povray.binaries.images : Brig Niagara WIP (34k) : Re: Brig Niagara WIP (34k) Server Time
8 Aug 2024 01:22:59 EDT (-0400)
  Re: Brig Niagara WIP (34k)  
From: Thomas de Groot
Date: 14 Oct 2005 04:11:54
Message: <434f684a@news.povray.org>
Very excellent, Tim! Like everybody else, I am always amazed at the details
and quality of your project. Must become obsessive, isn't it? ;-)
I have used, and adapted, your slopetexture / wornwood macro for my own
needs in my windows_room adaptation of Tim Nikias'. For what it's worth,
here it is for use and comment for everybody.

Thomas


/***************************************************************************
*******
 Persistence of Vision Ray Tracer Scene Description File
 File name   : TM_SlopeTex.inc
 Version     : 3.6 / MegaPOV 1.0
 Description : a slope texture by Tim McMurdo
               (with some additions/changes by TdG)

 Date        : July 2005
 Author      : Tim McMurdo
 E-mail      : p.b.i.

 Copyright (C) 2005. All rights reserved.
****************************************************************************
******/

/* ADDED/CHANGED FEATURES (by Thomas de Groot):
The following parameters have been added by me:
- Polish: which controls the specular of the paint finish (instead of
phong).
- WoodType: which controls the type of wood.
- WearSharp: which controls the transition between wood and paint.
- Woodscale: which controls the size of the underlying wood texture.
- Paintscale: which controls the size of the wood+paint texture. You should
first
              fix Paintscale before changing Woodscale, as the two are
linked together.

*/

#macro
WornWood(RGB,Polish,WoodType,WearFlat,WearEdge,WearSharp,Norm,Woodscale,Pain
tscale,Rot,Tran)
        #declare Texture1 =
                texture {
                        pigment {
                            wood
                            turbulence <0.1, 0.5, 1>
                            octaves 5
                            lambda 3.25
                            scale <0.15, .5, 1>
                            rotate <5, 10, 5>
                            translate -x*2

                                color_map {
                                    [0.0 color RGB]
                                    [0.1 color RGB]
                                    [0.1 color 0.95*RGB]
                                    [0.9 color 0.95*RGB]
                                    [1.0 color RGB]
                                }


                        }
                        normal {
                          wood 0.2         // any pattern optionally
followed by an intensity value [0.5]
                          //turbulence <0.1, 0.5, 1>
                          turbulence <0.2, 0.2, 0.01>
                          octaves 5
                          lambda 3.25
                          //scale <0.15, 0.5, 0.2>
                          scale <0.5, 0.5, 0.9>
                          rotate <3, 2, 0>
                          translate -x*2
                          accuracy 0.02   // changes the scale for normal
calculation [0.02]
                          //scale 0.3       // any transformations
                        }
                        finish{
                                ambient 0
                                specular Polish // TdG
                                roughness 0.01
                                //phong 0.35
                                //phong_size 100

                        }
                }

        #declare TWood1 =
          texture {WoodType scale Woodscale}
          texture {pigment{color rgbt <255, 155, 23,
0.999999*256>/256*0.25} }

        #declare TWood2 =
          texture {WoodType scale Woodscale}
          texture {pigment{color rgbt <255, 155, 23,1.5*256>/256*0.45} }

        #declare PaintedWood1 =
          texture {
            bozo
            //granite
            texture_map {
              [0          TWood1]
              [WearFlat      TWood2]
              [WearFlat+WearSharp Texture1]
              [1.0         Texture1]
            }
            warp {turbulence 0.2}
            scale Paintscale
          }

        #declare PaintedWood2 =
          texture {
            bozo
            //granite
            texture_map {
              [0          TWood1]
              [WearEdge      TWood2]
              [WearEdge+WearSharp Texture1]
              [1.0         Texture1]
            }
            warp {turbulence 0.2}
            scale Paintscale
          }

         #declare TM_SlopeTex =
           texture {
                slope { <0, -1, 0> }
                    texture_map{
                      [0 PaintedWood1]
                      //[0.1 PaintedWood1] // comment out for smooth
transition
                      [0.1 PaintedWood2]
                      //[0.4 PaintedWood2] // comment out for smooth
transition
                      [0.4 PaintedWood1]
                      [0.6 PaintedWood1]
                      //[0.6 PaintedWood2] // comment out for smooth
transition
                      [0.9 PaintedWood2 ]
                      [1.0 PaintedWood1]
                    }
                warp {turbulence 0.05}
                rotate Rot
                translate Tran
           }

#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.