POV-Ray : Newsgroups : povray.beta-test : bug in texture_map Server Time
31 Jul 2024 06:12:27 EDT (-0400)
  bug in texture_map (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: Bonsai
Subject: bug in texture_map
Date: 20 Sep 2001 10:10:49
Message: <3ba9f8e9$1@news.povray.org>
Hi,

my machine is a PIII 450 MHz, 128 MB RAM and WinNT 4.0 Service Pack 5,
POV-Ray 3.5 Beta 2

The following code gives a parse error: Blend_Map too long

// Start of code //
#version 3.5;
camera {location <10, 10, -10> look_at <0.5, 0.5, 0.5>}
light_source {<10, 10,-10> color rgb 1}

plane {<0, 1, 0>, 0
       texture {cells
                texture_map
                        {
                        #declare i = 0;
                        #while (i <= 1)
                          #declare my_color = color rgb i
                          [i pigment{my_color}]
                          #declare i = i + 0.0078;
                          [i pigment{my_color}]
                        #end
                        }
                }
        }
// End of code //

O.k. there are too many texture_map items.
Then I changed the #declare of "i" in the #while loop to:

#declare i = i + 0.0079;
                 ^^^^^^
Now there are no parsing errors but POV-Ray crashed immediately after the
render window appeared. After reloading POV-Ray and restarting the rendering
without any change on the scene file it renders fine. No problems. Very
strange! :-(

So long,

Bonsai


Post a reply to this message

From: Bonsai
Subject: Re: bug in texture_map
Date: 20 Sep 2001 10:13:39
Message: <3ba9f993@news.povray.org>
> #declare my_color = color rgb i

Oh, this should have a semicolon at the end:

#declare my_color = color rgb i;

But the error is still there...

Bonsai


Post a reply to this message

From: Bonsai
Subject: Re: bug in texture_map
Date: 20 Sep 2001 11:41:10
Message: <3BAA0E55.36814667@b0n541.net>
Me again :-)

On an other machine (Athlon 1 GHz, 392 MB RAM, Win 98 SE, POV-Ray 3.5
Beta 2) POV-Ray tells me more about the problem:

A dialog box appears: Failed to allocate display bitmap

and in the render window I can read:

StretchDIBits () failed! (Windows error)

Hmm, maybe there is a problem with the editor and not with the
texture_map.

After restarting POV-Ray everything renders o.k.

Hope that helps...

So long,

Bonsai


Post a reply to this message

From: Bob H 
Subject: Re: bug in texture_map
Date: 21 Sep 2001 05:39:19
Message: <3bab0ac7@news.povray.org>
"Bonsai" <bon### [at] b0n541net> wrote in message
news:3BAA0E55.36814667@b0n541.net...
>
> On an other machine (Athlon 1 GHz, 392 MB RAM, Win 98 SE, POV-Ray 3.5
> Beta 2) POV-Ray tells me more about the problem:
>
> A dialog box appears: Failed to allocate display bitmap
>
> and in the render window I can read:
>
> StretchDIBits () failed! (Windows error)
>
> Hmm, maybe there is a problem with the editor and not with the
> texture_map.
>
> After restarting POV-Ray everything renders o.k.

No, it must be a bug.  Either that or Ron hasn't let us know (via Help docs)
that the cells pattern can't use above 128 entries in a blend (color) map.
Pretty bad crash you found there.  First time through it I didn't even get a
error dialog, although successive times did show me the usual kernel.exe
error.
The display failure kind of hints at something more to it but I didn't get
any such thing happening here so I don't know if it's related specifically
to that cells pattern crash or just a side effect.

Sure hope Ron Parker has some answers or it might be with us awhile.

Bob H.


Post a reply to this message

From: Bonsai
Subject: Re: bug in texture_map
Date: 21 Sep 2001 06:16:57
Message: <3bab1399@news.povray.org>
"Bob H." <omn### [at] msncom> schrieb im Newsbeitrag
news:3bab0ac7@news.povray.org...
> No, it must be a bug.  Either that or Ron hasn't let us know (via Help
docs)
> that the cells pattern can't use above 128 entries in a blend (color) map.

I think it's related to the texture_map:

see 6.7.5.1  Texture Maps:
"There may be from 2 to 256 entries in the map."

The error also occurs after changing cells to leopard or an other pattern
type.

I was also able to reproduce the crash in POV-Ray 3.1g *but* only under my
Win98 SE environment. So it's not a new thing.

