forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What's this? Graphics in the ps2sdk?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Jun 16, 2005 2:34 pm    Post subject: What's this? Graphics in the ps2sdk? Reply with quote

Some of you may have taken a look at the stuff I've been adding to ps2sdk lately. Some of you may have been too unsure of what it all does and have avoided it. So, here's a link to a quick document on how to use it:

http://www.oopo.net/consoledev/files/ps2sdk-using-libdraw.txt

Quote:
// So, you want to do your own 3D programs on the PS2. As you may already know,
// there isn't a lot of help out there to learn from. You may stumble through
// countless old documents from the demo scene days where most of the info was
// on how to write your own rasterizer instead of the math. Or you may run into
// countless opengl and directx articles that really don't teach you much other
// than 'use this function'.
//
// I've written this very simple, and compileable, document that may be able to
// shed some light on the subject. I've also created a few libraries in ps2sdk
// to make this a process that you can take on at your own pace. As you figure
// out how this program works, you can take a look at the libdraw source. From
// there, you can take a look at libgraph and libmath3d. If you're feeling spicy,
// libdma and libpacket await you. Its not that complicated when compared to the
// pc you're used to... its just different.

This new 'draw' library is designed to be an easy stepping stone into a subject that can be a little complex to tackle all at once.

If you remain unconvinced, or just plain lazy, here's a link to precompiled versions of the samples:

http://www.oopo.net/consoledev/files/samples-20050615.tgz

(the lighting sample with the teapot is my favorite)

They should handle NTSC/PAL autodetection and possibly even 4:3/16:9 autodetection assuming that the OSD functions are broken only on the pstwo I'm using to code on lately.

Be advised the API may wiggle a little before it settles.
Back to top
View user's profile Send private message Visit poster's website
wulf



Joined: 13 Apr 2005
Posts: 81

PostPosted: Thu Jun 16, 2005 2:44 pm    Post subject: Reply with quote

You are the man, oopo!
Back to top
View user's profile Send private message
Steve F



Joined: 27 Apr 2005
Posts: 75
Location: Texas USA

PostPosted: Fri Jun 17, 2005 5:20 am    Post subject: Reply with quote

Nice work!

I was a little confused by the term 'points'. I think of a point as the same as a vertex. In this case it is an index into the vertices array that describes the three vertices that make up a triangle.

A triangle is defined by vertices. A Vertex is defined by vectors on n axis. Usage of the term Points is misleading?

And a polygon's shape is defined by vertices. Is a point a polygon with zero sides (technically)?

In that case I should redefine; a triangle is defined by 3 points. A Point is defined by a vertex. A vertex is defined by vectors on n axis.

I'm going to have to rethink how I've been naming things.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Jun 17, 2005 5:29 am    Post subject: Reply with quote

Don't take my naming of things as perfect. I'm still kinda learning this myself.
Back to top
View user's profile Send private message Visit poster's website
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Sat Jun 18, 2005 4:58 am    Post subject: Reply with quote

Unrelated tangent posts about ODE split Here

On topic:
Great work oopo. :)
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Jun 28, 2005 2:13 pm    Post subject: Reply with quote

Just for fun, here's some screendumps of the graphics samples in ps2sdk currently:


$PS2SDK/samples/cube
Your basic spinning cube teaches basic 3D math skills and concepts.


$PS2SDK/samples/teapot
The classic teapot model shows you how to perform lighting and shading.


$PS2SDK/samples/texture
A spinning cube with a perspective-correct texture applied teaches texturing.
Back to top
View user's profile Send private message Visit poster's website
snowdog



Joined: 15 Jun 2005
Posts: 5

PostPosted: Wed Jun 29, 2005 8:52 pm    Post subject: Reply with quote

Cool, cheers for this. But just one question...any idea how close using this would be to using the equivalent functions in the Official Sony PS2 SDK..?

If I understand this and can write a demo or two (although this is also assuming I can get through the Unix learning curve after a 10-15 years absence lol) with the unofficiak PS2Dev SDK then would I have much trouble using the Official SDK..?

I'm currently working in the games industry as a QA Technician to get myself a foothold in the industry and would like to end up developing games. Unfortunately the developers across the hall from me are only PC programmers, so can't ask them for any advice.

I've started to mess around with the DirectX SDK with the help of a bloomin great big book and am looking forward to doing the same with the samples you've provided here. Many thanks, any advice anyone can give me would be much appreciated.
_________________
"You can keep all your Bests, Peles and Maradonas, Duncan Edwards was the greatest of them all!" - Tommy Docherty
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group