Page 1 of 1
Proposed Addition: A vector/matrix math library.
Posted: Fri Mar 18, 2005 2:41 am
by ooPo
Since people tend to get a bit miffed when stuff is added to ps2sdk without discussion, here it is. :)
I want to add a simple, example math library which does your basic 3d functions. Create a few vectors, multiply a matrix, etc. Basically what I already have at
http://www.oopo.net/consoledev/files/math3d-1.0.0.tgz. The main idea though is to have it running in vu0 macro code.
Before people start saying stuff like this needs to be in a separate library I'd like to also ask what people would like to see ps2sdk become. Personally, I view it as the starting point of getting into ps2dev and should be filled with example code and libraries that are enough to teach you the basics. Things like the typical 'hello world' program are covered, but what about putting a simple primitive on the screen, or dipping your toe into vu coding?
I think a math library like this is a great way to introduce vu coding to someone who is already familiar with basic 3d concepts.
Posted: Fri Mar 18, 2005 3:42 am
by modman
ooPo:
sounds like a great addition to me.
this might be bringing the subject matter a bit off topic but i think anyone jumping into 3D code without understanding the math first is in for an uphill battle... if anyone out there is looking for a primer:
http://www.flipcode.com/articles/index.shtml
i'd say start here:
http://www.flipcode.com/articles/gprimer1_issue10.shtml
having the 3d library around will definitely help those not willing to write all of the functions themselves
I'd like to also ask what people would like to see ps2sdk become.
well i'd have to say that including more utils in the sdk would be helpfull... and more examples are always welcome... other than that GREAT JOB! :)
Posted: Sun Mar 20, 2005 3:23 am
by Shazz
Eh eh I think, again, it's a worth & good addition :D
Some VU0/COP2 mathematicals functions and 3D operations (matrix, vectors, normalization,...) are already available in different projects, PbDemoLib from emoon is a first choice repository :D.
So before macrocoding, maybe gathering things could be a good start too ?
By the way, a friend is working on a similar project...so we will have plenty of things to aggregate :D
Posted: Sun Mar 20, 2005 6:57 pm
by ooPo
Added. Will convert to vu macro code later. Someone should test PAL support in the sample program.
Enjoy!
Posted: Sun Mar 20, 2005 7:24 pm
by Shazz
Hum very nice to have added this sample which uses you dma+graph+math3D lib in one piece :D
I'll test it on my PAL ps2 and I'll give you feedback :D
Simple [organization] question, wouldn't it be better to :
- put this sample into the /samples ?
- put this kind of mathmetical lib (math3D) into some /ee/maths/3D to be able then to add other kind of math lib (Cephes,...) ?
Just asking....
Posted: Sun Mar 20, 2005 7:32 pm
by ooPo
The sample is in $PS2SDK/samples/math3d, after you compile and install ps2sdk.
As for /ee/maths/etc... there is such a thing as too much abstration. :)
Posted: Mon Mar 21, 2005 2:56 am
by J.F.
What? No /ee/math/3d/rotational/clockwise/29degrees/ directory? :)
Posted: Mon Mar 21, 2005 4:12 am
by Shazz
puf puf :D
You don't know what you miss J.F, I've got a really impressive so-few-cycles PI/3 rad anticlockwise routine for unlimited vertices using in the same time the 2 VUs and believe it or not, using the IPU to approximate PI/3 ....
But I won't give it to you ! :P
Posted: Mon Mar 21, 2005 12:40 pm
by J.F.
WAHHHHHH!!!!
:)
I agree that you can go too far when dividing up code. It's fine the way it's handled now.
Posted: Mon Mar 21, 2005 2:40 pm
by ooPo
Any word on testing PAL? I've compiled it up for various formats and put them up on my site just in case people are lazy. :)
http://www.oopo.net/consoledev/files/math3d-demo.tgz
Posted: Mon Mar 21, 2005 3:49 pm
by weltall
for me the ntsc and pal version look ok
Posted: Mon Mar 21, 2005 3:53 pm
by ooPo
w00t