POV-Ray : Newsgroups : povray.advanced-users : Is this a bug? Server Time
26 Nov 2024 19:44:40 EST (-0500)
  Is this a bug? (Message 1 to 8 of 8)  
From: Nieminen Juha
Subject: Is this a bug?
Date: 3 Sep 1999 12:05:59
Message: <37cff1e7@news.povray.org>
Someone discovered this bug in povray.newusers. I'm confirming that it
really is a bug before posting a bug report.

  When rendering the following scene povray issues the warning "No pigment
type given" although there are no objects without pigment in the scene.
  If the 'material' statement is removed and 'Test' is used as 'texture'
instead, the warning disappears.

camera { location -z*5 look_at 0 }
light_source { <100,100,-100> 1 }

#declare Test=
  material
  { texture { pigment { rgb x } }
  }

union
{ sphere { -x,2 material { Test } }
  sphere { x,2 material { Test } }
}

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: PoD
Subject: Re: Is this a bug?
Date: 3 Sep 1999 14:45:42
Message: <37D01826.2A7BE477@merlin.net.au>
Nieminen Juha wrote:
> 
>   Someone discovered this bug in povray.newusers. I'm confirming that it
> really is a bug before posting a bug report.
> 
>   When rendering the following scene povray issues the warning "No pigment
> type given" although there are no objects without pigment in the scene.
>   If the 'material' statement is removed and 'Test' is used as 'texture'
> instead, the warning disappears.
> 
> camera { location -z*5 look_at 0 }
> light_source { <100,100,-100> 1 }
> 
> #declare Test=
>   material
>   { texture { pigment { rgb x } }
>   }
> 
> union
> { sphere { -x,2 material { Test } }
>   sphere { x,2 material { Test } }
> }
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

It does seem to be a bug.  The warning goes away if any type of pigment
is given to the union outside of the objects.

It works with material{Test} or with pigment{whatever}. 

Cheers, PoD.


Post a reply to this message

From: Ron Parker
Subject: Re: Is this a bug?
Date: 3 Sep 1999 16:11:52
Message: <37d02b88@news.povray.org>
On 3 Sep 1999 12:05:59 -0400, Nieminen Juha wrote:
>  Someone discovered this bug in povray.newusers. I'm confirming that it
>really is a bug before posting a bug report.

Yes, it really is a bug.  I'm taking the liberty of posting the bug report;
hope that's okay.

>  When rendering the following scene povray issues the warning "No pigment
>type given" although there are no objects without pigment in the scene.
>  If the 'material' statement is removed and 'Test' is used as 'texture'
>instead, the warning disappears.
>
>camera { location -z*5 look_at 0 }
>light_source { <100,100,-100> 1 }
>
>#declare Test=
>  material
>  { texture { pigment { rgb x } }
>  }
>
>union
>{ sphere { -x,2 material { Test } }
>  sphere { x,2 material { Test } }
>}

Here's the problem:  In parse.c, in the function Parse_Object_Mods, the part 
that parses materials doesn't set the TEXTURED_OBJECT flag.  Here's something 
that looks like a diff but isn't really one (because my line numbers would
be wrong anyway, since I look for these things in the superpatch code):

     CASE (MATERIAL_TOKEN)
       Local_Material.Texture  = Object->Texture;
       Local_Material.Interior = Object->Interior;
       Parse_Material(&Local_Material);
       Object->Texture  = Local_Material.Texture;
+      if ( Object->Texture ) {
+        Object->Type |= TEXTURED_OBJECT;
+      }
       Object->Interior = Local_Material.Interior;
     END_CASE


Post a reply to this message

From: Ken
Subject: Re: Is this a bug?
Date: 3 Sep 1999 16:26:10
Message: <37D02E8A.E3C566B8@pacbell.net>
Ron Parker wrote:
> 
> On 3 Sep 1999 12:05:59 -0400, Nieminen Juha wrote:
> >  Someone discovered this bug in povray.newusers. I'm confirming that it
> >really is a bug before posting a bug report.

  Something else I just noticed that is odd from the original posters code.

He has a pigment identified as - pigment { color <1,1,1> }

  I never realized you could validate a color like this without the use of
the RGB(FT) identifiers.

 pigment { color <1,1,1> } // is valid
 pigment {   rgb <1,1,1> } // also valid
 pigment {       <1,1,1> } // invalid and understandably so

