POV-Ray : Newsgroups : povray.general : A little help about old vers. Server Time
26 Apr 2025 20:18:08 EDT (-0400)
  A little help about old vers. (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: jr
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 09:15:00
Message: <web.680cdbd9ce24a8bb721a48e56cde94f1@news.povray.org>
hi,
"GioSeregni" <gms### [at] hotmailcom> 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

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 10:10:00
Message: <web.680ce921ce24a8bb7e2ea33059126100@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
> "GioSeregni" <gms### [at] hotmailcom> 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

From: Bald Eagle
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 10:25:00
Message: <web.680ceb9fce24a8bb1f9dae3025979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> 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

From: jr
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 10:25:00
Message: <web.680cec47ce24a8bb721a48e56cde94f1@news.povray.org>
hi,

"GioSeregni" <gms### [at] hotmailcom> 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

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 13:25:00
Message: <web.680d160bce24a8bb7e2ea33059126100@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "GioSeregni" <gms### [at] hotmailcom> 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

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 14:00:00
Message: <web.680d1eb3ce24a8bb7e2ea33059126100@news.povray.org>
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'
clipboard01.png


 

<<< Previous 10 Messages Goto Initial 10 Messages

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