POV-Ray : Newsgroups : povray.animations : JPEGs and Movies : Re: JPEGs and Movies Server Time
29 Jun 2024 01:34:03 EDT (-0400)
  Re: JPEGs and Movies  
From: Ger
Date: 8 Jan 2006 05:14:10
Message: <43c0e5f1@news.povray.org>
James wrote:

>> >instead of using concat within the filename:
>> >image_map { jpeg concat("filename", str(filenum,0,0),".jpg")}
>> >
>> >try predeclaring it:
>> >
>> >#declare filnam = concat("filename", str(filenum,0,0),".jpg");
>> >image_map {jpeg filam}
>>
>> You may need to use str(filenum,-4,0) to get the leading zeroes in
>> "train0001.jpg".
> 
> Appreciate the help lads, but neither of those methods worked, I put
> together 1000 lines in excel the easy way and imported it into a
> switch/case routine and got the desired result, but its still tedious.

This works most definitely (because I use it in an animation)

#declare PaintingName =
concat("art/MBclear/DK44",str(frame_number-4300,-5,0),".png");
// art/MBclear being the folder where the images are
// DK44 is the base name with the str() bit giving DK4400001.png through
// DK4410000.png

#declare ClearPainting1 =
union {
        object {PngPainting (PaintingName, 400, 225, 1 , 0, 12.5, no, < 0,0,0>)}
        object { ScrewSet }
        }

// PngPainting is a macro that scales, rotates and frames the image

// And here I place it in the scene
object { ClearPainting1 translate <  1000, 412.5, 20> }


See, no need for 1000's of lines bundled in Excel. Since I have a total of
18 of these moving paintings over a total animation of 10.000 frames that
would give me 180.000 lines of case statements. No, thank you. I like the
above a lot more

Hope this helps
-- 
Ger


Post a reply to this message

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