POV-Ray : Newsgroups : povray.newusers : Avoiding re-parsing in animation. Server Time
26 Nov 2024 23:30:11 EST (-0500)
  Avoiding re-parsing in animation. (Message 1 to 8 of 8)  
From: Miguel Garcia
Subject: Avoiding re-parsing in animation.
Date: 9 Sep 2003 17:25:13
Message: <3f5e4539@news.povray.org>
I have created an scenario in which the parsing time is much longer than the
image-generating time. I would like to make an animation in which only the
camera moves, therefore the re-parsing of the objects in the scenario seems
useless. Is it possible to avoid such re-parsing??

Thanks,

--


Universidad Complutense de Madrid


Avda. Complutense s/n
28040 Madrid
Tlf. 91 394 44 11


Post a reply to this message

From: Warp
Subject: Re: Avoiding re-parsing in animation.
Date: 9 Sep 2003 18:12:39
Message: <3f5e5057@news.povray.org>
Miguel Garcia <mig### [at] telefonicanet> wrote:
> Is it possible to avoid such re-parsing??

  With the current official version, no.

  IIRC the older MegaPov had support for persistent variables. You might
want to check that.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Miguel Garcia
Subject: Re: Avoiding re-parsing in animation.
Date: 9 Sep 2003 18:23:39
Message: <3f5e52eb$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3f5e5057@news.povray.org...
> Miguel Garcia <mig### [at] telefonicanet> wrote:
> > Is it possible to avoid such re-parsing??
>
>   With the current official version, no.
>

Thank you very much. It is what as I feared.

>   IIRC the older MegaPov had support for persistent variables. You might
> want to check that.
>

I'll try this... or I'll get a 10 times faster computer!

--


Universidad Complutense de Madrid


Avda. Complutense s/n
28040 Madrid
Tlf. 91 394 44 11


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Avoiding re-parsing in animation.
Date: 9 Sep 2003 19:21:50
Message: <3f5e608e$1@news.povray.org>
Well, depends on what you actually do with
your objects. If they're done with a lot of
loops and macros, you might want to consider
writing the objects to HD and then just
load them for successive frames. Unless they're
changed during the animation of course, in
which case even if MegaPOV had some feature
like that (I don't know, don't use it) would be
of no use.

Regards,
Tim

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de


> I have created an scenario in which the parsing time is much longer than
the
> image-generating time. I would like to make an animation in which only the
> camera moves, therefore the re-parsing of the objects in the scenario
seems
> useless. Is it possible to avoid such re-parsing??
>
> Thanks,
>
> --


> Universidad Complutense de Madrid
>

> Avda. Complutense s/n
> 28040 Madrid
> Tlf. 91 394 44 11
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 02.09.2003


Post a reply to this message

From: Miguel Garcia
Subject: Re: Avoiding re-parsing in animation.
Date: 9 Sep 2003 19:39:01
Message: <3f5e6495@news.povray.org>
"Tim Nikias v2.0" <no_lights (@) digitaltwilight.de> wrote in message
news:3f5e608e$1@news.povray.org...
> Well, depends on what you actually do with
> your objects. If they're done with a lot of
> loops and macros, you might want to consider
> writing the objects to HD and then just
> load them for successive frames.


Well, it is exactly like that, with a 1-parametric definition for ellipsoids
I get some sort of of tentacles (for the abstract chess pieces in my
webpage). But, how can I save/load objects?  Is there any facility to do it
in POV? Sorry, if it is there in the documentation I managed to completely
forget it.

Thanks a lot,

--

http://www.telefonica.net/web/miguelgdz/index.html


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Avoiding re-parsing in animation.
Date: 9 Sep 2003 21:43:31
Message: <3f5e81c3$1@news.povray.org>
You'd have to use the #write commands.
What you do, is open a file with
#fopen Output "filename.ext" write

"Output" is then a variable the #write commands
use to identify into which file to write:
#write (Output, Blabla)
Blabla is then a string with whatever you like. If
you have to put a vector or float/boolean in a
string, do it like this:
#write (Output, "Example-Vector:",Vector,"\n")

the \n is a *return*, so the file will write in the
next line. For a sphere, where Sphere_Center
and Sphere_Radius are the parameters for the
sphere:

#write (Output, "sphere{",Sphere_Center,",",Sphere_Radius,"}\n")

