Computer Science Canada

problems using rendered frames from Maya

Author:  Schaef [ Mon May 03, 2004 1:30 pm ]
Post subject:  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.

Author:  Mazer [ Mon May 03, 2004 2:03 pm ]
Post subject: 

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).

Author:  Schaef [ Mon May 03, 2004 2:05 pm ]
Post subject: 

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.

Author:  Delos [ Mon May 03, 2004 2:41 pm ]
Post subject: 

A little code please?

Author:  Tony [ Mon May 03, 2004 2:58 pm ]
Post subject: 

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
code:

Pic.Free(picID)

to clear the momery after image is no longer needed

Author:  Schaef [ Mon May 03, 2004 5:19 pm ]
Post subject: 

i did try it.. read my first post.

Author:  Mazer [ Mon May 03, 2004 5:22 pm ]
Post subject: 

Schaef, show us the code that's causing you problems.

Author:  Schaef [ Mon May 03, 2004 5:46 pm ]
Post subject: 

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

Author:  Paul [ Mon May 03, 2004 5:58 pm ]
Post subject: 

um... can't u do this?
code:

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?

Author:  Mazer [ Mon May 03, 2004 6:01 pm ]
Post subject: 

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.

Author:  Schaef [ Mon May 03, 2004 6:04 pm ]
Post subject: 

lol thx i didnt know about that b4..

Author:  Schaef [ Mon May 03, 2004 6:08 pm ]
Post subject: 

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..

Author:  Mazer [ Mon May 03, 2004 6:14 pm ]
Post subject: 

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.

Author:  Schaef [ Mon May 03, 2004 6:22 pm ]
Post subject: 

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..

Author:  Schaef [ Mon May 03, 2004 6:23 pm ]
Post subject: 

could it have anything to do with the fact that i have the pics set to 1024x768 resolution?

Author:  Mazer [ Mon May 03, 2004 6:26 pm ]
Post subject: 

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:

code:

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.

Author:  Schaef [ Mon May 03, 2004 6:33 pm ]
Post subject: 

well that works but it goes much slower then it did b4 when i did it the other way.

Author:  Mazer [ Mon May 03, 2004 6:38 pm ]
Post subject: 

Did it even work before?

Author:  Schaef [ Mon May 03, 2004 6:45 pm ]
Post subject: 

ya it got to about frame 45 then stopped

Author:  Mazer [ Mon May 03, 2004 6:50 pm ]
Post subject: 

What happened at frame 45 then? What's the difference between the files for frame 44 and frame 45?

Author:  Schaef [ Mon May 03, 2004 6:59 pm ]
Post subject: 

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

Author:  Schaef [ Mon May 03, 2004 7:05 pm ]
Post subject: 

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?

Author:  Mazer [ Tue May 04, 2004 5:01 am ]
Post subject: 

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.

Author:  guruguru [ Fri May 07, 2004 9:24 pm ]
Post subject: 

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 !

code:

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


: