POV-Ray : Newsgroups : povray.general : string problem Server Time
3 Nov 2024 03:05:09 EST (-0500)
  string problem (Message 1 to 8 of 8)  
From: Dennis Miller
Subject: string problem
Date: 1 Mar 2008 12:33:05
Message: <47c99351$1@news.povray.org>
I am trying to load a long sequence of TGA files into this image map:
image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), ".tga")

in the folder Sketches folder on my D drive there are 1800 files starting 
with
follow0000.tga
to
follow1800.tga

Can someone see a problem with the string here? I want to read in only the 
first 600 while the clock moves from 0.1 to 1.
The whole code segment is:
#local D=
  pigment{
   image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), 
".tga")   //group.tga is excellent   1352
  map_type 2 interpolate 2 once } translate <0, 0,0> scale 1 + clock*2 }

and I am getting a Parse Error that says: Cannot open TGA image.
thanks much for any help.
d

-- 

dhm### [at] comcastnet
http://www.dennismiller.neu.edu


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: string problem
Date: 1 Mar 2008 12:40:06
Message: <47c994f6@news.povray.org>
Dennis Miller escribió:
> I am trying to load a long sequence of TGA files into this image map:
> image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), ".tga")
> 
> in the folder Sketches folder on my D drive there are 1800 files starting 
> with
> follow0000.tga
> to
> follow1800.tga
> 
> Can someone see a problem with the string here? I want to read in only the 
> first 600 while the clock moves from 0.1 to 1.
> 
> and I am getting a Parse Error that says: Cannot open TGA image.
> thanks much for any help.

This won't solve the problem, but will help you find out why it's not 
working:

#declare ImageName = concat("D:\\sketches\\follow", str(clock*600,-4,0), 
".tga");
#debug concat("Attempting to load ", ImageName, "\n")

image_map {
    tga ImageName
    //...
}


Post a reply to this message

From: Sherry Shaw
Subject: Re: string problem
Date: 1 Mar 2008 12:44:58
Message: <47c9961a@news.povray.org>
Dennis Miller wrote:
> I am trying to load a long sequence of TGA files into this image map:
> image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), ".tga")
> 
> in the folder Sketches folder on my D drive there are 1800 files starting 
> with
> follow0000.tga
> to
> follow1800.tga
> 
> Can someone see a problem with the string here? I want to read in only the 
> first 600 while the clock moves from 0.1 to 1.
> The whole code segment is:
> #local D=
>   pigment{
>    image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), 
> ".tga")   //group.tga is excellent   1352
>   map_type 2 interpolate 2 once } translate <0, 0,0> scale 1 + clock*2 }
> 
> and I am getting a Parse Error that says: Cannot open TGA image.
> thanks much for any help.
> d
> 

I haven't checked it, but if you send your "concat" statement to #debug, 
you can verify whether you're actually getting the correct string. 
However, since you're only wanting integers, I'd suggest using 
"frame_number" rather than "clock."  (Just the first thing that occurs 
to me; hope this helps.)

--Sherry Shaw


-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Sherry Shaw
Subject: Re: string problem
Date: 1 Mar 2008 12:46:22
Message: <47c9966e@news.povray.org>
Nicolas Alvarez wrote:
> Dennis Miller escribió:
>> I am trying to load a long sequence of TGA files into this image map:
>> image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), 
>> ".tga")
>>
>> in the folder Sketches folder on my D drive there are 1800 files 
>> starting with
>> follow0000.tga
>> to
>> follow1800.tga
>>
>> Can someone see a problem with the string here? I want to read in only 
>> the first 600 while the clock moves from 0.1 to 1.
>>
>> and I am getting a Parse Error that says: Cannot open TGA image.
>> thanks much for any help.
> 
> This won't solve the problem, but will help you find out why it's not 
> working:
> 
> #declare ImageName = concat("D:\\sketches\\follow", str(clock*600,-4,0), 
> ".tga");
> #debug concat("Attempting to load ", ImageName, "\n")
> 
> image_map {
>    tga ImageName
>    //...
> }

Ah, great minds work alike, I see!  ;)

--Sherry Shaw


-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: string problem
Date: 1 Mar 2008 12:53:47
Message: <47c9982b$1@news.povray.org>
Sherry Shaw escribió:
> Ah, great minds work alike, I see!  ;)

I thought it was "fools seldom differ"? :)


Post a reply to this message

From: Sherry Shaw
Subject: Re: string problem
Date: 1 Mar 2008 13:01:17
Message: <47c999ed@news.povray.org>
Nicolas Alvarez wrote:
> Sherry Shaw escribió:
>> Ah, great minds work alike, I see!  ;)
> 
> I thought it was "fools seldom differ"? :)

;)

--Sherry Shaw


-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Alain
Subject: Re: string problem
Date: 1 Mar 2008 14:26:19
Message: <47c9addb$1@news.povray.org>
Dennis Miller nous apporta ses lumieres en ce 2008/03/01 12:33:
> I am trying to load a long sequence of TGA files into this image map:
> image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), ".tga")
> 
> in the folder Sketches folder on my D drive there are 1800 files starting 
> with
> follow0000.tga
> to
> follow1800.tga
> 
> Can someone see a problem with the string here? I want to read in only the 
> first 600 while the clock moves from 0.1 to 1.
> The whole code segment is:
> #local D=
>   pigment{
>    image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), 
> ".tga")   //group.tga is excellent   1352
>   map_type 2 interpolate 2 once } translate <0, 0,0> scale 1 + clock*2 }
> 
> and I am getting a Parse Error that says: Cannot open TGA image.
> thanks much for any help.
> d
> 
I'd use frame_number instead of clock like this:

  image_map { tga concat("D:\\sketches\\follow",str(frame_number,-4,0),".tga")

Do you have read permission for that folder? If you don't have read permission, 
you can't access the files if the I/O restrictions are active.
You may need to add a line like this to the "pvengine.ini" file from the \ini 
folder:
in the section [Permitted Input Paths]
3=D:\sketches

The number is to follow the last number in that section.

-- 
Alain
-------------------------------------------------
I drive way too fast to worry about cholesterol.


Post a reply to this message

From: Bob Hughes
Subject: Re: string problem
Date: 1 Mar 2008 19:34:03
Message: <47c9f5fb$1@news.povray.org>
"Dennis Miller" <dhm### [at] comcastnet> wrote in message 
news:47c99351$1@news.povray.org...
>I am trying to load a long sequence of TGA files into this image map:
> image_map { tga concat("D:\\sketches\\follow", str(clock*600,-4,0), 
> ".tga")
>
> Can someone see a problem with the string here? I want to read in only the 
> first 600 while the clock moves from 0.1 to 1.
>
> and I am getting a Parse Error that says: Cannot open TGA image.
> thanks much for any help.


You didn't say what version or platform you are using there so this could be 
unrelated.
Giving it a try here POV for Windows 3.6.1c crashed, no error message. I 
have the current 3.7 beta "installed", not simply added to the 3.6 bin 
folder. I can run this (similar script) from the 3.7 beta, no errors. Using 
Vista here.

It has been a very long time since I did any animations using version 3.6 so 
I couldn't say if anything has changed.

I was just wondering about your 0.1 to 1 clock if you want the first half of 
images from 1800 total. Start image number would then be 60 not 0.
-- 
/*bob hughes*/


Post a reply to this message

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