POV-Ray : Newsgroups : povray.general : Memory question - splines Server Time
20 Nov 2024 02:41:00 EST (-0500)
  Memory question - splines (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Rune
Subject: Memory question - splines
Date: 1 Dec 2001 09:34:45
Message: <3c08ea85@news.povray.org>
How much memory would it approximately require to declare and use 4000
splines each with 2000 control points?

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: JRG
Subject: Re: Memory question - splines
Date: 1 Dec 2001 15:30:45
Message: <3c093df5$1@news.povray.org>
Too much?
I wonder how much time would it require to declare them by hand...

BTW, you can test it yourself with a simple loop: if your computer start
screaming then you'll probably need more memory.

--
Jonathan.
"Rune" <run### [at] mobilixnetdk> ha scritto nel messaggio
news:3c08ea85@news.povray.org...
> How much memory would it approximately require to declare and use 4000
> splines each with 2000 control points?
>
> Rune
> --
> 3D images and anims, include files, tutorials and more:
> Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
> POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
> POV-Ray Webring: http://webring.povray.co.uk
>
>


Post a reply to this message

From: JRG
Subject: Re: Memory question - splines
Date: 1 Dec 2001 15:33:17
Message: <3c093e8d@news.povray.org>
Are you still using beta 7?
:)

Rune wrote on '30th Novemeber 2001':
> How much memory would it approximately require to declare and use 4000
> splines each with 2000 control points?
>
> Rune
> --
> 3D images and anims, include files, tutorials and more:
> Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
> POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
> POV-Ray Webring: http://webring.povray.co.uk
>
>


Post a reply to this message

From: Rune
Subject: Re: Memory question - splines
Date: 1 Dec 2001 16:53:18
Message: <3c09514e@news.povray.org>
"JRG" wrote:
> Are you still using beta 7?
> :)

I wondered if anyone would figure it out... ;)

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Rune
Subject: Re: Memory question - splines
Date: 1 Dec 2001 16:53:21
Message: <3c095151@news.povray.org>
"JRG" wrote:
> Too much?

Correct answer!

I little test and a few calculations seem to predict that it would require
about 700 MB memory. The computer I'm working at most of the time has 16
MB...

Some people have suggested to me to redesign my particle system to *first*
calculate all the data for the particles for the entire animation, and then
render all the frames *afterwards*, based on that data. Seems like it's not
such a good idea...

Of course there might be some ideas I haven't considered, but I doubt that
the data amount can get down low enough for it to actually work.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Slime
Subject: Re: Memory question - splines
Date: 1 Dec 2001 19:56:03
Message: <3c097c23$1@news.povray.org>
What if you did this:

write the positions of particles to multiple files, each file containing the
data for, say, 100 frames. Then, when rendering, figure out which part of
which file to read for the current frame, and use the data from there.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From: Rune
Subject: Re: Memory question - splines
Date: 1 Dec 2001 21:33:24
Message: <3c0992f4@news.povray.org>
"Slime" wrote:
> What if you did this:
>
> write the positions of particles to multiple files,
> each file containing the data for, say, 100 frames.
> Then, when rendering, figure out which part of which
> file to read for the current frame, and use the data
> from there.

I suppose that could be done. But still the disc space required would be
many hundred MB, which is perhaps not a problem for some, but it is on my
computer...

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Mark Wagner
Subject: Re: Memory question - splines
Date: 1 Dec 2001 23:39:12
Message: <3c09b070@news.povray.org>
Rune wrote in message <3c095151@news.povray.org>...
>"JRG" wrote:
>> Too much?
>
>Correct answer!
>
>I little test and a few calculations seem to predict that it would require
>about 700 MB memory. The computer I'm working at most of the time has 16
>MB...


I've looked at the spline code, and by: eliminating pre-calculation of
spline coefficients, limiting splines to 3-D vectors, and changing the
spline code from double-precision floats to single-precision floats, the
memory needed could be reduced to 128 MB.

On a more practical note, since you're using spline interpolation, you
probably don't need to put every point calculated into the spline -- you can
probably get away with only putting in every fourth point or so.

--
Mark


Post a reply to this message

From: Rune
Subject: Re: Memory question - splines
Date: 2 Dec 2001 07:45:53
Message: <3c0a2281@news.povray.org>
"Mark Wagner" wrote:
> On a more practical note, since you're using spline
> interpolation, you probably don't need to put every
> point calculated into the spline -- you can probably
> get away with only putting in every fourth point or so.

That method alone would bring it down at 175 MB or maybe even below 100 MB,
but that's still way too much for my computer with 16 MB RAM...

Combining it with Slime's suggestion could maybe get it down at 5 MB. Well,
I'll have to consider it some more...

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Tim Nikias
Subject: Re: Memory question - splines
Date: 2 Dec 2001 21:01:22
Message: <3C0ADC83.461DFC5F@gmx.de>
Well, just an idea I had:

What if you just collect the points where the particles rebounce, and save
the time it would
take to hit the next rebounce-position?

If you know the rebounce position, you can calculate the surface-normal
there, and based on
the particles initial settings of speed and direction, you can recalculate
the new direction and speed
as well.

Hm, but then, you'd have a lot of calculation to do near the end of an
animation...

How about saving direction, speed, rebounce-position and time until next
rebounce? You can
calculate the path pretty easily from there on, I guess.

Hope you get the idea...

Tim


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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