
-----------------------------------
Schaef
Mon May 03, 2004 1:30 pm

problems using rendered frames from Maya
-----------------------------------
I rendered about 400 frames from Maya into .jpg files and when i run it on turing i get to about line 45 and then it tells me that the picture could not be created..  is this just cuz turing is a piece of crap or am i doing something wrong??  Ive tried using Pic.Free but it doesnt help.

-----------------------------------
Mazer
Mon May 03, 2004 2:03 pm


-----------------------------------
Could you tell us what's happening on line 45? Has it already drawn some of the pictures? If not, they probably weren't created (ie, a bad path name was given when you called Pic.FileNew).

-----------------------------------
Schaef
Mon May 03, 2004 2:05 pm


-----------------------------------
All i am doing is a little 3d text animation.. it's drawn all of the frames up to then but then it just stops working and gives me an error.

-----------------------------------
Delos
Mon May 03, 2004 2:41 pm


-----------------------------------
A little code please?

-----------------------------------
Tony
Mon May 03, 2004 2:58 pm


-----------------------------------
you probably took up the entire memor dedicated to images. You can have a max of 1000 image IDs and I'm not sure on total memory size available. Use

Pic.Free(picID)

to clear the momery after image is no longer needed

-----------------------------------
Schaef
Mon May 03, 2004 5:19 pm


-----------------------------------
i did try it.. read my first post.

-----------------------------------
Mazer
Mon May 03, 2004 5:22 pm


-----------------------------------
Schaef, show us the code that's causing you problems.

-----------------------------------
Schaef
Mon May 03, 2004 5:46 pm


-----------------------------------
var pic:array 1..100 of int

pic(1):=Pic.FileNew("pic1.jpg")
pic(2):=Pic.FileNew("pic2.jpg")
pic(3):=Pic.FileNew("pic3.jpg")
pic(4):=Pic.FileNew("pic4.jpg")
pic(5):=Pic.FileNew("pic5.jpg")
pic(6):=Pic.FileNew("pic6.jpg")
pic(7):=Pic.FileNew("pic7.jpg")
pic(8):=Pic.FileNew("pic8.jpg")
pic(9):=Pic.FileNew("pic9.jpg")
pic(10):=Pic.FileNew("pic10.jpg")
% this continues for a while

for i:1..100
Pic.Draw(pic(i), 0, 0, 0)
Pic.Free(pic(i))
end for

-----------------------------------
Paul
Mon May 03, 2004 5:58 pm


-----------------------------------
um... can't u do this?

var name: string
var pic: array 1..100 of int
for a: 1..100
name:= "pic"+intstr(a)+".jpg"
pic(a):=Pic.FileNew (name)
end for

instead of using 100 pic.FileNew statements?

-----------------------------------
Mazer
Mon May 03, 2004 6:01 pm


-----------------------------------
Schaef, could you give us the exact line of code that gives you the error? From what I see all I could guess is that one of the filenames are wrong or something.

-----------------------------------
Schaef
Mon May 03, 2004 6:04 pm


-----------------------------------
lol thx i didnt know about that b4..

-----------------------------------
Schaef
Mon May 03, 2004 6:08 pm


-----------------------------------
this is what i have

View.Set ("graphics:max;max, nobuttonbar")
var name: string
var a:array 1..100 of int
for b:1..100
name:= "pic"+intstr(b)+".jpg"
a(b):=Pic.FileNew(name)
end for

for i:1..100
Pic.Draw (a(i), 0, 0, 0)
Pic.Free(a(i) )
end for

it gives me the error on the Pic.Draw line..

-----------------------------------
Mazer
Mon May 03, 2004 6:14 pm


-----------------------------------
As I suspected. Make sure the filename is correct (ie, the file is pic1.jpg and not pic01.jpg or pic001.jpg), and make sure the pictures are in the same directory as the turing file.

-----------------------------------
Schaef
Mon May 03, 2004 6:22 pm


-----------------------------------
well when u render frames in maya it automatically adds the numbers to the end of the filename so that cant b the problem.. i think it is somehow running out of memory and i dont know why..

-----------------------------------
Schaef
Mon May 03, 2004 6:23 pm


-----------------------------------
could it have anything to do with the fact that i have the pics set to 1024x768 resolution?

-----------------------------------
Mazer
Mon May 03, 2004 6:26 pm


-----------------------------------
I don't think that would be the problem (unless you have a very old computer and even then I'm not sure), why not do this:


View.Set ("graphics:max;max, nobuttonbar")

for i : 1 .. 100
    Pic.ScreenLoad ("pics" + intstr (i) + ".jpg", 0, 0, 0)
end for

May I also suggest changing the "max;max" in your View.Set line to the actual dimensions of the pictures you plan on drawing? It just looks pretty bad when somebody runs code like that on a computer with a resolution that's different from yours.

-----------------------------------
Schaef
Mon May 03, 2004 6:33 pm


-----------------------------------
well that works but it goes much slower then it did b4 when i did it the other way.

-----------------------------------
Mazer
Mon May 03, 2004 6:38 pm


-----------------------------------
Did it even work before?

-----------------------------------
Schaef
Mon May 03, 2004 6:45 pm


-----------------------------------
ya it got to about frame 45 then stopped

-----------------------------------
Mazer
Mon May 03, 2004 6:50 pm


-----------------------------------
What happened at frame 45 then? What's the difference between the files for frame 44 and frame 45?

-----------------------------------
Schaef
Mon May 03, 2004 6:59 pm


-----------------------------------
nothing, thats the problem and thats y i thought it had somethin to do with running out of memory, but your way works it just goes slower

-----------------------------------
Schaef
Mon May 03, 2004 7:05 pm


-----------------------------------
its just an intro screen thingy and it goes so slow right now.. can we incorporate Pic.Free into your code to make it go any faster?

-----------------------------------
Mazer
Tue May 04, 2004 5:01 am


-----------------------------------
Well, if you can't allocate more than 45 pics on your computer to make it play faster, then Pic.Free won't help that much. The whole idea of Pic.ScreenLoad was to load the image and draw it to the screen without using a Pic.FileNew (actually, I think it works by calling Pic.FileNew, then Pic.Draw, and then Pic.Free right away). Maybe if you re-rendered and used fewer frames. That is, skip every third frame or so if you can.

-----------------------------------
guruguru
Fri May 07, 2004 9:24 pm


-----------------------------------
Your problem is what Tony (I think) stated. You have a limit on theamount of memory allocated to pictures. At the beggining, you make 100 pictures! This immediately fills up the memory allocation and by the 45th picture it is full and hence the picture can not be created because there is nowhere to store it! You must create the picture, draw it, then immedatly delete it. Correct me if I'm wrong  :wink: !


View.Set ("graphics:max;max, nobuttonbar") 
var name: string 
var pictures :array 1..100 of int 

for i : 1 .. 100 
    name := "pic" + intstr(i) + ".jpg")
    picture(i) := Pic.FileNew(name)
    Pic.Draw (picture(i), 0, 0, 0) 
    Pic.Free(picture(i) ) 
end for