Problem with textures is, that you'd either have to write
them by hand into the #write command, or you'd have to
just place a variable instead, like
#write (Output, "sphere{0,1 texture{Predefined_Texture}}\n")
And somewhere before including the file in which this is
all is written, you do
#declare Predefined_Texture=texture{...}

You might want to use
#fclose Output
After the file is finished, though POV-Ray will Auto-Close
the open files once the end of the scene is reached. Then,
around the entire file-writing process, make a switch:
#if (frame_number=0)
 [Write the File]
#else
 #include "File.ext"
#end
If you're first frame is actually numbered 1, then use
#if (frame_number=1)

That's just about it. Just keep in mind that #write
only accepts strings, vectors and float (where boolean
is interpreted to 0 or 1).
The Docs should help getting the details right, e.g. you
can use
#fopen Output "filename.ext" append
to not overwrite a file once it is opened, but rather add
the lines after the already present data in that file.

That should get you started.
Regards,
Tim

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de

>
> "Tim Nikias v2.0" <no_lights (@) digitaltwilight.de> wrote in message
> news:3f5e608e$1@news.povray.org...
> > Well, depends on what you actually do with
> > your objects. If they're done with a lot of
> > loops and macros, you might want to consider
> > writing the objects to HD and then just
> > load them for successive frames.
>
>
> Well, it is exactly like that, with a 1-parametric definition for
ellipsoids
> I get some sort of of tentacles (for the abstract chess pieces in my
> webpage). But, how can I save/load objects?  Is there any facility to do
it
> in POV? Sorry, if it is there in the documentation I managed to completely
> forget it.
>
> Thanks a lot,
>
> --

> http://www.telefonica.net/web/miguelgdz/index.html
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 01.09.2003


Post a reply to this message

From: Miguel Garcia
Subject: Re: Avoiding re-parsing in animation.
Date: 10 Sep 2003 03:12:04
Message: <3f5ecec4@news.povray.org>
"Tim Nikias v2.0" <no_lights (@) digitaltwilight.de> wrote in message
news:3f5e81c3$1@news.povray.org...
> You'd have to use the #write commands.
> What you do, is open a file with
> #fopen Output "filename.ext" write
>
> "Output" is then a variable the #write commands
> use to identify into which file to write:
> #write (Output, Blabla)
> Blabla is then a string with whatever you like. If
> you have to put a vector or float/boolean in a
> string, do it like this:
> #write (Output, "Example-Vector:",Vector,"\n")
>
> the \n is a *return*, so the file will write in the
> next line. For a sphere, where Sphere_Center
> and Sphere_Radius are the parameters for the
> sphere:
>
> #write (Output, "sphere{",Sphere_Center,",",Sphere_Radius,"}\n")
>
> Problem with textures is, that you'd either have to write
> them by hand into the #write command, or you'd have to
> just place a variable instead, like
> #write (Output, "sphere{0,1 texture{Predefined_Texture}}\n")
> And somewhere before including the file in which this is
> all is written, you do
> #declare Predefined_Texture=texture{...}
>
> You might want to use
> #fclose Output
> After the file is finished, though POV-Ray will Auto-Close
> the open files once the end of the scene is reached. Then,
> around the entire file-writing process, make a switch:
> #if (frame_number=0)
>  [Write the File]
> #else
>  #include "File.ext"
> #end
> If you're first frame is actually numbered 1, then use
> #if (frame_number=1)
>
> That's just about it. Just keep in mind that #write
> only accepts strings, vectors and float (where boolean
> is interpreted to 0 or 1).
> The Docs should help getting the details right, e.g. you
> can use
> #fopen Output "filename.ext" append
> to not overwrite a file once it is opened, but rather add
> the lines after the already present data in that file.
>
> That should get you started.

Thanks a lot for your detailed instructions! It is much more than enough to
get started.

Cheers,

--

http://www.telefonica.net/web/miguelgdz/index.html


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Avoiding re-parsing in animation.
Date: 10 Sep 2003 03:56:19
Message: <3f5ed923$1@news.povray.org>
No problem. Hope you post the animation in
povray.binaries.animation once its finished. :-)

Regards,
Tim

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de

> >
> > That should get you started.
>
> Thanks a lot for your detailed instructions! It is much more than enough
to
> get started.
>
> Cheers,
>
> --

> http://www.telefonica.net/web/miguelgdz/index.html
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 01.09.2003


Post a reply to this message

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