POV-Ray : Newsgroups : povray.general : Override textures and materials? : Re: Override textures and materials? Server Time
21 May 2024 21:24:40 EDT (-0400)
  Re: Override textures and materials?  
From: Stephen
Date: 16 Jan 2016 04:42:37
Message: <569a108d$1@news.povray.org>
On 1/16/2016 8:10 AM, Thomas de Groot wrote:
> On 16-1-2016 5:54, Mike Horvath wrote:
>> Is there a way to force an override of preconfigured textures and
>> materials of a scene? I would like to set the texture of my scene to a
>> special texture used to render ChromaDepth 3D images. However, I don't
>> want to go back and edit every single object in my scene. Thanks.
>>
>
> My experience is that you will have to comment the old ones out or
> delete them. Later textures do not override previous ones in a scene file.
>
Are you sure about that Thomas?

I use Bishop3D which does not support PovRay 3.7. So if I want to use 
PovRay 3.7 textures I will use a 3.6 texture in the Bishop3D scene but 
redifine the tecture before the object is declared.

Sample code generated by Bishop3D.


#version 3.7;

global_settings {
adc_bailout       0.0039
ambient_light     rgb <1.000,1.000,1.000>
assumed_gamma     1 //2.200
irid_wavelength   rgb <0.250,0.180,0.140>
max_trace_level   5
number_of_waves   10
noise_generator   3
charset           ascii
}

background { color rgb <0.000,0.000,0.000> }

// 
****************************************************************************
// referenced scene items and forced visible scene items declaration begin
// 
****************************************************************************

#declare Shadow_Clouds_Mid =
pigment {
bozo
color_map {
[0.000 rgbft <0.850,0.850,0.850,0.000,0.000>]
[0.100 rgbft <0.750,0.750,0.750,0.000,0.000>]
[0.500 rgbft <1.000,1.000,1.000,0.000,1.000>]
}

rotate    <0.0,0.0,90.000>
rotate    <180.000,0.0,0.0>
scale     <1.000,6.000,6.000>
rotate    <-180.000,0.000,-90.000>
turbulence <0.650,0.650,0.650>
octaves 6
lambda 2.000
omega 0.700
}

#declare Shadow_Clouds_Bot =
pigment {
bozo
color_map {
[0.000 rgbft <0.850,0.850,0.850,0.000,0.000>]
[0.100 rgbft <0.750,0.750,0.750,0.000,0.000>]
[0.500 rgbft <1.000,1.000,1.000,0.000,1.000>]
}

rotate    <0.0,0.0,90.000>
rotate    <180.000,0.0,0.0>
scale     <1.000,6.000,6.000>
rotate    <-180.000,0.000,-90.000>
translate <0.000,-0.150,0.000>
turbulence <0.650,0.650,0.650>
octaves 6
lambda 2.000
omega 0.700
}

#declare Shadow_Clouds_Top =
pigment {
color rgbft <0.196,0.600,0.800,0.000,0.000>
}

#declare Red_Texture =
texture {
pigment {
color rgbft <1.000,0.000,0.000,0.000,0.000>
}

}

#declare Blue_White_Tiles2 =
texture {
checker
texture {
pigment {
color rgbft <1.000,1.000,1.000,0.000,0.000>
}

}

texture {
pigment {
color rgbft <0.000,0.502,1.000,0.000,0.000>
}

}

rotate    <0.0,0.0,180.000>
rotate    <-90.000,0.0,0.0>
scale     <-300.000,-300.000,-1000.000>
rotate    <90.000,0.000,-180.000>
rotate    <0.000,-180.000,0.000>
scale     <0.010,0.010,0.010>
}

#declare Camera0 =
camera {
perspective
location <-3.5,46.0,-195.0>
up y
right 1.333*x
angle 33.000
sky <0.0,1.0,0.0>
look_at < 0.000, 7.500, 0.000 >
}


// 
****************************************************************************
// referenced scene items and forced visible scene items declaration end
// 
****************************************************************************

union {
light_source {
< 0.00, 0.00, 0.00 >, color rgb <1.000,1.000,1.000>
fade_power 0.000
fade_distance 100.000
media_attenuation off
media_interaction on
translate <15.0,100.00,-200.0>
}

light_source {
< 0.00, 0.00, 0.00 >, color rgb <1.000,1.000,1.000>
fade_power 0.000
fade_distance 100.000
media_attenuation off
media_interaction on
translate <-25.0,55.0,-200.0>
}

}

sky_sphere {
pigment{ Shadow_Clouds_Top }
pigment{ Shadow_Clouds_Mid }
pigment{ Shadow_Clouds_Bot }

}

plane {
y , 0
texture{ Blue_White_Tiles2 }
scale     <10.00,1.00,10.00>
}


//------- Sphere0 Raw Script Begin -------
#declare Red_Texture =
texture {
   pigment {
     color rgbft <1.000,1.000,0.000,0.000,0.000>
   }

}

//------- Sphere0 Raw Script End ---------

sphere {
0.0, 1.00
texture{ Red_Texture }
scale     <5.954000,5.954000,5.954000>
rotate    <90.00,0.00,0.00>
translate <0.00,5.6490,0.00>
}


camera{ Camera0 }



-- 

Regards
     Stephen


Post a reply to this message

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