POV-Ray : Newsgroups : povray.beta-test : Possible bug in cutaway_textures in beta30 Server Time
28 Jul 2024 14:35:11 EDT (-0400)
  Possible bug in cutaway_textures in beta30 (Message 1 to 7 of 7)  
From: Rarius
Subject: Possible bug in cutaway_textures in beta30
Date: 23 Jan 2009 09:46:29
Message: <4979d845@news.povray.org>
THIMC,

If I run the attached POV file I get the following error.

    Fatal error in renderer: Out of memory.
    Render failed

If I comment out the cutaway_textures, or change the plane from y to -y 
it works fine. I suspect a bug in the cutaway_textures code. 

I have just tried it again after changing line 77 to read "  #local 
rx=rx+10;" and it now works... In fact any step value over 5.715 
works, but anything less fails, but only with cutaway_textures!

It fails consistantly in both Version 3.7.0.beta.30.msvc8-sse2.win32 and 
in Version 3.7.0.beta.30.msvc8.win32, but works fine in Version 
3.6.1.icl8.win32

If you want any other info, just ask.

Rarius


Post a reply to this message


Attachments:
Download 'iso-8859-1' (2 KB)

From: clipka
Subject: Re: Possible bug in cutaway_textures in beta30
Date: 23 Jan 2009 12:45:00
Message: <web.497a012542b9e70ebdc576310@news.povray.org>
Are you sure you attached a POV scene file? IE just presents me with the same
text you wrote in your post...


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: Possible bug in cutaway_textures in beta30
Date: 23 Jan 2009 13:07:47
Message: <op.un71y9uq7bxctx@e6600.bredbandsbolaget.se>
On Fri, 23 Jan 2009 18:40:53 +0100, clipka <nomail@nomail> wrote:
> Are you sure you attached a POV scene file? IE just presents me with the  
> same text you wrote in your post...

He did. Contents below. I tested the scene with  
3.7.0.beta.30.msvc8-sse2.win32 and could reproduce the problem by changing  
the number on line 77 to 5.



/////////////////////////////////////////////////////////////////////////////
// Include Files

#include "colors.inc"
#include "metals.inc"

/////////////////////////////////////////////////////////////////////////////
// Declared pigments, finishes, etc.

#declare sky_vect = z;
#declare lookat = <0, 0, 0>;
#declare cam_loc = lookat+(<.5, 1, .25>*600);
#declare cam_zoom = 10;
#declare light_loc = <1, .5, .25>*500000;

global_settings
{
	max_trace_level 12
	assumed_gamma 2.2
}

background { Black }
#default
{
	pigment { rgb<.70, .70, .75> }
	finish
	{
     ambient .25
	  diffuse .75
	  reflection 0
	  phong 0
	  phong_size 30
	  brilliance .5
	}
}

/////////////////////////////////////////////////////////////////////////////
// Lights

light_source
{
   light_loc
   colour rgb<1, 1, 1>
}

/////////////////////////////////////////////////////////////////////////////
// Camera

camera
{
   location cam_loc
   direction <cam_zoom,0,0>
   up sky_vect
   right <0, -(image_width/image_height), 0>
   sky sky_vect
   look_at lookat
}

/////////////////////////////////////////////////////////////////////////////
// Objects

#local r=8.5852/2; //.338in

#local CaselessBullet=
intersection
{
	cylinder{<0, 0, 0>, <39.5, 0, 0>, r translate<-12.5, 0, 0>}
	#local rx=0;
	#while(rx<360)
		sphere
		{
			0, 1
			scale<67, 15, 50>
			translate<0, 0, -50+r>
			rotate<rx, 0, 0>
		}
		#local rx=rx+5.715;
	#end
	translate<12.5, 0, 0>	
}

difference
{
	object{CaselessBullet	texture{T_Chrome_5C}}
	plane{-y, 0}
	cutaway_textures
}





-- 
FE


Post a reply to this message

