|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to use a Targa file in a height field. I'm calling the file via
the following string:
height_field {
tga concat("d:\\povray\\penfilter\\fig", str(1,-2,0), ".tga")
which I would expect to return
height_field {tga "d:\povray\penfilter\fig001.tga"
But I continue to get the message: Error opening TGA image. There are a
series of files in that directory called fig001.tga through fig100.tga, and
when I use the code:
tga "d:\povray\penfilter\fig001.tga"
by itself, the file renders.
I assume there is something wrong with the concat parameters (sorry, I don't
know how to use #debug), but the "-2" above should pad "fig1" with two
zeroes, as in: "fig001" correct?
Anyway, maybe it is something with the double quotes? Ultimately, I plan to
use a sequence of Targa files (all 100 of them) and wonder if I can use
str(clock*100,-2,0)
but would POV see "clock" as a text string, or is that a reserved string
that it will correctly see as the clock?
Please let me know if anyone has any specific suggestions.
Thanks very much,
Dennis
--
dhm### [at] mediaonenet
www.casdn.neu.edu/~dmiller
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dennis Milller <dhm### [at] mediaonenet> wrote:
: I assume there is something wrong with the concat parameters (sorry, I don't
: know how to use #debug), but the "-2" above should pad "fig1" with two
: zeroes, as in: "fig001" correct?
Nope. It makes the integer part 2 digits long with padded zeros if the
number is not big enough. That is, you get "fig01".
Try with -3.
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Yes! You are correct, and -3 works.
Next challenge:
I would like to read in a series of files starting with fig001.tga and
ending with fig100.tga
But whereas I would use "clock*100" in most cases, that does not work in the
string:
concat("d:\\povray\\penfilter\\fig", str(clock*100,-3,0), ".tga")
I assume the multiplier (*) is read as text? or maybe clock? (That may not
be true...) But could you suggest a way to read in the sequence of images
from 001 to 100?
Thanks again very much,
Dennis
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c62f500@news.povray.org...
> Dennis Milller <dhm### [at] mediaonenet> wrote:
> : I assume there is something wrong with the concat parameters (sorry, I
don't
> : know how to use #debug), but the "-2" above should pad "fig1" with two
> : zeroes, as in: "fig001" correct?
>
> Nope. It makes the integer part 2 digits long with padded zeros if the
> number is not big enough. That is, you get "fig01".
> Try with -3.
>
> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb
x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// -
Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
You should learn to use the #debug stream to print what you are creating
to the console. That is, create the file name you want to open and print
this file name with #debug to see that it's correct. For example:
#declare Filename = concat(whatever);
#debug concat("Filename to read: ", Filename, "\n")
This way you can check that what you are creating is correct.
Anyways, your problem is that you are using clock*100. The first calue
clock gets is 0, and 0*100 = 0. That is, you are getting the number "000",
not "001".
The easiest way of fixing this is to use frame_number instead of clock*100.
frame_number gets consecutive integer numbers starting from 1, and that's
exactly what you want.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Okay. That's it.
Thanks again for your help.
I'll look into debug.
Best,
D.
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c630bd5@news.povray.org...
> You should learn to use the #debug stream to print what you are creating
> to the console. That is, create the file name you want to open and print
> this file name with #debug to see that it's correct. For example:
>
> #declare Filename = concat(whatever);
> #debug concat("Filename to read: ", Filename, "\n")
>
> This way you can check that what you are creating is correct.
>
> Anyways, your problem is that you are using clock*100. The first calue
> clock gets is 0, and 0*100 = 0. That is, you are getting the number "000",
> not "001".
>
> The easiest way of fixing this is to use frame_number instead of
clock*100.
> frame_number gets consecutive integer numbers starting from 1, and that's
> exactly what you want.
>
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb
M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// -
Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in article 3c62fa43$1@news.povray.org, Dennis Milller at
dhm### [at] mediaonenet wrote on 7/2/02 11:02 pm:
> Yes! You are correct, and -3 works.
>
> Next challenge:
> I would like to read in a series of files starting with fig001.tga and
> ending with fig100.tga
>
> But whereas I would use "clock*100" in most cases, that does not work in the
> string:
>
> concat("d:\\povray\\penfilter\\fig", str(clock*100,-3,0), ".tga")
why not use the frame_number?
that is:
concat("d:\\povray\\penfilter\\fig", str(frame_number, -3, 0), ".tga")
if you set your initial frame to 1 and your final frame to 100, you will get
fig001.tga to fig100.tga.
All the best
Fidel.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sorry, I didn't notice it was an old message.
But, anyway it should help others.
All the best
Fidel.
in article 3c62fa43$1@news.povray.org, Dennis Milller at
dhm### [at] mediaonenet wrote on 7/2/02 11:02 pm:
> Yes! You are correct, and -3 works.
>
> Next challenge:
> I would like to read in a series of files starting with fig001.tga and
> ending with fig100.tga
>
> But whereas I would use "clock*100" in most cases, that does not work in the
> string:
>
> concat("d:\\povray\\penfilter\\fig", str(clock*100,-3,0), ".tga")
>
> I assume the multiplier (*) is read as text? or maybe clock? (That may not
> be true...) But could you suggest a way to read in the sequence of images
> from 001 to 100?
> Thanks again very much,
> Dennis
>
> "Warp" <war### [at] tagpovrayorg> wrote in message
> news:3c62f500@news.povray.org...
>> Dennis Milller <dhm### [at] mediaonenet> wrote:
>> : I assume there is something wrong with the concat parameters (sorry, I
> don't
>> : know how to use #debug), but the "-2" above should pad "fig1" with two
>> : zeroes, as in: "fig001" correct?
>>
>> Nope. It makes the integer part 2 digits long with padded zeros if the
>> number is not big enough. That is, you get "fig01".
>> Try with -3.
>>
>> --
>> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb
> x]
>> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
>> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// -
> Warp -
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in article B99D41EB.413B%fid### [at] artrecognitioncouk, Fidel viegas at
fid### [at] artrecognitioncouk wrote on 5/9/02 5:16 pm:
> in article 3c62fa43$1@news.povray.org, Dennis Milller at
> dhm### [at] mediaonenet wrote on 7/2/02 11:02 pm:
>
>> Yes! You are correct, and -3 works.
>>
>> Next challenge:
>> I would like to read in a series of files starting with fig001.tga and
>> ending with fig100.tga
>>
>> But whereas I would use "clock*100" in most cases, that does not work in the
>> string:
>>
>> concat("d:\\povray\\penfilter\\fig", str(clock*100,-3,0), ".tga")
>
> why not use the frame_number?
> that is:
>
> concat("d:\\povray\\penfilter\\fig", str(frame_number, -3, 0), ".tga")
>
> if you set your initial frame to 1 and your final frame to 100, you will get
> fig001.tga to fig100.tga.
correction, it will generate fig1.tga to fig100.tga.
Fidel.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fidel viegas <fid### [at] artrecognitioncouk> wrote:
>> concat("d:\\povray\\penfilter\\fig", str(frame_number, -3, 0), ".tga")
>>
>> if you set your initial frame to 1 and your final frame to 100, you will get
>> fig001.tga to fig100.tga.
> correction, it will generate fig1.tga to fig100.tga.
Are you sure? A small test:
#declare Ind = 1;
#while(Ind <= 20)
#debug concat("fig", str(Ind, -3, 0), ".tga\n")
#declare Ind = Ind+1;
#end
This prints "fig001.tga" to "fig020.tga".
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in article 3d7c857a@news.povray.org, Warp at war### [at] tagpovrayorg wrote on
9/9/02 12:26 pm:
> Fidel viegas <fid### [at] artrecognitioncouk> wrote:
>>> concat("d:\\povray\\penfilter\\fig", str(frame_number, -3, 0), ".tga")
>>>
>>> if you set your initial frame to 1 and your final frame to 100, you will get
>>> fig001.tga to fig100.tga.
>
>> correction, it will generate fig1.tga to fig100.tga.
>
> Are you sure? A small test:
>
> #declare Ind = 1;
> #while(Ind <= 20)
> #debug concat("fig", str(Ind, -3, 0), ".tga\n")
> #declare Ind = Ind+1;
> #end
>
> This prints "fig001.tga" to "fig020.tga".
You are correct, I used a 0 instead of -3 in str.
Apologies
Fidel.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|