POV-Ray : Newsgroups : povray.newusers : Texture overriding? Server Time
3 Nov 2024 07:30:12 EST (-0500)
  Texture overriding? (Message 1 to 9 of 9)  
From: Mark M  Wilson
Subject: Texture overriding?
Date: 21 Mar 2002 11:57:23
Message: <3C9A12CD.B576E30A@ncsl.dcr.state.nc.us>
Is it possible to override the phong or other characteristic of a
texture from an include file?  Say for instance I wanted to reduce the
default reflectivity of a polished marble texture -- could I simply:

#include "stones.inc" (at top of pov file, of course)

[...]

object { whatever texture { T_Stone8 phong 0.001 scale 0.08 } }

just as an example?

Or would I have to copy in the relevant lines from the textures.inc file
and make the modifications needed there? (And I guess re-declare the
texture with a different name to avoid confusion?)

TIA,
Mark


Post a reply to this message

From: bruce
Subject: Re: Texture overriding?
Date: 21 Mar 2002 12:31:38
Message: <slrna9k6ol.1kb.bruce@pingouin.rez-gif.supelec.fr>
In article <3C9A12CD.B576E30A@ncsl.dcr.state.nc.us>, Mark M. Wilson wrote:
> Is it possible to override the phong or other characteristic of a
> texture from an include file?  Say for instance I wanted to reduce the
> default reflectivity of a polished marble texture -- could I simply:
> 
> #include "stones.inc" (at top of pov file, of course)
> 
> [...]
> 
> object { whatever texture { T_Stone8 phong 0.001 scale 0.08 } }
>

of course you  can, the last statement always oiverride the previous. But I
think that if you add finish{phong 0.01}, you'll override all other data
about finish, and I'm not sure that's exactly what you want!

	-- Bruce


Post a reply to this message

From: Tom Melly
Subject: Re: Texture overriding?
Date: 21 Mar 2002 12:31:50
Message: <3c9a1906@news.povray.org>
"Mark M. Wilson" <mmw### [at] ncsldcrstatencus> wrote in message
news:3C9A12CD.B576E30A@ncsl.dcr.state.nc.us...

<snip>

Yes (but I think you're example would have fallen over).

Try:

#include "stones.inc"
sphere{0,1
   texture { T_Stone8 pigment{Red}}
 }


Post a reply to this message

From: Mark M  Wilson
Subject: Re: Texture overriding?
Date: 21 Mar 2002 14:11:55
Message: <3C9A324E.16496089@ncsl.dcr.state.nc.us>
Well, I just tried to do this, and it was rejected.  I entered the
following to describe the texture of a CSG object:
texture { T_Stone9 phong 0.01 scale 0.08 }

and got the error message: 
no matching } in texture, phong found instead.

So where should I put it?
Is that what you meant by my example "fall(ing) over?"

--Mark

"Mark M. Wilson" wrote:
> 
> Is it possible to override the phong or other characteristic of a
> texture from an include file?  Say for instance I wanted to reduce the
> default reflectivity of a polished marble texture -- could I simply:
> 
> #include "stones.inc" (at top of pov file, of course)
> 
> [...]
> 
> object { whatever texture { T_Stone8 phong 0.001 scale 0.08 } }
> 
> just as an example?
> 
> Or would I have to copy in the relevant lines from the textures.inc file
> and make the modifications needed there? (And I guess re-declare the
> texture with a different name to avoid confusion?)
> 
> TIA,
> Mark


Post a reply to this message

From: Tom Melly
Subject: Re: Texture overriding?
Date: 21 Mar 2002 17:44:54
Message: <3c9a6266@news.povray.org>
"Mark M. Wilson"

> Well, I just tried to do this, and it was rejected.  I entered the
> following to describe the texture of a CSG object:
> texture { T_Stone9 phong 0.01 scale 0.08 }
>

texture{T_Stone9 finish{phong 0.01} scale 0.08}

Basically, take a look at the source - texture is a wrapper for pigment,
normal and finish. So a texture looks like:

texture{
    pigment{Red}
    finish{reflection 1 ambient 0 diffuse 0}
    normal{bozo}
}

> Is that what you meant by my example "fall(ing) over?"

Yep.


Post a reply to this message

From: Ken
Subject: Re: Texture overriding?
Date: 21 Mar 2002 21:48:19
Message: <3C9A9BE7.70C1AD13@pacbell.net>
Tom Melly wrote:

> Yes (but I think you're example would have fallen over).

Is that British for invalid syntax?

-- 
Ken Tyler


Post a reply to this message

From: Tom Melly
Subject: Re: Texture overriding?
Date: 22 Mar 2002 05:07:53
Message: <3c9b0279$1@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote in message
news:3C9A9BE7.70C1AD13@pacbell.net...
>
>
> Tom Melly wrote:
>
> > Yes (but I think you're example would have fallen over).
>
> Is that British for invalid syntax?
>

No - the British would have been "your code, whilst clear in its intent, would
not have been parsed correctly due to the rigidity of the parser in such
matters, and it's insistence on adhering to the protocols, arbitary as they may
be".


Post a reply to this message

From: bruce
Subject: Re: Texture overriding?
Date: 26 Mar 2002 20:33:24
Message: <slrnaa28t8.hf.bruce@pingouin.rez-gif.supelec.fr>
In article <3c9b0279$1@news.povray.org>, Tom Melly wrote:
> No - the British would have been "your code, whilst clear in its intent, would
> not have been parsed correctly due to the rigidity of the parser in such
> matters, and it's insistence on adhering to the protocols, arbitary as they may
> be".
>

Easy to laugh at non English speakers...

	-- Bruce (non native English speaker at all)


Post a reply to this message

From: Mark M  Wilson
Subject: Re: Texture overriding?
Date: 3 Apr 2002 15:29:22
Message: <3CAB6811.4069CAA4@ncsl.dcr.state.nc.us>
I don't think the intent was to laugh at non-native English speakers,
but rather perhaps the differences between American English vs. British

over the Canadians' "adaptations." (I'm sure there must be SOME). 
--Mark

bru### [at] pingouinrez-gifsupelecfr wrote:
> 
> In article <3c9b0279$1@news.povray.org>, Tom Melly wrote:
> > No - the British would have been "your code, whilst clear in its intent, would
> > not have been parsed correctly due to the rigidity of the parser in such
> > matters, and it's insistence on adhering to the protocols, arbitary as they may
> > be".
> >
> 
> Easy to laugh at non English speakers...
> 
>         -- Bruce (non native English speaker at all)


Post a reply to this message

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