From: Bob Hughes
Subject: Re: Possible bug in cutaway_textures in beta30
Date: 25 Jan 2009 05:11:32
Message: <497c3ad4$1@news.povray.org>
> "Rarius" <rar### [at] rariuscouk> wrote in message 
> news:4979d845@news.povray.org...
> THIMC,
>
> If I run the attached POV file I get the following error.
>
>    Fatal error in renderer: Out of memory.
>    Render failed
>
> If I comment out the cutaway_textures, or change the plane from y to -y it 
> works fine.

Guessing you wrote that wrong. I see error with a -y plane and okay if y.

Same thing otherwise, smaller number addition in the while loop shows error.

Curiously, if the camera is rotated by 180*z it either fixes or causes the 
error when changing the differencing plane to +y or -y.


Post a reply to this message

From: clipka
Subject: Re: Possible bug in cutaway_textures in beta30
Date: 25 Jan 2009 08:10:01
Message: <web.497c644b42b9e70e3c6235530@news.povray.org>
"Bob Hughes" <omniverse charter net> wrote:
> Curiously, if the camera is rotated by 180*z it either fixes or causes the
> error when changing the differencing plane to +y or -y.

Maybe it's a question of interior_texture?


Post a reply to this message

From: Bob Hughes
Subject: Re: Possible bug in cutaway_textures in beta30
Date: 25 Jan 2009 12:54:41
Message: <497ca761$1@news.povray.org>
"clipka" <nomail@nomail> wrote in message 
news:web.497c644b42b9e70e3c6235530@news.povray.org...
> "Bob Hughes" <omniverse charter net> wrote:
>> Curiously, if the camera is rotated by 180*z it either fixes or causes 
>> the
>> error when changing the differencing plane to +y or -y.
>
> Maybe it's a question of interior_texture?


Tried adding that in the sphere and box union just now, same result. If put:

texture{pigment{rgb 1}}
interior_texture{pigment{rgb 1}}

into the CSG after the differenced box it overrides the cutaway.

Something else I tried was adding 'inverse' ahead of cutaway_textures, 
thinking it might move the blank cutaway surface outside or be non-blank, 
and got an error about cutaway_textures needing to be used in intersection 
or difference (3.6 errors on this too).
Putting inverse afterward doesn't error, but still only black cutaway.

Looked at the program code (3.6 lighting.cpp, 3.7 trace.cpp) just to see 
what might have changed, just out of curiosity not knowing what's really 
going on in there. Main reason why I admire the programmers, very little of 
it makes sense to me. That stuff scatters around to so many places in the 
code I could never decipher it.


Post a reply to this message

From: Chris Cason
Subject: Re: Possible bug in cutaway_textures in beta30
Date: 15 Feb 2009 05:45:45
Message: <4997f259$1@news.povray.org>
Rarius wrote:
> THIMC,
>  
> If I run the attached POV file I get the following error.
>  
>     Fatal error in renderer: Out of memory.
>     Render failed
>  
> If I comment out the cutaway_textures, or change the plane from y to
> -y it works fine. I suspect a bug in the cutaway_textures code.
>  
> I have just tried it again after changing line 77 to read "  #local
> rx=rx+10;" and it now works... In fact any step value over 5.715 works,
> but anything less fails, but only with cutaway_textures!
>  
> It fails consistantly in both Version 3.7.0.beta.30.msvc8-sse2.win32 and
> in Version 3.7.0.beta.30.msvc8.win32, but works fine in Version
> 3.6.1.icl8.win32

The problem here is that there are too many entries in the weighted texture
list. Making the step smaller increases the total number of textures.
Currently the weighted texture list is a fixed-size vector (max 64
elements). This is done to force the vector to be created on the stack,
rather than the heap (which forces a malloc/free, requires heap locking,
and in general badly damages performance).

Clearly this has to be fixed (this is not the first time we've run into
this), but it'll need to wait a bit.

-- Chris


Post a reply to this message

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