POV-Ray : Newsgroups : moray.win : Actuate.lua plugin, proof of concept (animation) Server Time
17 May 2024 21:58:37 EDT (-0400)
  Actuate.lua plugin, proof of concept (animation) (Message 1 to 7 of 7)  
From: StephenS
Subject: Actuate.lua plugin, proof of concept (animation)
Date: 23 Dec 2003 12:56:54
Message: <3fe881e6$1@news.povray.org>
The resent post by Tom Galvin about animation got me thinking :-)

I have made a very primitive plugin to animate things using Pov's clock.
Moray's material editor's 'direct code' (tested)
InsertCode plugin (Luis) (not tested)

There is no error checking yet, so it's not linked from my website yet.
There is an animated gif on the sample page.
http://ca.geocities.com/morayplugin/

In Moray:
Code an object or material with the clock value.
Unselect the actuate checkbox.
Render scene.
Select the actuate checkbox.
Render scene.
Goto POV-Ray and run the ini file.
The resulting ini/inc/pov files hold the complete animation.

The plugin will let you select/input:
Final_Clock
Final_Frame
Initial_Clock
Initial_Frame
Subset_End_Frame
Subset_Start_Frame
Cyclic_Animation
Field_Render
Odd_Field
Output_File_Name
ini file name(the name of the current scene)

