POV-Ray : Newsgroups : povray.general : Help with plastic texture Server Time
26 Nov 2024 05:40:16 EST (-0500)
  Help with plastic texture (Message 1 to 8 of 8)  
From: Dre
Subject: Help with plastic texture
Date: 12 May 2011 22:15:45
Message: <4dcc9451@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


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Help with plastic texture
Date: 13 May 2011 09:20:00
Message: <web.4dcd2f31d464176481c811d20@news.povray.org>
"Dre" <and### [at] gmailcom> wrote:
> 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

first you typically want to explicitly set your diffuse and ambient values
(ambient 0).  For diffuse, I find values from 0.4 to 0.6 usually adequate.

The next step is managing the reflectivity.  I find it is always best to revert
to fresnel reflection.  With this you need to set an ior value, for this I will
typically use from 1.15 to 1.3 depending on how shiny I would like it.

The specular part is optional, as you are using true reflections, but sometimes
it does help a little.  But keep it low and adjust the roughness value for the
'diffuseness' you would like.

sample plastic:

material{
  texture{
    pigment{rgb <1,0,0>}
    finish{
      conserve_energy
      diffuse 0.6
      ambient 0
      specular 0.5
      roughness 0.05
      reflection{0 1 fresnel on metallic 0}
    }
  }
  interior{ior 1.16}
}

With material such as this, especially when used with an HDR environment map,
the most important part is how they reflect the background.  For plastic, you
want to make sure that less bright areas of the background don't reflect much,
but that bright highlights do.


-tgq


Post a reply to this message

From: Alain
Subject: Re: Help with plastic texture
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

From: Dre
Subject: Re: Help with plastic texture
Date: 15 May 2011 20:15:52
Message: <4dd06cb8@news.povray.org>
"Dre" <and### [at] gmailcom> wrote in message 
news:4dcc9451@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
>
>

Hi, replying here to both Trevor and Alain.

Thank you both for your help, those examples give me the finish I am looking 
for, but no matter what I do, the sphere allways comes out black.  The metal 
surfaces in my image look great, but anything coloured is black (or very 
very dark).  I'm not using any lights as I thought the hdr took care of 
that.  If I stick a light in there it all looks wrong and way to bright...

In the past I've only really used hdr backgrounds for metal things, but now 
I'm trying to use other surfaces and am really struggling.

I've attached a pic of what I'm talking about.  That black thing needs to be 
white :)

Cheers Dre


Post a reply to this message


Attachments:
Download 'droid.png' (110 KB)

Preview of image 'droid.png'
droid.png


 

From: Dre
Subject: Re: Help with plastic texture
Date: 15 May 2011 20:28:22
Message: <4dd06fa6@news.povray.org>
"Dre" <and### [at] gmailcom> wrote in message 
news:4dd06cb8@news.povray.org...
> "Dre" <and### [at] gmailcom> wrote in message
> news:4dcc9451@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
>>
>>
>
> Hi, replying here to both Trevor and Alain.
>
> Thank you both for your help, those examples give me the finish I am 
> looking
> for, but no matter what I do, the sphere allways comes out black.  The 
> metal
> surfaces in my image look great, but anything coloured is black (or very
> very dark).  I'm not using any lights as I thought the hdr took care of
> that.  If I stick a light in there it all looks wrong and way to bright...
>
> In the past I've only really used hdr backgrounds for metal things, but 
> now
> I'm trying to use other surfaces and am really struggling.
>
> I've attached a pic of what I'm talking about.  That black thing needs to 
> be
> white :)
>
> Cheers Dre
>
>
>
Hi again, well I have managed to use an area light to make it look white. 
However that makes all the metal in the image washed out and too bright.

About the only way I think I can get around this is with a light_group but 
surely there is a more elegant way of solving this?

Cheers Dre


Post a reply to this message


Attachments:
Download 'droid.png' (99 KB)

Preview of image 'droid.png'
droid.png


 

