Simple 3D graphics sample
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
Simple 3D graphics sample
I finally managed to figure out how the 3D graphics system of the PlayStation works and was able to make a nice little sample for you guys to learn from as there hasn't been a good 3D graphics example for a long while.
Unfortunately, this sample only uses flat shaded triangles but I might make another similar sample soon but with texture mapped triangles in a form of a little 3D game engine.
Unfortunately, this sample only uses flat shaded triangles but I might make another similar sample soon but with texture mapped triangles in a form of a little 3D game engine.
You do not have the required permissions to view the files attached to this post.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
-
- What is PSXDEV?
- Posts: 1
- Joined: Apr 07, 2014
I'm looking to start making 3D homebrew PSX games and this really helped. I made a script to export a model from Blender into this same format you're using, with the exception that it doesn't store duplicate vertices and instead contains an array of indices to the shared vertices. I realize the vertex data is stored as shorts, so this actually uses more memory, but it's more organized this way IMHO. http://pastebin.com/suU9DigB
The only modification I really had to make to get it to work this way (aside from changing the mesh name) was to change to
Definitely looking forward to any more progress you make!
The only modification I really had to make to get it to work this way (aside from changing the mesh name) was to change
Code: Select all
RotTransPers(&modelCube_mesh[t]...
Code: Select all
RotTransPers(&modelCube_mesh[modelCube_index[t]]...
- bizarro2011
- Serious PSXDEV User
- Posts: 118
- Joined: Mar 27, 2012
- Location: Brazil
very good, will create a table to write text and numbers.
Good stuff.
Re: the dangling comment about RotMeshPrimS_F3; my reading of the documentation is that the MeshPrimS functions expect a triangle strip — the first three vertices define one triangle, then every subsequent vertex defines one further triangle. You've listed each triangle uniquely — the first three vertices define one triangle, then every subsequent three vertices define one further triangle. So that could be why that didn't work.
Re: the dangling comment about RotMeshPrimS_F3; my reading of the documentation is that the MeshPrimS functions expect a triangle strip — the first three vertices define one triangle, then every subsequent vertex defines one further triangle. You've listed each triangle uniquely — the first three vertices define one triangle, then every subsequent three vertices define one further triangle. So that could be why that didn't work.
-
Shadow Verified
- Admin / PSXDEV
- Posts: 2670
- Joined: Dec 31, 2012
- PlayStation Model: H2000/5502
- Discord: Shadow^PSXDEV
The MAKEFILE would be basically the same as the one in your 'helowrld' example because of its simplistic primary C file, "primdraw.c".
Code: Select all
# -----------------------------------------
# PlayStation 1 Psy-Q Makefile
# -----------------------------------------
all:
del mem.map
del main.sym
del main.exe
del main.cpe
cls
ccpsx -Xo$80010000 primdraw.c -oprimdraw.cpe,primdraw.sym,mem.map
cpe2x primdraw.cpe
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.
PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.
PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.
Who is online
Users browsing this forum: No registered users and 1 guest