POV-Ray : Newsgroups : povray.general : A little help about old vers. Server Time
26 Apr 2025 19:37:10 EDT (-0400)
  A little help about old vers. (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: GioSeregni
Subject: A little help about old vers.
Date: 23 Apr 2025 10:05:00
Message: <web.6808f2ae77b170a77e2ea33059126100@news.povray.org>
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.

DEF GOLDDARK Material {diffuseColor 0.81 0.71 0.23 ambientIntensity 0.5
specularColor 1 1 1 shininess 1}

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}

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}

Thanks in advanced!
G.


Post a reply to this message

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


Post a reply to this message

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 23 Apr 2025 16:10:00
Message: <web.68094890ce24a8bb7e2ea33059126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "GioSeregni" <gms### [at] hotmailcom> 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

Many thanks! but my english is poor,
do you mean these are just your preferences, or the literal translation of the
syntax?


Post a reply to this message

From: Bald Eagle
Subject: Re: A little help about old vers.
Date: 23 Apr 2025 16:50:00
Message: <web.68095263ce24a8bb1f9dae3025979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "GioSeregni" <gms### [at] hotmailcom> 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
>
> Many thanks! but my english is poor,
> do you mean these are just your preferences, or the literal translation of the
> syntax?

I mean that I don't know what the material is supposed to look like, so it's
hard to know if I'm correctly rewriting the material.

Specular doesn't take a color, just a scalar value.
But now that I think about it more, this is supposed to be a metallic material,
so maybe:

#declare GOLDDARK = material {texture { pigment {rgb <0.81, 0.71, 0.23>} finish
{diffuse 0.5 metallic specular 0.5 brilliance 1 } } }

Would be better.
I'm a terrible person to ask about textures and finishes - but hopefully this
helps a little.

- BW


Post a reply to this message

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 24 Apr 2025 05:10:00
Message: <web.6809feb5ce24a8bb7e2ea33059126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "GioSeregni" <gms### [at] hotmailcom> wrote:
> > "Bald Eagle" <cre### [at] netscapenet> wrote:
> > > "GioSeregni" <gms### [at] hotmailcom> 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
> >
> > Many thanks! but my english is poor,
> > do you mean these are just your preferences, or the literal translation of the
> > syntax?
>
> I mean that I don't know what the material is supposed to look like, so it's
> hard to know if I'm correctly rewriting the material.
>
> Specular doesn't take a color, just a scalar value.
> But now that I think about it more, this is supposed to be a metallic material,
> so maybe:
>
> #declare GOLDDARK = material {texture { pigment {rgb <0.81, 0.71, 0.23>} finish
> {diffuse 0.5 metallic specular 0.5 brilliance 1 } } }
>
> Would be better.
> I'm a terrible person to ask about textures and finishes - but hopefully this
> helps a little.
>
> - BW

Many thans again, I appreciate your patience and help, but perhaps I didn't
explain myself well.
In the early 2000s, syntactic changes were made to the code.
( https://www.povray.org/documentation/view/3.60/355/ )
This page explains the criteria for these changes, but I absolutely find it
confusing.
And I don't even remember my criterion for updating my parser, which at the time
used my own long list of declarations. I posted three examples above, but my
list is long and of general use for many materials.

The result may also vary based on other factors of the environment and lighting,
but I would like to understand if, referring to any subject, my new syntax was
adapted correctly, because, apart from the RGB values, many keywords have been
abolished.
But I would like to understand how I should update this old syntax with the new
syntax, to obtain (with the same surrounding environment) the same result.
It's like when you switch from one language to another. If I have to write
"Hello World"
in basic I write
PRINT "Hello World"
but in LISP which has a different syntax, I have to write
(princ "Hello World"),
to obtain the same result. So, how can I then replace the keywords?
Material
diffuseColor
ambientIntensity
specularColor
shininess
I have now long since abolished and modified my statements, but I do not know if
I have translated them completely correctly.
I think the biggest difficulty is in the value of -shininess- Which was then
abolished, I believe, in favor of pong and pong_size
So, "shininess XX" becomes "pong YY" and "pong_size NN", but according to what
rule? And how did he intervene -specularColor- ?
I have made attempts to harmonize, but there must be an objective equivalence.


Post a reply to this message

From: Bald Eagle
Subject: Re: A little help about old vers.
Date: 24 Apr 2025 15:50:00
Message: <web.680a95e0ce24a8bb471fd7cd25979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:

> to obtain the same result. So, how can I then replace the keywords?
> Material
> diffuseColor
> ambientIntensity
> specularColor
> shininess

I think that we're talking about the same thing.
I'm not familiar with the keywords in older versions of POV-Ray, and although
you can use _phong_, I'd say _specular_ would be better.

> And how did he intervene -specularColor- ?

That I think you can achieve that with the metallic keyword.
That makes the reflections from the surface adopt the color of the surface.

I think if you render a very simple scene of a sphere with my material {}, you
will get a better idea of what all of the various keywords and values do.

Like I said, I'm a bad person to ask - as I spend most of my time doing math,
geometry, patterns, and algorithms.


- BW


Post a reply to this message

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 25 Apr 2025 06:05:00
Message: <web.680b5d5bce24a8bb7e2ea33059126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "GioSeregni" <gms### [at] hotmailcom> wrote:
>
> > to obtain the same result. So, how can I then replace the keywords?
> > Material
> > diffuseColor
> > ambientIntensity
> > specularColor
> > shininess
>
> I think that we're talking about the same thing.
> I'm not familiar with the keywords in older versions of POV-Ray, and although
> you can use _phong_, I'd say _specular_ would be better.
>
> > And how did he intervene -specularColor- ?
>
> That I think you can achieve that with the metallic keyword.
> That makes the reflections from the surface adopt the color of the surface.
>
> I think if you render a very simple scene of a sphere with my material {}, you
> will get a better idea of what all of the various keywords and values do.
>
> Like I said, I'm a bad person to ask - as I spend most of my time doing math,
> geometry, patterns, and algorithms.
>
>
> - BW
Many thanks!
I also work on programs and algorithms and I think that starting over by
isolating the problem on a sphere is the best way.
A lot has changed since those years and it takes patience. The problem arose
because working in the archive of my subjects for architecture I no longer
obtained the same result as back then working around a old car. But I am not an
atmosphere specialist, I have been using povray for a long time but only to make
my projects understandable and pleasant.
Thanks!


Post a reply to this message

From: Alain Martel
Subject: Re: A little help about old vers.
Date: 25 Apr 2025 06:45:46
Message: <680b67da$1@news.povray.org>
Le 2025-04-23 à 10:33, Bald Eagle a écrit :
> "GioSeregni" <gms### [at] hotmailcom> 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

From: Alain Martel
Subject: Re: A little help about old vers.
Date: 25 Apr 2025 07:17:18
Message: <680b6f3e$1@news.povray.org>
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

From: GioSeregni
Subject: Re: A little help about old vers.
Date: 26 Apr 2025 08:20:00
Message: <web.680ccdc7ce24a8bb7e2ea33059126100@news.povray.org>
Alain Martel <kua### [at] videotronca> 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

Goto Latest 10 Messages Next 6 Messages >>>

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