 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 2025-04-23 à 10:33, Bald Eagle a écrit :
> "GioSeregni" <gms### [at] hotmail com> wrote:
>
>> DEF GOLDDARK Material {diffuseColor 0.81 0.71 0.23 ambientIntensity 0.5
>> specularColor 1 1 1 shininess 1}
>
> my guess:
>
> #declare GOLDDARK = material {texture { pigment {rgb <0.81, 0.71, 0.23>} finish
> {ambient 0.5 specular 1} } }
>
> I would probably replace ambient with diffuse, and drastically decrease
> specular, or at least keep diffuse + specular < 1.
>
> - BW
>
>
>
It's diffuse + ambient that should be kept under 1.
So :
#declare GOLDDARK = material {texture { pigment {rgb <0.81, 0.71, 0.23>}
finish
{diffuse 0.5 ambient 0.5 specular 1} } }
Normally, ambient should be kept under 0.2. As it's a metal, it's better
to set it at zero. So, my suggestion will be :
#declare GOLDDARK = material {texture { pigment {rgb <0.81, 0.71, 0.23>}
finish
{diffuse 0.7 ambient 0 specular 1 metallic} } }
Or :
#declare GOLDDARK = material {texture { pigment {rgb <0.81, 0.71, 0.23>}
finish
{diffuse 0.5 ambient 0 specular 1 metallic reflection{ 0.7 metallic} } } }
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 2025-04-23 à 10:01, GioSeregni a écrit :
> Hi all,
> I am sorry.
> I don't understand the complex explanation of some changes made after version
> 2.x, but I'm "reverting" some of my files.
> I would appreciate if someone could translate these instructions because my old
> compiler got from the CAD layer name and wrote something like this, which is now
> not valid.
>
My take.
> DEF GOLDDARK Material {diffuseColor 0.81 0.71 0.23 ambientIntensity 0.5
> specularColor 1 1 1 shininess 1}
#declare GOLDDARK = material{
pigment{rgb<0.81, 0.71, 0.23>}
finish{diffuse 0.5 ambient 0 specular 1 metallic roughness 0.01
reflection{0.6 metallic}
}
}// This is a metal.
The metallic key word cause the highlight and reflection to take the
colour of the surface.
Need an environment to show in the reflection.
>
> DEF POLIBLUE Material {emissiveColor 0 0 0 diffuseColor 0.05 0 0.50
> ambientIntensity 0.4 specularColor 0.8 0.8 0.8 shininess 0.625}
#declare POLIBLUE = material{
pigment{rgb<0.05, 0, 0.5>}
finish{diffuse 0.7 ambient 0.1 specular 0.8 roughness 0.375}
// That's a rather dull surface.
}
Make roughness smaller to make the highlight tighter.
>
> DEF DEMIRED Material {ambientIntensity 0.4 diffuseColor 0.6 0.1 0.1
> specularColor 0.6 0.1 0.1 shininess 0.8 transparency 0.3}
#declare DEMIRED = material{
pigment{rgbt<1, 0.8, 0.8, 0.6>}//transparent pigment.
finish{diffuse 0.5 ambient 0 specular 0.8 fresnel roughness 0.1
reflection{ 1 fresnel}
}
interior{ior 1.5// required for fresnel to work
dispersion 1.02// blue refract more than red by that amount
fade_color rgb<0.6, 0.1, 0.1>//Actual colour
fade_distance 0.1//Define how the thickness affect the colour
fade_power 1001 //a standard value
}
}
That's a transparent material. Made it have a colour that depends on the
thickness. Adjust fade_distance as needed. fade_distance depends on the
scale of your scene.
Need an IOR for the fresnel reflection to work. Will show refraction.
Fresnel highlight and reflection are minimal when the surface is viewed
perpendicularly and maximum at grazing angles.
Need an environment to show in the transparency and the effect of
refraction.
>
> Thanks in advanced!
> G.
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Alain Martel <kua### [at] videotron ca> wrote:
> > Hi all,
> > I am sorry.
> > I don't understand the complex explanation of some changes made after version
> > 2.x, but I'm "reverting" some of my files.
> > I would appreciate if someone could translate these instructions because my old
> > compiler got from the CAD layer name and wrote something like this, which is now
> > not valid.
> >
>
> My take.
> > DEF GOLDDARK Material {diffuseColor 0.81 0.71 0.23 ambientIntensity 0.5
> > specularColor 1 1 1 shininess 1}
> #declare GOLDDARK = material{
> pigment{rgb<0.81, 0.71, 0.23>}
> finish{diffuse 0.5 ambient 0 specular 1 metallic roughness 0.01
> reflection{0.6 metallic}
> }
> }// This is a metal.
>
> The metallic key word cause the highlight and reflection to take the
> colour of the surface.
> Need an environment to show in the reflection.
>
> >
> > DEF POLIBLUE Material {emissiveColor 0 0 0 diffuseColor 0.05 0 0.50
> > ambientIntensity 0.4 specularColor 0.8 0.8 0.8 shininess 0.625}
> #declare POLIBLUE = material{
> pigment{rgb<0.05, 0, 0.5>}
> finish{diffuse 0.7 ambient 0.1 specular 0.8 roughness 0.375}
> // That's a rather dull surface.
> }
>
> Make roughness smaller to make the highlight tighter.
>
> >
> > DEF DEMIRED Material {ambientIntensity 0.4 diffuseColor 0.6 0.1 0.1
> > specularColor 0.6 0.1 0.1 shininess 0.8 transparency 0.3}
> #declare DEMIRED = material{
> pigment{rgbt<1, 0.8, 0.8, 0.6>}//transparent pigment.
> finish{diffuse 0.5 ambient 0 specular 0.8 fresnel roughness 0.1
> reflection{ 1 fresnel}
> }
> interior{ior 1.5// required for fresnel to work
> dispersion 1.02// blue refract more than red by that amount
> fade_color rgb<0.6, 0.1, 0.1>//Actual colour
> fade_distance 0.1//Define how the thickness affect the colour
> fade_power 1001 //a standard value
> }
> }
>
> That's a transparent material. Made it have a colour that depends on the
> thickness. Adjust fade_distance as needed. fade_distance depends on the
> scale of your scene.
> Need an IOR for the fresnel reflection to work. Will show refraction.
> Fresnel highlight and reflection are minimal when the surface is viewed
> perpendicularly and maximum at grazing angles.
> Need an environment to show in the transparency and the effect of
> refraction.
>
> >
> > Thanks in advanced!
> > G.
> >
> >
Thanks!
but sorry, "material" is exactly my trouble. I used it in the far 2002, but now,
it is
not anymore working for me
So, if I use your suggestion for declare
#declare GOLDDARK = material{
pigment{rgb<0.81, 0.71, 0.23>}
finish{diffuse 0.5 ambient 0 specular 1 metallic roughness 0.01
reflection{0.6 metallic}
}
}// This is a metal.
I get:
Parse Error: No matching } in 'material', pigment found instead
Render failed
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"GioSeregni" <gms### [at] hotmail com> wrote:
> ...
> #declare GOLDDARK = material{
> pigment{rgb<0.81, 0.71, 0.23>}
> finish{diffuse 0.5 ambient 0 specular 1 metallic roughness 0.01
> reflection{0.6 metallic}
> }
> }// This is a metal.
>
> I get:
> Parse Error: No matching } in 'material', pigment found instead
> Render failed
POV-Ray is looking for a 'texture{}' to wrap the pigment and finish, see:
<https://wiki.povray.org/content/Reference:Material>. hth.
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
> "GioSeregni" <gms### [at] hotmail com> wrote:
> > ...
> > #declare GOLDDARK = material{
> > pigment{rgb<0.81, 0.71, 0.23>}
> > finish{diffuse 0.5 ambient 0 specular 1 metallic roughness 0.01
> > reflection{0.6 metallic}
> > }
> > }// This is a metal.
> >
> > I get:
> > Parse Error: No matching } in 'material', pigment found instead
> > Render failed
>
> POV-Ray is looking for a 'texture{}' to wrap the pigment and finish, see:
> <https://wiki.povray.org/content/Reference:Material>. hth.
>
>
> regards, jr.
Yes, this is exactly the page by me indicated previously, if you see the whole
topic.
This page is very confusing to me.
I would like to find a way to update the old definitions as faithfully as
possible.
This "material" way is a suggestion I had, but I already knew it didn't work.
Thanks!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"GioSeregni" <gms### [at] hotmail com> wrote:
> Yes, this is exactly the page by me indicated previously, if you see the whole
> topic.
> This page is very confusing to me.
> I would like to find a way to update the old definitions as faithfully as
> possible.
> This "material" way is a suggestion I had, but I already knew it didn't work.
> Thanks!
What happened is that texture used to have interior as part of it.
Then interiors became it's own thing - separate from texture.
So to apply both to an object, you need to put them in a material {} statement.
material {} does accept a pigment {} statement directly.
So just do
material {
texture {pigment {}}
}
and that will work.
- BW
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"GioSeregni" <gms### [at] hotmail com> wrote:
> ...
> > POV-Ray is looking for a 'texture{}' to wrap the pigment and finish,...
> Yes, this is exactly the page by me indicated previously, if you see the whole
> topic.
> This page is very confusing to me.
> I would like to find a way to update the old definitions as faithfully as
> possible.
> This "material" way is a suggestion I had, but I already knew it didn't work.
> Thanks!
the code below runs for me using a beta.2. hth.
regards, jr.
-----<snip>-----
#version 3.8;
global_settings {assumed_gamma 1}
#declare mat_ = material {
texture {
pigment {
color rgb <.81, .71, .23>
}
finish {
diffuse .5
ambient 0
specular 1
roughness .01
reflection {.6 metallic}
metallic
}
}
/* put an interior here */
};
box {
0,1
material {mat_}
}
light_source {<-1,1,-1>*1e3 color rgb 1 parallel}
camera {
location <0,0,-5>
right x * (4/3)
up y
look_at <0,0,0>
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "GioSeregni" <gms### [at] hotmail com> wrote:
> > ...
> > > POV-Ray is looking for a 'texture{}' to wrap the pigment and finish,...
> > Yes, this is exactly the page by me indicated previously, if you see the whole
> > topic.
> > This page is very confusing to me.
> > I would like to find a way to update the old definitions as faithfully as
> > possible.
> > This "material" way is a suggestion I had, but I already knew it didn't work.
> > Thanks!
>
> the code below runs for me using a beta.2. hth.
>
>
> regards, jr.
>
> -----<snip>-----
> #version 3.8;
>
> global_settings {assumed_gamma 1}
>
> #declare mat_ = material {
> texture {
> pigment {
> color rgb <.81, .71, .23>
> }
> finish {
> diffuse .5
> ambient 0
> specular 1
> roughness .01
> reflection {.6 metallic}
> metallic
> }
> }
> /* put an interior here */
> };
>
> box {
> 0,1
> material {mat_}
> }
>
> light_source {<-1,1,-1>*1e3 color rgb 1 parallel}
>
> camera {
> location <0,0,-5>
> right x * (4/3)
> up y
> look_at <0,0,0>
> }
Many thanks!
I thought texture encapsulation was more complicated, now it works!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
GREAT!
I restored the old declare!
Left = a car silver from my old render 2002 vers.2.??
Center = BAD !!! my attempt to restore the old code into vers 3.7
right = very well for me ! with your help
Many thanks to all!
PS. I don't have a great ability to render realistically. I dedicate myself to
geometry, code and projects, usually, but this for my needs is more than
satisfying!
Post a reply to this message
Attachments:
Download 'clipboard01.png' (469 KB)
Preview of image 'clipboard01.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"GioSeregni" <gms### [at] hotmail com> wrote:
> ...
> Many thanks!
> I thought texture encapsulation was more complicated, now it works!
excellent.
> PS. I don't have a great ability to render realistically. I dedicate myself
> to geometry, code and projects, usually, but this for my needs is more than
> satisfying!
nice models, a forecourt (like a car dealer) or a parking lot, just .. an
overview, would be v cool though (I suspect you've "a collection" :-)).
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |