|
![](/i/fill.gif) |
"sitha" <nsi### [at] excite com> wrote in message
news:web.4564071e86d65c514ac3566b0@news.povray.org...
> Hi,
> Sorry if I dont explain my problem clearly.
> Say I want to create 100 frames of bitmap files from a pov file. In the
> pov
> file vertex and face indices are fixed. they will not change. I want to
> change each time texture rgb color only. This rgb here I am going to give
> the value from my analsis result for each frame. My question is would it
> be
> possible to give the rgb changes in one pov file or I should create pov
> files corresponding to the rgb value changes. Bcs now what I did was,
> created 100 0f pov fils corresponding to the rgb value.
>
> Pls help me.
>
Hi Sitha,
POV-Ray allows you to do it either way. To set the different rgb values
within a single file (either the scene file or a separate include file) you
can use the 'frame_number' identifier that Stephen mentioned, which tells
you the number of the frame being rendered, or the 'clock' float identifier
which passes from 0 to 1 through the animation, if that is more convenient.
There are lots of ways you could use the information from these identifiers
to affect the colour value. For example:
o You can calculate a colour within the SDL - 'rgb <clock,1-clock,0>'
will change a colour from green to red as the animation progresses from the
first to last frame. This doesn't have to be a simple calculation, you can
use functions, algebra, etc. in the calculation.
o You can build a series of #if statements, such as '#if
(frame_number=123) #local MyColour= pigment {color rgb <1,2,3>}; #end'
o You could have a single .csv file (Comma Separated Variables)
containing all of the colour values you've calculated with one line per
frame, then you could use the frame_number variable to work out which line
of the file to read for a particular frame.
The best solution for you is likely to be the easiest and that depends on
how you're generating the information and how you really need to use it. If
you are uv mapping your colour values to a mesh, then it may well be best to
generate one file per frame in the format required for uv mapping, using the
frame number in the file name. You can then use the 'concat' function along
with the 'frame_number' identifier to '#include' the appropriate values,
dynamically building the file name in your SDL.
Hope this helps
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |