POV-Ray : Newsgroups : povray.general : Help with plastic texture : Re: Help with plastic texture Server Time
29 Jul 2024 14:19:10 EDT (-0400)
  Re: Help with plastic texture  
From: Alain
Date: 13 May 2011 21:54:47
Message: <4dcde0e7$1@news.povray.org>

> Hi all, I have been struggling bigtime trying to get a realistic plastic
> texture to work with a hdr background.
>
> Whenever I get close it allways looks washed out or way too reflective (ie
> like shiney metal), I'd really like a brilliant white shiney surface.  For
> example the same as a brand new white painted car panel.
>
> If someone could help me out I would much appreciate it!
>
> An quick mock up of my scene is below:
>
> // ----------- code start
> #include "colors.inc"
> #include "textures.inc"
>
> camera {
>    location<0, 0, 10>
>    look_at<0, 0, 0>
>    right x * image_width / image_height
> }
>
> sphere {
>    0, 12000
>    hollow
>    pigment { image_map { hdr "Factory_Catwalk_2k.hdr" map_type 1 } }
>    finish { diffuse 0 ambient 1 }
> }
>
> sphere {
>    0, 3
>    pigment { color rgb 1 }
>    finish { specular 1 roughness 0.0001 reflection 0.13 }
> }
> // ----------- code end
>
> Thanks!
>
> Cheers Dre
>
>

Constant reflection is good for metallic surfaces and mirrors.
Most surfaces that are not intended as mirrors but are reflective should 
use variable reflection, normaly with the fresnel attribute. It must 
also have an ior for this to work.
Trevor suggest an ior value from 1.15 to 1.5 and a reflection going from 
0 to 1.
Mamy plastics have an ior larger than that, you can use an ior in the 
1.2 to 1.5 range and reduce the maximum reflection falue, somthing like 
0, 0.5 can give good results.
That way, the reflectivity gets capped and dark objects' reflection will 
fade away more.

Your specular looks to large. It's usualy beter to keep is somewhat 
lower. A roughness of 0.0001 is for a highly polished surface. It can 
make your highlights to harsh and to strong or overwhelming.

If you want to realy do it right, use the new SSLT feature. Reserve it 
for relatively small objects, as the effect importance dimishes as the 
dimention gets larger and it's realy slow.
Take note that this feature is still under devlopment and it 
implementation WILL change in the future (as soon as 3.7 RC4).
With the default mm_per_unit value, it means that your sphere is 3 cm in 
radius. If your scene use units of 1 m, it should be set to mm_per_unit 
1000.

Your sphere can looks like this (without SSLT):
sphere {
   0, 3
   pigment { color rgb 1 }
   finish { specular 0.5 roughness 0.001 reflection{0 0.63 fresnel} 
ambient 0 diffuse 0.6 conserve_energy }
interior{ior 1.32}
}

conserve_energy is not needed here, but I have the habit of puting in in 
case that later I want to change the pigment to a transparent one.

If you want to be thorough, you can also use blured reflection by using 
one of the usual technics:
Micro normals, using a buzzy normals pattern scalled very small. 
Possibly averaging a small number of randomly displaced patterns.

Averaged macro normals, using up to 255 (at least 20) smooth normals 
scalled large and randomly displaced a large distance.


Alain


Post a reply to this message

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