|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have a series of JPEG files I exported from Adobe Premiere and I want to
use these in an animation as images on a screen within the animation. The
line I use to successfully put one image up is
#box { <0.0, 0.0, -screenthi> <screenwid, screenhei, screenthi> finish {
ambient 1 diffuse 0.9 } pigment { image_map { jpeg "filename.jpg" once
interpolate 2.0 } scale <screenwid, screenhei, screenthi> } translate
<-screenwid/2, 0, 0>}
the filenames are from train0001.jpg to train7046.jpg so I want to use the
clock to change the input file so that the code will look at the right
frame. I tried using a concatenation script however parenthesis around the
filename didn't allow that. How do I achieve this result?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"James" <bat### [at] hotmailcom> wrote:
> I have a series of JPEG files I exported from Adobe Premiere and I want to
> use these in an animation as images on a screen within the animation. The
> line I use to successfully put one image up is
>
> #box { <0.0, 0.0, -screenthi> <screenwid, screenhei, screenthi> finish {
> ambient 1 diffuse 0.9 } pigment { image_map { jpeg "filename.jpg" once
> interpolate 2.0 } scale <screenwid, screenhei, screenthi> } translate
> <-screenwid/2, 0, 0>}
>
> the filenames are from train0001.jpg to train7046.jpg so I want to use the
> clock to change the input file so that the code will look at the right
> frame. I tried using a concatenation script however parenthesis around the
> filename didn't allow that. How do I achieve this result?
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}
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Trevor G Quayle who wrote:
>"James" <bat### [at] hotmailcom> wrote:
>> I have a series of JPEG files I exported from Adobe Premiere and I want to
>> use these in an animation as images on a screen within the animation. The
>> line I use to successfully put one image up is
>>
>> #box { <0.0, 0.0, -screenthi> <screenwid, screenhei, screenthi> finish {
>> ambient 1 diffuse 0.9 } pigment { image_map { jpeg "filename.jpg" once
>> interpolate 2.0 } scale <screenwid, screenhei, screenthi> } translate
>> <-screenwid/2, 0, 0>}
>>
>> the filenames are from train0001.jpg to train7046.jpg so I want to use the
>> clock to change the input file so that the code will look at the right
>> frame. I tried using a concatenation script however parenthesis around the
>> filename didn't allow that. How do I achieve this result?
>
>
>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".
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> >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.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
James <bat### [at] hotmailcom> wrote:
> Appreciate the help lads, but neither of those methods worked
So you just dismissed them without giving them a second thought?
Please read the help files about str() and concat() and try to
solve *why* it didn't work for you. The principle was correct, so
if it didn't work it's because you did something wrong (a typo
perhaps?), not because it's not possible.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It's like when the string connected to the trigger mechanism breaks at the
wrong time and you find yourself stuck in your own trap... try something
that involves a rocket instead! It's what Wile E. Coyote would do! ;)
Actually I think sometimes if you're in a hurry there's not time to work out
the bugs even when you know the better way exists...
Charles
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
here is what i have used before:
texture {
pigment {
image_map {
jpeg concat(str(frame_number,-8,0),".jpg") // ("00000001.jpg", etc)
map_type 0
interpolate 2
once
}
translate <-0.5,-0.5,0> // center background
}
}
Jaap.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Also, there is no need to use XL. pov-ray is very good at generating
textfiles!
have a look at my rename.pov, it generates a windows/linux rename
batchfile/script (and a black image as a bonus :-)
http://news.povray.org/povray.binaries.utilities/thread/%3Cweb.4240b2b0f6941213a8399d8d0%40news.povray.org%3E/
so you could use pov-ray to generate a pov-ray include file with the big
switch statement...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|