POV-Ray : Newsgroups : povray.newusers : Rendering ran out of memory Server Time
1 Nov 2024 06:16:54 EDT (-0400)
  Rendering ran out of memory (Message 1 to 6 of 6)  
From: jofg
Subject: Rendering ran out of memory
Date: 24 Jan 2010 13:50:01
Message: <web.4b5c961a5a9b58596f805b290@news.povray.org>
Hi

I used an algorithm that consists of sines, cosines, and polar coordinates, to
construct 'Rose' objects that consist of 360 cylinders.

I then used nested while loops to create an array 180 x 180 of 'Roses' with
various parameters.

When I ran it, it got to ->

parsed 315000000+ tokens

and gave a message to the effect, "ran out of memory' , basically slowed down my
computer and almost crash my computer.

Question.
Is there a way to connect my computer via Internet to a server type renderer to
run my pov file?

Or, is my file just an example of poor programming?

pseudocode looks something like

while y <= 180     // creates a 180 x 180 array
   while x <= 180
     while Rose_object <= 360 cylinders

       rose has parameters (a, b)
             find all roses for ->
             a <= 180    // start a = 1 and increment
             b <= 180    // start b = 1 and increment
            some values return errors,  skip those
            algorithm has about 14 variables that change for each loop.

      end
   end
end

Can I connect to a more powerful computer to render?

thanks


Post a reply to this message

From: Tim Attwood
Subject: Re: Rendering ran out of memory
Date: 24 Jan 2010 22:58:46
Message: <4b5d16f6$1@news.povray.org>
> Or, is my file just an example of poor programming?

It's tough to tell just from the pseudo-code, but
you may not have incremented the counters.

#declare c=0;
#while (c<100)
   // foo
   #declare c=c+1;
#end


Post a reply to this message

From: jofg
Subject: Re: Rendering ran out of memory
Date: 26 Jan 2010 00:05:00
Message: <web.4b5e77c6efff664b6f805b290@news.povray.org>
"Tim Attwood" <tim### [at] anti-spamcomcastnet> wrote:
> > Or, is my file just an example of poor programming?
>
> It's tough to tell just from the pseudo-code, but
> you may not have incremented the counters.
>
> #declare c=0;
> #while (c<100)
>    // foo
>    #declare c=c+1;
> #end

yes, the counters were incremented

while y <= 180     // creates a 180 x 180 array
   while x <= 180
     while Rose_object <= 360 cylinders

       rose has parameters (a, b)
             find all roses for ->
             a <= 180    // start a = 1 and increment
             b <= 180    // start b = 1 and increment
            some values return errors,  skip those
            algorithm has about 14 variables that change for each loop.

      end
  x = x + 1
a = a + 1
b = b + 1
   end
y = y+1
end

I reran the file
for x < 50
    y < 50

the file creates 900000  cylinders

parse time 42 minutes
render time 7 minutes

anything larger, will of course take more time.
And it is impossible to run for x < 180 and y < 180 without more memory.

Unfortunately , I can't upload an attachment.


Post a reply to this message

From: Tim Attwood
Subject: Re: Rendering ran out of memory
Date: 29 Jan 2010 20:11:58
Message: <4b63875e$1@news.povray.org>
> I reran the file
> for x < 50
>    y < 50
> 
> the file creates 900000  cylinders
> 
> parse time 42 minutes
> render time 7 minutes
> 
> anything larger, will of course take more time.
> And it is impossible to run for x < 180 and y < 180 without more memory.
> 
> Unfortunately , I can't upload an attachment.

Ah, it's just too many objects then.

I think POV will run on Amazon, but I've never used it
personally to know the ins and outs.
http://aws.amazon.com/ec2/

You could redesign the scene to use less memory...
make a few dozen copies of your object, then place
them randomly rotated...


Post a reply to this message

From: Alain
Subject: Re: Rendering ran out of memory
Date: 30 Jan 2010 19:51:36
Message: <4b64d418@news.povray.org>

>> I reran the file
>> for x < 50
>> y < 50
>>
>> the file creates 900000 cylinders
>>
>> parse time 42 minutes
>> render time 7 minutes
>>
>> anything larger, will of course take more time.
>> And it is impossible to run for x < 180 and y < 180 without more memory.
>>
>> Unfortunately , I can't upload an attachment.
>
> Ah, it's just too many objects then.
>
> I think POV will run on Amazon, but I've never used it
> personally to know the ins and outs.
> http://aws.amazon.com/ec2/
>
> You could redesign the scene to use less memory...
> make a few dozen copies of your object, then place
> them randomly rotated...

The first place to look: remove the texture from the individual objects, 
put them in an union, and apply the texture to the union.
You only use textures for the components IF AND ONLY IF it's texture is 
different than that of the majority of the components.

The more numerous component are probably the petals, so, you give the 
petals texture to the union.

At 50x50, you get 900 000 cylinders.
180 is 3.6 times 50.
At 180x180, you get 900 000 * 3.6 * 3.6 = 900 000 * 12.96 = 11 664 000
11 millions, 664 thousand cylinders!
Each cylinder uses 2 end coordinates, one radius, a transform matrix 
and, if individualy textured, a texture.
The texture can easily be the part that uses the most memory.


Alain


Post a reply to this message

From: jofg
Subject: Re: Rendering ran out of memory
Date: 4 Feb 2010 16:25:01
Message: <web.4b6b3a3eefff664bd7d043ea0@news.povray.org>
Yes

All the cylinders have the same texture, so I did as you said, and created a
union, and added only one instance of the texture at the end.

This was a more advanced feature that I have yet to reach.

Also, I modified one of the while loops to calculate the minimum number of
cylinders (lines) for each object.

There are now less than half the number of cylinders from my first version, more
unique objects, and by adding the same texture to all cylinders, it took about
two minutes to parse and about two hours to render 1280x1024, AA .3


Post a reply to this message

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