From: Trevor G Quayle
Subject: Re: Help with plastic texture
Date: 15 May 2011 20:35:01
Message: <web.4dd07015d4641764b05ef170@news.povray.org>
"Dre" <and### [at] gmailcom> wrote:
> "Dre" <and### [at] gmailcom> wrote in message
> news:4dcc9451@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
> >
> >
>
> Hi, replying here to both Trevor and Alain.
>
> Thank you both for your help, those examples give me the finish I am looking
> for, but no matter what I do, the sphere allways comes out black.  The metal
> surfaces in my image look great, but anything coloured is black (or very
> very dark).  I'm not using any lights as I thought the hdr took care of
> that.  If I stick a light in there it all looks wrong and way to bright...
>
> In the past I've only really used hdr backgrounds for metal things, but now
> I'm trying to use other surfaces and am really struggling.
>
> I've attached a pic of what I'm talking about.  That black thing needs to be
> white :)
>
> Cheers Dre

if you are using just reflection with no light and no radiosity, it will come
out black.  Plastic reflection ('metallic off') does not colour the reflection.
The surface colour of the base object will come from diffuse interaction with
light sources, so if you don't have any, you can expect the object colour to
show up black (no light = no diffuse interaction), reflection of the background
alone won't colour it.

-tgq


Post a reply to this message

From: Dre
Subject: Re: Help with plastic texture
Date: 15 May 2011 22:22:27
Message: <4dd08a63@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message 
news:web.4dd07015d4641764b05ef170@news.povray.org...
> "Dre" <and### [at] gmailcom> wrote:
>> "Dre" <and### [at] gmailcom> wrote in message
>> news:4dcc9451@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
>> >
>> >
>>
>> Hi, replying here to both Trevor and Alain.
>>
>> Thank you both for your help, those examples give me the finish I am 
>> looking
>> for, but no matter what I do, the sphere allways comes out black.  The 
>> metal
>> surfaces in my image look great, but anything coloured is black (or very
>> very dark).  I'm not using any lights as I thought the hdr took care of
>> that.  If I stick a light in there it all looks wrong and way to 
>> bright...
>>
>> In the past I've only really used hdr backgrounds for metal things, but 
>> now
>> I'm trying to use other surfaces and am really struggling.
>>
>> I've attached a pic of what I'm talking about.  That black thing needs to 
>> be
>> white :)
>>
>> Cheers Dre
>
> if you are using just reflection with no light and no radiosity, it will 
> come
> out black.  Plastic reflection ('metallic off') does not colour the 
> reflection.
> The surface colour of the base object will come from diffuse interaction 
> with
> light sources, so if you don't have any, you can expect the object colour 
> to
> show up black (no light = no diffuse interaction), reflection of the 
> background
> alone won't colour it.
>
> -tgq
>
>

Thanks again for the info.  I've since used a light group to get around 
this, the lights just for the coloured items, that way the metal items dont 
look too washed out.

Texturing has allways been a severe weak point in my poving over the years, 
hopefully one day I'll get the hang of it!

Cheers Dre


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Help with plastic texture
Date: 15 May 2011 22:55:00
Message: <web.4dd09129d4641764b05ef170@news.povray.org>
"Dre" <and### [at] gmailcom> wrote:
> Thanks again for the info.  I've since used a light group to get around
> this, the lights just for the coloured items, that way the metal items dont
> look too washed out.
>
> Texturing has allways been a severe weak point in my poving over the years,
> hopefully one day I'll get the hang of it!
>
> Cheers Dre

If you are texturing and lighting properly, you shouldn't get washout.  I would
think that means that either your light or your textures are too bright.  The
object colour comes from a combination of the light falling on it and how it is
textured.

For textures, keep diffuse reasonable, I rarely use higher than 0.6.  Make sure
you aren't using 'ambient' (unless absolutely necessary).

You also want to keep your light intensities reasonable as well, I would say
averages are from 1 to 3 with a maximum of maybe 6 to 10.  Of course you can
have brighter as the scene or texture dictates, but you have to take care of
washout.

I find it best to try to think in terms of how the interaction is in real-life
and adjust values that try to reflect that.

Perhaps post a simplified version of your scene, especially what your light and
material settings are.

-tgq


Post a reply to this message

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