What 3d animation format can ps2 use?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

What 3d animation format can ps2 use?

Post by Thanhda »

i'm just wondering what file format can ps2 handle for animations. i know of md2c, but it only converts 1 frame to a C struct. is there any that converts all frame, or any other file format.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

Any format that you code a player for.
Kung VU
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

what do you mean? explain please.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

There is no support for ANY animation format. You have to write any such support yourself.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

well, i'm just saying has anyone written anything that is open source, or has manage to create a md2c that converts all frames? right now the only way i see it is by doing it frame per frame, but there must be some easilier way of doing it.
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

Yes someone has created an opensource model loader, infact i'd say quite a few have. Only they're not targeted to ps2.
Thats where ps2dev comes in: to help you port said programs to the console. have a look at http://www.swissquake.ch/chumbalum-soft/hlmv/index.html.
The loading, parsing and math seems pretty standard (assuming it doesn't use any too-fancy c++) the only things that need changing/wrapping are the openGL calls. This thing spits out triangle strips, which the ps2 and some pre-existing graphics libs hangle well.
Hell, for all i know, it might compile out of the box (the loading/display code only.. obviously not the win32/qt application) when linked a ps2 openGL implementation that's floating around.
Have Fun!
Damn, I need a decent signature!
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

sorry but i dont see how this helps? its just a mdl viewer from milkshape. do you know of any sites that people have created animation for the ps2?
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

well you take the source code for said modelviewr, make it ps2 friendly and ...tada! A ps2 loader / viewer that can play animations and not just the 1st frame!
What you are looking for simply does not exist (on ps2) and with open source software its relitavely easy (as compared to starting from scratch) to take whats out there and produce something tailored exactly to your specifiactions.

the link i posted is the most similar non-ps2 opensource project i could find after 5 mins on google / source forge. Perhaps there are other better places to start.
Damn, I need a decent signature!
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

i just dont think it would be as easy as you say it is. because probably someone else would have done it before. also. why did dreamgl create the md2c.c. but thanks for the help anyway, i will definetly keep searching around. i'm just right now trying to find the easiest method posible. or find out if anyone else in this comunity has done this yet.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

Have you investigated RenderWare or any commercial sdk?

RenderWare will render animated models of a variety of formats on
several platforms. I believe you can even download a trial.

I'm sure the people around here would prefer that you added animated
model support to one of the opensource ps2 graphics libs (I vote
Llibplanar).
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

ok fair enough. But the fact thats its not been done (or at least not been made public) doesn't necessarily mean its too dificult. Perhaps nobody has had the need to yet.

I'm not sure why you think it would be so complicated. basically the source i found ends up being
modelfile -> untransformed vertices.
and relies on openGL to get these onto the screen.
the transformation seems to use normal c++ that should work on the ps2, perhaps after some tweaking of datatypes, macros, etc.
After that one of serveral libs from here could be used in openGL's stead, but fudging of interfaces may be required.

Just look at libraries such as mp3 or ogg decoders. They are fairly compilcated (to me anyway) Yet they can be compiled for ps2 with some header tweaking. now with the raw pcm come the platform specific part of producing the sound, which it turns out we already have a library for.
All that needs to be done is glue the two together.
if i can use a gerneral ogg decoder and libresample with sjpcm to make a basic player, it cant't be all that hard (i just dabble for fun) so i don't believe doin the same thing graphically could be that much more of a chore.

That being said i am aware how easy it is for me to sit here saying "it's easy, off you go." Perhaps you've inspired me to put my money where my mouth is and prove myself right. If i can find time between all the shit i have to do, i could slot this in as something i want to do. I hereby make no promises of a timely delivery, or a quality product. :)

Good luck with your search, and remember to keep us all posted when you make any progress!

- cheriff (apologising for a long post!)
Damn, I need a decent signature!
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

rinco wrote:Have you investigated RenderWare or any commercial sdk?

RenderWare will render animated models of a variety of formats on
several platforms. I believe you can even download a trial.

I'm sure the people around here would prefer that you added animated
model support to one of the opensource ps2 graphics libs (I vote
Llibplanar).
hmm, well i'm mainly looking for the easiest way, and also prefer open source. but! if i was to built a model animator for the ps2, i would built it off Dreamtime md2converter.

btw where is this free trial you speak of.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

cheriff wrote:ok fair enough. But the fact thats its not been done (or at least not been made public) doesn't necessarily mean its too dificult. Perhaps nobody has had the need to yet.

I'm not sure why you think it would be so complicated. basically the source i found ends up being
modelfile -> untransformed vertices.
and relies on openGL to get these onto the screen.
the transformation seems to use normal c++ that should work on the ps2, perhaps after some tweaking of datatypes, macros, etc.
After that one of serveral libs from here could be used in openGL's stead, but fudging of interfaces may be required.

Just look at libraries such as mp3 or ogg decoders. They are fairly compilcated (to me anyway) Yet they can be compiled for ps2 with some header tweaking. now with the raw pcm come the platform specific part of producing the sound, which it turns out we already have a library for.
All that needs to be done is glue the two together.
if i can use a gerneral ogg decoder and libresample with sjpcm to make a basic player, it cant't be all that hard (i just dabble for fun) so i don't believe doin the same thing graphically could be that much more of a chore.

That being said i am aware how easy it is for me to sit here saying "it's easy, off you go." Perhaps you've inspired me to put my money where my mouth is and prove myself right. If i can find time between all the shit i have to do, i could slot this in as something i want to do. I hereby make no promises of a timely delivery, or a quality product. :)

Good luck with your search, and remember to keep us all posted when you make any progress!

- cheriff (apologising for a long post!)
well for one, ps2 is C and ASM base. not C++. next, thing the reason i'm sure its not as easy as you say it is, because you got to port all your code to ps2, then base your code off DreamGL, which is limited to the opengl we are use to. on top of that, i would have presume Tony (DreamGL creator) would have thought of this in the first place instead of creating a m2d to C struct converter. i am not much of a ps2 programmer, and dont know that much about how its done, but would image it would be a bit harder then what you say for ps2dev has been out for the last 4 years, and no one has yet to create an opensource animator. and yes i would like to see you build this converter, and i would definetly support you on your way if it can be done. anyway none the less i'm still looking for any other ways of doing animations in the ps2 besides frame per frame.

has anyone create a homebrew ps2 game with animation, not including scene graphs?
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

At some point the team that developed the "Aura for Laura" demo released a Lightwave conversion tool for the scene format they used for their demos. Unfortunately I can't remember the site or the name of the team, but if you Google "Aura for Laura" I'm sure you'll find it.
"He was warned..."
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Whoops! It wasn't Soopadoopa but NoRecess who released the Lightwave scene player: http://norecess.planet-d.net/. Man, that was a long time ago :P.
"He was warned..."
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

mrbrown wrote:Whoops! It wasn't Soopadoopa but NoRecess who released the Lightwave scene player: http://norecess.planet-d.net/. Man, that was a long time ago :P.
i've seen this site before, but i dont know what exactly does it do. can you expand on what can this do.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

If you're unable to read or comprehend English, then I'm afraid you're stuck.
"He was warned..."
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

well for one, ps2 is C and ASM base. not C++.
Although i've never used it, http://forums.ps2dev.org/viewtopic.php?t=778 discusses the fixing of our toolchain with regards to c++ support. So classes and such are good. STL is out, but i don't think the code uses it anyway.
DreamGL, which is limited to the opengl we are use to. on top of that, i would have presume Tony (DreamGL creator) would have thought of this in the first place instead of creating a m2d to C struct converter.
well i would have stubbed out the functionality the dreamGL didn't support, or added wrappers if i could Also blah2c type apps are useful if you don't know where or how your program will run. If you've always got a pc connected then one can load "host:blah" of if you can be sure you're running of a CD then use "cdrom:blah" and likewise for "mc:blah" or "pfs:blah" OR you could inline the data into the elf via these *2c helpers at compile time and have access to the data regardless of which filesystems are available, wich is why i would imagine dreamgl does so.
md2c is in standard c and could easily run on ps2 provided one could know where and how to access the data file every time the elf is executed.

But thats just how i understand it. I've personally never used c++ on ps2, nor dreamGL so take from this what you will. :)

- cheriff
PS: when i get home tonight i will have a play around and come back with hopefully more concrete ramblings!
Damn, I need a decent signature!
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

mrbrown wrote:If you're unable to read or comprehend English, then I'm afraid you're stuck.
i'm just lazy, i'll read it later. but if you could explain, it would be nice.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

cheriff wrote:
well for one, ps2 is C and ASM base. not C++.
Although i've never used it, http://forums.ps2dev.org/viewtopic.php?t=778 discusses the fixing of our toolchain with regards to c++ support. So classes and such are good. STL is out, but i don't think the code uses it anyway.
DreamGL, which is limited to the opengl we are use to. on top of that, i would have presume Tony (DreamGL creator) would have thought of this in the first place instead of creating a m2d to C struct converter.
well i would have stubbed out the functionality the dreamGL didn't support, or added wrappers if i could Also blah2c type apps are useful if you don't know where or how your program will run. If you've always got a pc connected then one can load "host:blah" of if you can be sure you're running of a CD then use "cdrom:blah" and likewise for "mc:blah" or "pfs:blah" OR you could inline the data into the elf via these *2c helpers at compile time and have access to the data regardless of which filesystems are available, wich is why i would imagine dreamgl does so.
md2c is in standard c and could easily run on ps2 provided one could know where and how to access the data file every time the elf is executed.

But thats just how i understand it. I've personally never used c++ on ps2, nor dreamGL so take from this what you will. :)

- cheriff
PS: when i get home tonight i will have a play around and come back with hopefully more concrete ramblings!
well, for now, i will probably look more into details about this converter, i just need to go out tonight and get a lemar sport jump drive to get the ps2menu to load through the mem stick. i have yet to start programming for the ps2, so i will see how hard it really is to do animation.

essentially my plan is to do this. I will take the md2c code, create 2 frames of the model. load it into the dfreak md2 project, and try to create a 2 frame animation loop for the ps2. once that is successfull i will then try to build an algorithm that will load all frames and play all frame in 1 C struct. and then create a controller to control the frames into segments ie. animate(0,30);

but we'll see how it goes tonight.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

I'd wish you good luck, but I'm just lazy.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

neofar is working in this area:

http://www.ps2reality.net/forum/viewtopic.php?t=48156

you should start learning how to use his llibplanar library.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

rinco wrote:neofar is working in this area:

http://www.ps2reality.net/forum/viewtopic.php?t=48156

you should start learning how to use his llibplanar library.
wow thats pretty cool. what is llibplanar? do you know if the src for this md2 player is available?
Post Reply