3D FPS Example
-
Administrator Verified
- Admin / PSXDEV
- Posts: 2689
- Joined: Dec 31, 2012
- I am a: Shadow
- PlayStation Model: H2000/5502
Very cool 3D environment
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.
-
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:
Yeah, TMD is not exactly suitable for rendering large 3D environments so a serious developer would often make their own rendering system. More sophisticated renderers have stuff like mipmaps and geometry LOD as seen in the Spyro games.
The TMD rendering functions are also pretty bloat and have some limitations to them such as limited control in translucency and not much in the way of special effects such as environment mapping.
The TMD rendering functions are also pretty bloat and have some limitations to them such as limited control in translucency and not much in the way of special effects such as environment mapping.
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.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
*oof*make their own rendering system
Okay, sounds hard. Very hard.
- lamb_of_senpai
- Curious PSXDEV User
- Posts: 14
- Joined: Oct 11, 2018
It looks like you've got a fairly rectilinear environment, so why not just extend/refine Lameguy64's original method? It looks like you're already working with tiles, so one thing you could do is write your own Blender script to export just the tile location/orientation, size, and associated texture in your own custom format, then write a set of functions to import, generate the geometry, and display it. There are plenty of "cheats" you could do—for instance you could use only a predetermined set of orientations/sizes stored as bit flags to get the read time up, make your exporter merge large groups of contiguous tiles using the same texture into single large tiles, etc. Of course, this wouldn't give you the kind of detail/variety found in a game like Spyro, but it's a good place to start, and you could of course extend this method to include non-tile meshes.NITROYUASH wrote: ↑November 7th, 2018, 8:00 pm*oof*make their own rendering system
Okay, sounds hard. Very hard.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
UPD:
Thanks to Lameguy and this awesome 3D example, i did something like that.
It looks like I still have a lot of work, but it's working :p
Thanks to Lameguy and this awesome 3D example, i did something like that.
► Show Spoiler
-
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:
You may want to take a look at this example I made a long time ago that demonstrates how to do 3D transformations with the GTE directly using macros. It is much faster than RotTransPersp3() and gives you more control on how the GTE is being utilized.
You'll need to use dmpsx to convert the weird word codes used in the GTE macro headers to the correct cop2 instructions in your PS-EXE or object file. The Programmer's Tool CD 2.2 has a 32-bit version of dmpsx in it. Alternatively, you can replace the .dw <whatever code> directives in the GTE macros into cop2 instructions to eliminate the need to use dmpsx.
You'll need to use dmpsx to convert the weird word codes used in the GTE macro headers to the correct cop2 instructions in your PS-EXE or object file. The Programmer's Tool CD 2.2 has a 32-bit version of dmpsx in it. Alternatively, you can replace the .dw <whatever code> directives in the GTE macros into cop2 instructions to eliminate the need to use dmpsx.
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.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
Sounds great. I will try to work with this code too
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
I have a small question about Blender and PS1 geometry. I don't want to make another theme so I will describe the problem here.
So this is the test-map (Blender):
And this how it's look in PS1 (after Axis Conversion in Blender ( axis_conversion(to_forward='-Z', to_up='-Y').to_4x4() ) with SVECTOR VX VY VZ)
with SVECTOR VX VY -VZ:
Better than nothing, but now my model is mirrored.
UPD:
Fixed. It was a problem with my code (?).
Fix:
So this is the test-map (Blender):
► Show Spoiler
► Show Spoiler
► Show Spoiler
UPD:
Fixed. It was a problem with my code (?).
Code: Select all
nclip = RotAverageNclip4(
&vp[0], &vp[1], &vp[2], &vp[3],
(long *)&obj->x0, (long *)&obj->x1,
(long *)&obj->x3, (long *)&obj->x2,
&p, &OTz, &Flag);
Code: Select all
nclip = RotAverageNclip4(
&vp[3], &vp[2], &vp[1], &vp[0],
(long *)&obj->x0, (long *)&obj->x1,
(long *)&obj->x3, (long *)&obj->x2,
&p, &OTz, &Flag);
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
Hmm... I wonder to know how to fix this lines(?) between quads.
-
gwald Verified
- Net Yaroze Enthusiast
- Posts: 313
- Joined: Sep 18, 2013
- I am a: programmer/DBA
- PlayStation Model: Net Yaroze
- Contact:
I think it's because of the lack of float precision (but I get this even with floats on 3DS ).
The only way I know how to fix it, is to use vector lookups (indices), ie use the same exact vectors that the surrounding faces use.
But it could be the emulator being over precise, try a different render or emulator... try it on hardware and even on a CTR screen, it might not even be noticeable...
The only way I know how to fix it, is to use vector lookups (indices), ie use the same exact vectors that the surrounding faces use.
But it could be the emulator being over precise, try a different render or emulator... try it on hardware and even on a CTR screen, it might not even be noticeable...
-
Administrator Verified
- Admin / PSXDEV
- Posts: 2689
- Joined: Dec 31, 2012
- I am a: Shadow
- PlayStation Model: H2000/5502
It would be from the PCSXR emulator. Use real hardware like gwald said.
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.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
This is not an emulator problem.
Tested on PCSXR, EPSXE, NO$PSX and PS3.
Tested on PCSXR, EPSXE, NO$PSX and PS3.
Examples? :0The only way I know how to fix it, is to use vector lookups (indices), ie use the same exact vectors that the surrounding faces use.
The official way to do that is to fill the holes with degenerated triangles (i.e. rendered as textured lines).
-
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:
The seams happen when there are two connecting polygons (tris and quads) that are subdivided at different levels and the point of the quad that is subdivided does not always line up with the edge of a lesser subdivided or undivided quad.
Usual workarounds according to the PlayStation documents is to sort very thin triangle strips around the edges of a subdivided quad. That's what my custom quad subdivision routines do to hide the seams though the seams will become visible again when transparency is used.
Usual workarounds according to the PlayStation documents is to sort very thin triangle strips around the edges of a subdivided quad. That's what my custom quad subdivision routines do to hide the seams though the seams will become visible again when transparency is used.
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.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
I confirm this. After some tests with division, i managed reduce the seams. Thanks!The seams happen when there are two connecting polygons (tris and quads) that are subdivided at different levels and the point of the quad that is subdivided does not always line up with the edge of a lesser subdivided or undivided quad.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
I have a question about UV for plane(s):
Previously i was using this function:
setUVWH(obj_ft4, U_out, V_out, W_out, H_out);
But this isn't working with POLY_FT3.
Now i want to use this 2 functions:
setUV3(obj_ft3, U0,V0, U1,V1, U2,V2);
setUV4(obj_ft3, U0,V0, U1,V1, U2,V2, U3,V3);
How to set the UV correctly for POLY_FT3 and POLY_FT4 using the UV3/UV4?
Texture Info:
Thanks c:
Previously i was using this function:
setUVWH(obj_ft4, U_out, V_out, W_out, H_out);
► Show Spoiler
Now i want to use this 2 functions:
setUV3(obj_ft3, U0,V0, U1,V1, U2,V2);
setUV4(obj_ft3, U0,V0, U1,V1, U2,V2, U3,V3);
How to set the UV correctly for POLY_FT3 and POLY_FT4 using the UV3/UV4?
Texture Info:
► Show Spoiler
-
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:
setUVWH() just sets all 4 UV coordinates of a quad based on the values you've specified to its arguments. The macro basically does:
Assuming U_out and V_out are basically offsets of the texture image relative to its tpage you'll have to do it like this if you want to use setUV* macros:
Code: Select all
obj_ft4->u0 = U_out;
obj_ft4->v0 = V_out;
obj_ft4->u1 = U_out+W_out;
obj_ft4->v1 = V_out;
obj_ft4->u2 = U_out;
obj_ft4->v2 = V_out+H_out;
obj_ft4->u3 = U_out+W_out;
obj_ft4->v3 = V_out+H_out;
Code: Select all
setUV3(obj_ft3, U_out, V_out, U_out+W_out, V_out, U_out, V_out+H_out);
setUV4(obj_ft4, U_out, V_out, U_out+W_out, V_out, U_out, V_out+H_out, U_out+W_out, V_out+H_out);
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.
-
NITROYUASH Verified
- Extreme PSXDEV User
- Posts: 126
- Joined: Jan 07, 2018
- I am a: Game Designer
- PlayStation Model: SCPH-7502
- Contact:
Almost working. The texture is flipped to the right :D
Quick fix for me:
► Show Spoiler
Code: Select all
setUV3(obj_ft3, U_out+W_out,V_out, U_out+W_out,V_out+H_out, U_out,V_out);
► Show Spoiler
Last edited by NITROYUASH on March 31st, 2019, 1:16 am, edited 1 time in total.
I'm a bit late to the party here, but this is quite impressive LameGuy64!
3D rendering is not an easy task for homebrew developers on the original PlayStation . This is pretty freakin' cool!
3D rendering is not an easy task for homebrew developers on the original PlayStation . This is pretty freakin' cool!
- MihaiGamerXD
- Active PSXDEV User
- Posts: 38
- Joined: Mar 09, 2019
- I am a: Programmer
- PlayStation Model: SCPH-1001
Nice example LameGuy64! But I have one more problem. I want to set the resolution to 640x480, but the screen is glitchy!
How can I fix that?
How can I fix that?
Who is online
Users browsing this forum: No registered users and 1 guest