POV-Ray : Newsgroups : povray.binaries.images : Dirty Glass texture Server Time
1 Nov 2024 14:18:41 EDT (-0400)
  Dirty Glass texture (Message 1 to 3 of 3)  
From: s day
Subject: Dirty Glass texture
Date: 16 Mar 2013 05:55:01
Message: <web.5144408929e5627a4d6e54800@news.povray.org>
Hi,

I am trying to make a texture that looks like old dirty glass.

I am rendering the object using an HDR probe and no lightsources and my test
renders were running fairly quickly until I started using a texture_map with
layered textures.

I noticed that when I apply a texture using a texture_map (e.g. bozo going from
clean to dirty glass) the performance of the radiosity stage is terrible
compared to a single layered texture (about 10 times slower).

Also, I noticed it looks like you can see the dirt on the interior surface (top
image below) which I suppose is expected but not what I wanted.
I figured I could fix this by applying a clean glass material to the interior
object which created the image in the middle (not what I was expecting, is there
a simple explanation for this one that I do not know?) also the performance was
still bad.

Next I tried adding a simple:

texture { pigment { rgbt 1 } }

to the interior object and that produced the bottom image which rendered a lot
quicker.

The question is What woudld the correct approach be to producing such an
object/texture?

If it helps the texture(s)/object code is shown below below:


#declare dirt = texture {
    pigment { bozo scallop_wave turbulence 0.8753 omega 0.775 lambda 3.2 octaves
7
    colour_map {
        [ 0.0 rgbt 1 ]
        [ 0.75 rgbt 1 ]
        [ 0.75 rgbt <0.5, 0.34, 0.25, 1> ]
        [ 0.9 rgbt <0.25, 0.2, 0.15, 0.5> ]
        [ 1.0 rgbt <0.5, 0.34, 0.25, 1.0> ]
    }
    scale 0.02
    }
    normal { granite 0.5 scale 0.001 }
    finish { diffuse albedo 0.81 reflection { 0.001 0.01 fresnel on } }
}

#declare vdirt = texture {
    pigment { bozo scallop_wave turbulence 0.8753 omega 0.775 lambda 3.2 octaves
7
    colour_map {
        [ 0.0 rgbt 1 ]
        [ 0.55 rgbt 1 ]
        [ 0.55 rgbt <0.25, 0.14, 0.09, 1> ]
        [ 0.9 rgbt <0.08, 0.06, 0.045, 0.125> ]
        [ 1.0 rgbt <0.25, 0.14, 0.09, 0.45> ]
    }
    scale 0.02
    }
    normal { granite 0.5 scale 0.001 }
    finish { diffuse albedo 0.75 reflection { 0.001 0.005 fresnel on } }
}


#declare lampGlassTex = texture
{
    pigment {
        rgbf <0.99, 0.96, 0.92, 1>
    }

    finish {
        specular 0
        roughness 0.002
        ambient 0
        diffuse albedo 0.125
        brilliance 4
        reflection {
            0.01, 0.2
            fresnel on
        }
        conserve_energy
    }
    normal { granite 0.01 turbulence 0.5 scale <0.04, 0.1, 0.04> }

}

#declare lampGlassTexDirt = texture
{
lampGlassTex
}
texture { dirt scale 4 }

#declare lampGlassTexVDirt = texture
{
lampGlassTex
}
texture { vdirt scale 4 }


#declare theTex = material{
    texture {
        bozo  scallop_wave turbulence 0.675 omega 0.7
        texture_map {
            [ 0.0 lampGlassTexVDirt ]
            [ 0.15 lampGlassTexDirt ]
            [ 1.0 lampGlassTex ]
        }
        scale 0.22
//        translate <0, -1.1, 0>
    }
  interior {
    ior 1.5
    fade_distance 0.5
    fade_power 1001
  }
  }

difference {
sphere { <3, 2, 0> 1
}
sphere { <3, 2, 0> 0.95
// uncomment either single texture used for interior
// texture { pigment { rgbt 1 } }
//
// or material used for interior
//
//material { texture { lampGlassTex }   interior {
//    ior 1.5
//    fade_distance 0.5
//    fade_power 1001
//  }
//   }

}
material {
 theTex
 }

}


Thanks

Sean


Post a reply to this message


Attachments:
Download 'glass.png' (170 KB)

Preview of image 'glass.png'
glass.png


 

From: Cousin Ricky
Subject: Re: Dirty Glass texture
Date: 16 Mar 2013 07:45:01
Message: <web.51445aa566ddea3478641e0c0@news.povray.org>
What are your radiosity settings?

Which version of POV-Ray are you using?


Post a reply to this message

From: s day
Subject: Re: Dirty Glass texture
Date: 16 Mar 2013 07:55:02
Message: <web.51445d7f66ddea344d6e54800@news.povray.org>
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> What are your radiosity settings?
>
> Which version of POV-Ray are you using?

Hi,

I am using 3.7 RC7 and the radiosity settings are below they are very low
quality as I reduced them to trace the sample images just to speed up the
renders as I was too impatient to wait:

#default{ finish{ ambient 0 diffuse 1 conserve_energy }}

// radiosity (global illumination) settings

global_settings {
assumed_gamma 1.0
  radiosity {
    pretrace_start 0.08
    pretrace_end   0.01
    count 50
    nearest_count 10
    error_bound 1.2
    recursion_limit 2
    low_error_factor .5
    gray_threshold 0.0
    minimum_reuse 0.015
    brightness 1
    adc_bailout 0.01/2
    normal on
  }
}

originally I had pretrace_end 0.001, count 900, nearest_count 20 and error_bound
0.8 but other than with the simple interior texture it was too slow to wait for
any image with just a single sphere image ;-)

Sean


Post a reply to this message

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