So long,

Bonsai


Post a reply to this message

From: Bob H 
Subject: Re: bug in texture_map
Date: 21 Sep 2001 07:00:28
Message: <3bab1dcc@news.povray.org>
"Bonsai" <bon### [at] b0n541net> wrote in message
news:3bab1399@news.povray.org...
> "Bob H." <omn### [at] msncom> schrieb im Newsbeitrag
> news:3bab0ac7@news.povray.org...
> > No, it must be a bug.  Either that or Ron hasn't let us know (via Help
> docs)
> > that the cells pattern can't use above 128 entries in a blend (color)
map.
>
> I think it's related to the texture_map:
>
> see 6.7.5.1  Texture Maps:
> "There may be from 2 to 256 entries in the map."
>
> The error also occurs after changing cells to leopard or an other pattern
> type.
>
> I was also able to reproduce the crash in POV-Ray 3.1g *but* only under my
> Win98 SE environment. So it's not a new thing.

Well... that's not good, is it...?  I can't recall a crash happening for a
texture map in a while loop and my last OS was Win98SE.

Bob H.


Post a reply to this message

From: Ron Parker
Subject: Re: bug in texture_map
Date: 21 Sep 2001 10:10:27
Message: <slrn9qmiil.grj.ron.parker@fwi.com>
On Fri, 21 Sep 2001 04:39:23 -0500, Bob H. wrote:
>No, it must be a bug.  Either that or Ron hasn't let us know (via Help docs)
>that the cells pattern can't use above 128 entries in a blend (color) map.
>Pretty bad crash you found there.  First time through it I didn't even get a
>error dialog, although successive times did show me the usual kernel.exe
>error.

I am not responsible for the help docs, and I've never touched the cells
pattern, so I'm not sure why my name is being invoked here. 

It's always been impossible to have more than 256 entries in a blend map;
I'm not sure where the 128 you mention comes from.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Bonsai
Subject: Re: bug in texture_map
Date: 21 Sep 2001 10:21:44
Message: <3bab4cf8@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> schrieb im Newsbeitrag
news:slr### [at] fwicom...
> It's always been impossible to have more than 256 entries in a blend map;
> I'm not sure where the 128 you mention comes from.

It may come from my example because I put in 2 blend map entries per loop.
That's why POV-Ray gives a parse error after 128 loops in this scene.

So long,

Bonsai


Post a reply to this message

From: Bob H 
Subject: Re: bug in texture_map
Date: 21 Sep 2001 12:27:34
Message: <3bab6a76@news.povray.org>
"Bonsai" <bon### [at] b0n541net> wrote in message
news:3bab4cf8@news.povray.org...
> "Ron Parker" <ron### [at] povrayorg> schrieb im Newsbeitrag
> news:slr### [at] fwicom...
> > It's always been impossible to have more than 256 entries in a blend
map;
> > I'm not sure where the 128 you mention comes from.
>
> It may come from my example because I put in 2 blend map entries per loop.
> That's why POV-Ray gives a parse error after 128 loops in this scene.

Oh yeah, okay, I see that now.  I just through the number 0.0079 into the
calculator thinking 1/0.0079 (or 0.0078) would be around 128.  I ignored the
double entry.  It is of course still only just greater that 128 and 126
respectively.  So somethings wrong there when it crashes at >128.

Sorry Ron, I was sure you were the author of the cells pattern and I had no
idea you were not.  Just so everyone knows besides me know who did, that
would be John VanSickle.

Bob H.


Post a reply to this message

From: Ron Parker
Subject: Re: bug in texture_map
Date: 21 Sep 2001 12:40:20
Message: <slrn9qmrbm.h0s.ron.parker@fwi.com>
On Fri, 21 Sep 2001 11:27:34 -0500, Bob H. wrote:
>Sorry Ron, I was sure you were the author of the cells pattern and I had no
>idea you were not.  Just so everyone knows besides me know who did, that
>would be John VanSickle.

I'm sure you got that notion because I am responsible for crackle solid and
all of the other changes to crackle in 3.5.  I'm not really upset, just 
don't want anyone who is in a position to fix the problem to shy away because
they think I'll look at it.

That's not to say I *won't* look at it, just to say that if someone else 
gets to it first I don't want to discourage them from fixing it instead.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

Goto Latest 10 Messages Next 7 Messages >>>

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