The more I use this program the more loop holes I seem to find...

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Ron Parker
Subject: Re: Is this a bug?
Date: 3 Sep 1999 16:29:02
Message: <37d02f8e@news.povray.org>
On Fri, 03 Sep 1999 13:24:42 -0700, Ken wrote:
>
>
>Ron Parker wrote:
>> 
>> On 3 Sep 1999 12:05:59 -0400, Nieminen Juha wrote:
>> >  Someone discovered this bug in povray.newusers. I'm confirming that it
>> >really is a bug before posting a bug report.
>
>  Something else I just noticed that is odd from the original posters code.
>
>He has a pigment identified as - pigment { color <1,1,1> }
>
>  I never realized you could validate a color like this without the use of
>the RGB(FT) identifiers.
>
> pigment { color <1,1,1> } // is valid
> pigment {   rgb <1,1,1> } // also valid
> pigment {       <1,1,1> } // invalid and understandably so
>
>The more I use this program the more loop holes I seem to find...

I noticed that yesterday when I was looking at the {checker Red White} bug.
See that posting for even more interesting loopholes, like "Red green 1"
as an obfuscated notation for yellow.


Post a reply to this message

From: Bob Hughes
Subject: Re: Is this a bug?
Date: 3 Sep 1999 16:41:39
Message: <37d03283@news.povray.org>
For some of us who actually like to write a lot more into the script
(albeit unneccessarily) this wouldn't change anything.  For Ken and
others this is obviously good news I'm sure  ; )
However.... if you aren't in a pigment pattern then 'rgb' is all you
need even if using a 4 or 5 place vector and it's 2 letters less than
'color'.

Bob

Ken <tyl### [at] pacbellnet> wrote in message
news:37D02E8A.E3C566B8@pacbell.net...
>
>
> He has a pigment identified as - pigment { color <1,1,1> }
>
>   I never realized you could validate a color like this without the
use of
> the RGB(FT) identifiers.
>
>  pigment { color <1,1,1> } // is valid
>  pigment {   rgb <1,1,1> } // also valid
>  pigment {       <1,1,1> } // invalid and understandably so
>
> The more I use this program the more loop holes I seem to find...
>
> --
> Ken Tyler
>
> See my 850+ Povray and 3D Rendering and Raytracing Links at:
> http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Mark Wagner
Subject: Re: Is this a bug?
Date: 5 Sep 1999 01:03:02
Message: <37d1f986@news.povray.org>
Ron Parker wrote in message <37d02f8e@news.povray.org>...
>On Fri, 03 Sep 1999 13:24:42 -0700, Ken wrote:
>>
>>
>>Ron Parker wrote:
>>>
>>> On 3 Sep 1999 12:05:59 -0400, Nieminen Juha wrote:
>>> >  Someone discovered this bug in povray.newusers. I'm confirming that
it
>>> >really is a bug before posting a bug report.
>>
>>  Something else I just noticed that is odd from the original posters
code.
>>
>>He has a pigment identified as - pigment { color <1,1,1> }
>>
>>  I never realized you could validate a color like this without the use of
>>the RGB(FT) identifiers.
>>
>> pigment { color <1,1,1> } // is valid
>> pigment {   rgb <1,1,1> } // also valid
>> pigment {       <1,1,1> } // invalid and understandably so
>>
>>The more I use this program the more loop holes I seem to find...
>
>I noticed that yesterday when I was looking at the {checker Red White} bug.
>See that posting for even more interesting loopholes, like "Red green 1"
>as an obfuscated notation for yellow.


Obfusicated POV-Ray -- an interesting idea...:-)

Mark


Post a reply to this message

From: Gail Shaw
Subject: Re: Is this a bug?
Date: 8 Sep 1999 08:20:54
Message: <37d654a6@news.povray.org>
Ken wrote in message <37D02E8A.E3C566B8@pacbell.net>...
>
>
>Ron Parker wrote:
>>
>> On 3 Sep 1999 12:05:59 -0400, Nieminen Juha wrote:
>> >  Someone discovered this bug in povray.newusers. I'm confirming that it
>> >really is a bug before posting a bug report.
>
>  Something else I just noticed that is odd from the original posters code.
>
>He has a pigment identified as - pigment { color <1,1,1> }
>
>  I never realized you could validate a color like this without the use of
>the RGB(FT) identifiers.
>
> pigment { color <1,1,1> } // is valid
> pigment {   rgb <1,1,1> } // also valid
> pigment {       <1,1,1> } // invalid and understandably so
>
>The more I use this program the more loop holes I seem to find...
>
>--


I noticed something like that the other day. I had three objects.

First one

 pigment {color Red}

Second one

pigment {color Blue}

third one

pigment {color Yellow}

Only got a parse error at the third one, which confused be until
I realised that the color keyword shouldn't have been there.

Gail
*******************************************************************
* gsh### [at] monotixcoza              * ERROR: COFFEE.COM not found  *
* http://www.rucus.ru.ac.za/~gail/ * Insert cup and press any key *
*******************************************************************
   My Software never has bugs, It just develops random features
*******************************************************************


Post a reply to this message

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