When the scene is rendered the generated pov code will append the options to
the end of the ini file with file i/o directives (#fopen,#write,#fclose). It
will also create a 'filename'_status.txt file so the resulting animation
won't keep on appending.

If you are interested in taking a look at it, respond to this thread/e-mail
me asking for the link.

Actuate1a.zip
  Actuate.lua (plain text file)
  testjunk_Actuate.mdl (moray file used to generate testjunk)
  testjunk.gif (animated gif, assembled with PSP7 from 11 png files)

Comments welcome

Stephen


Post a reply to this message

From: Stephen McAvoy
Subject: Re: Actuate.lua plugin, proof of concept (animation)
Date: 23 Dec 2003 15:59:22
Message: <p4bhuvs0o5r5jdtvgncf7do6jthg2lidr3@4ax.com>
On Tue, 23 Dec 2003 12:54:55 -0500, "StephenS" <ssh### [at] ottawanet> wrote:

>
>If you are interested in taking a look at it, respond to this thread/e-mail
>me asking for the link.
>
Stephen
It sounds like a good idea and I am interested. One thing, I could not see a
link to your animated gif.

Regards
        Stephen


Post a reply to this message

From: StephenS
Subject: Re: Actuate.lua plugin, proof of concept (animation)
Date: 23 Dec 2003 17:27:10
Message: <3fe8c13e@news.povray.org>
...
>One thing, I could not see a
> link to your animated gif.
...

humm, the direct link should be:
http://ca.geocities.com/morayplugin/samples.htm
I allways thought it was more polite to only post links to pages that change
the least.

Now I see, I should have said:
There is an animated gif linked from the main page on the samples page.

Stephen


Post a reply to this message

From: Stephen McAvoy
Subject: Re: Actuate.lua plugin, proof of concept (animation)
Date: 23 Dec 2003 17:40:30
Message: <tughuvcsk3ata0e94amv4q8271h7sr4977@4ax.com>
On Tue, 23 Dec 2003 17:25:10 -0500, "StephenS" <ssh### [at] ottawanet> wrote:

>I allways thought it was more polite to only post links to pages that change
>the least.

True, true.
thanks
Nice to be able to do it directly from Moray.

Regards
        Stephen


Post a reply to this message

From: StephenS
Subject: Re: Actuate.lua plugin, update
Date: 26 Dec 2003 10:35:42
Message: <3fec554e@news.povray.org>
Actuate1a1

In Moray:
Code an object or material with the clock value.
Render scene.
Goto POV-Ray and run the ini file.
The resulting ini/inc/pov files hold the complete animation information.

The plugin will let you select/input:
Most options listed in '5.2 Options reference' of the POV-Ray help file.

When the scene is parsed the generated pov code will create/overwrite the
options to a 'filename'_actuate.ini file with file i/o directives
(#fopen,#write,#fclose). The first entery is to include 'filename'.ini (the
one generated by Moray), followed by the options you have selected.

If you are interested in taking a look at it, respond to this thread/e-mail
me asking for the link.

Actuate1a1.zip (about 36k)
  Actuate.lua (plain text file)
  testjunk_Actuate.mdl (moray file used to generate testjunk)
  testjunk.gif (animated gif, assembled with PSP7 from 15 png files)

How it works:(pov code)
A file was started in moray called testjunk_actuate.mdl
... options set ...
resulting in the following code being generated after the scene was parced
(complete rendering not required).

// Actuate001
#if (file_exists("testjunk_actuate.ini"))
  #debug"testjunk_actuate.ini file exists\n"
  #fopen Actuate "testjunk_actuate_actuate.ini" write
  #write(Actuate,"; Actuate plugin 1alpha by S. Shonfield,")
  #write(Actuate,"\ntestjunk_actuate.ini")
  #write(Actuate,"\nFinal_Frame=15")
  #write(Actuate,"\nInitial_Frame=1")
  #write(Actuate,"\nInput_File_Name=testjunk_actuate")
  #write(Actuate"\n; end Actuate")
  #fclose Actuate
#else // file does not exist
  #debug"File \"testjunk_actuate.ini\" does not exist\n"
#end

Comments welcome

Stephen


Post a reply to this message

From: StephenS
Subject: Re: Actuate.lua plugin
Date: 26 Dec 2003 11:13:17
Message: <3fec5e1d@news.povray.org>
...
> In Moray:
> Code an object or material with the clock value.
...
An example of a material:
From 6.1.3.4.2 Clock Identifiers in the POV-Ray help file
clock_on

#if(clock_on=0)
    //stuff for still image
    #declare myclock=1;
#else
    //some animation
    #declare myclock=clock;
#end
texture
{
   pigment
   {
      color rgb <0.0, 0.0, 1.0*(sin (pi * myclock))>
   }
}

Comments welcome

Stephen


Post a reply to this message

From: StephenS
Subject: Re: Actuate.lua plugin, released
Date: 1 Jan 2004 11:10:29
Message: <3ff44675@news.povray.org>
Actuate.lua 1b3 can now be found linked from:
http://ca.geocities.com/morayplugin/
Thanks go to Stephen McAvoy for feedback on earlier versions.
The plugin is a plain text file with a .lua extension.

How to use:
You must supply an 'Input_File_Name' without extension for the plugin to do
anything. The generated code will check for the existence of the file, if
not found, will send a message to the Debug stream in POV-Ray.

When the scene is parsed* the plugin will create a new file based on the
supplied 'filename' with a '_actuate.ini' appended to the end.
Example:
Input_File_Name=Myfile
The plugin will create(or overwrite if it already exists)
Myfile_actuate.ini

Go to POV-Ray, open and run this file.

The plugin will let you select most options available in a '.ini' file.
Example:
Final_Frame=5

For this example to do anything, something in your Moray scene needs to be
coded with the 'clock' variable.
In the Material editor's 'direct code'
if(clock_on=0)
    //stuff for still image
    #declare myclock=1;
#else
    //some animation
    #declare myclock=clock;
#end
texture
{
   pigment
   {
      color rgb <0.0, 0.0, 1.0*(sin (pi * myclock/2))>
   }
}
Assign this to an object. The object will change colour over the animation
from black to blue.

Currently if you want to have more than 1 setup, you can use more than 1
Actuate plugin and select/unselect Moray's export flag for each plugin.

* the scene does not need to be fully rendered, when the picture starts to
show up you can pause/cancel the render in Moray.

Comments welcome

Stephen


Post a reply to this message

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