POV-Ray : Newsgroups : povray.binaries.images : finish maps [67kbu] : Re: finish maps [67kbu] Server Time
16 Nov 2024 06:17:22 EST (-0500)
  Re: finish maps [67kbu]  
From: Gilles Tran
Date: 10 Mar 2003 09:20:41
Message: <3e6c9f39@news.povray.org>

3e686d42@news.povray.org...
> A quick example to illustrate the finish maps in mlpov, here we use the
same
> map for specular and reflection but they could have been different.
> Unfortunately the patch is far from complete (there are problems with
> transformations, etc)

Note that for those who can't wait for the patch, finish map effects can
already be done using image_pattern. The patch may have other advantages of
course.

G.


#include "colors.inc"
global_settings {assumed_gamma 1.0}
camera {location -z*4+y*0.5 direction 1.5*z   right
x*image_width/image_height look_at <0.0, 0.0,  0.0>}
sky_sphere {pigment {gradient y color_map {[0.0 rgb <0.6,0.7,1.0>][0.7 rgb
<0.0,0.1,0.8>]}}}
light_source { 0, rgb 1 translate -z*50 rotate x*30 rotate y*-70}
light_source { 0, rgb 0.5 translate -z*50 rotate x*20 rotate y*50}
plane {  y, -1  pigment { color rgb <0.7,0.5,0.3> }}
#declare N_Sphere=normal{
    average
    normal_map{
        [2 bump_map{jpeg "metal_44_s.jpg" map_type 1 interpolate 2 }
bump_size 0.2]
        [1 bumps 0.4 scale 1/100 ]
    }
}
sphere {
    0.0, 1
    texture {
        image_pattern{jpeg "metal_44_s.jpg" map_type 1 interpolate 2 }
        texture_map{
            [0 pigment{Red*0.1} normal{N_Sphere} finish{ambient 0 diffuse
0.6 specular 0.1 reflection 0 roughness 0.01}]
            [0.001 pigment{White*0.1} normal{N_Sphere} finish{ambient 0
diffuse 0.6 specular 0.1 reflection 0 roughness 0.01}]
            [0.2 pigment{White*0.5} normal{N_Sphere} finish{ambient 0
diffuse 0.6 specular 0.1 reflection 0 roughness 0.01}]
            [0.6 pigment{White*0.5} normal{N_Sphere } finish{ambient 0
diffuse 0.6 specular 1 reflection {0.3,0.8} roughness 0.03}]
        }
    }
    rotate y*20
}

--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message


Attachments:
Download 'test_finishmap.jpg' (11 KB)

Preview of image 'test_finishmap.jpg'
test_finishmap.jpg


 

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