TMD model viewer example

Programming examples for the Psy-Q SDK
Post Reply
User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

TMD model viewer example

Post by LameGuy64 » August 9th, 2014, 1:52 pm

Yet another impressive but very readable 3D graphics example from me 8-)... It uses libgs functions to draw TMD models at high speed complete with light source calculation (the light source is displayed as a light bulb).

Image
Image

Here's a tutorial on how to make your own TMD models for your projects:
viewtopic.php?f=51&t=658#p5026
You do not have the required permissions to view the files attached to this post.
Last edited by LameGuy64 on October 6th, 2014, 12:19 am, edited 3 times in total.
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.

tlrmcknz
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: February 18th, 2014, 3:15 am

Re: TMD model viewer example

Post by tlrmcknz » August 9th, 2014, 2:29 pm

Me likey.

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2258
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: TMD model viewer example

Post by Shadow » August 9th, 2014, 5:17 pm

Very impressive. I'll give it a go and see what I can do with it ;)
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: TMD model viewer example

Post by Shendo » August 12th, 2014, 1:28 am

Awesome, as usual :)
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

HatMusic
Curious PSXDEV User
Curious PSXDEV User
Posts: 13
Joined: May 29th, 2014, 8:23 am

Re: TMD model viewer example

Post by HatMusic » August 15th, 2014, 7:26 am

Holy cow! This is amazing!
I imagine this took a very long time, too.
And 60fps as well - on a ps1!
Very nice.
(I really like the smooth camera aswell)

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: TMD model viewer example

Post by LameGuy64 » August 16th, 2014, 12:16 am

I'm kinda surprised that you didn't notice that this example actually runs in hi-res 640x480 mode as well :lol:.

But anyway, I'm glad you like it! Actually, this didn't took me a lot of time to make as I spent like 3-4 days on this I believe.
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.

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2258
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: TMD model viewer example

Post by Shadow » August 16th, 2014, 1:54 am

I noticed it ran at 640x480, and actually, I was shocked. It ran very smooth (then again, there is hardly any load on the GPU). Try adding more objects and see how many it can handle before the FPS begin to drop ;)
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

HatMusic
Curious PSXDEV User
Curious PSXDEV User
Posts: 13
Joined: May 29th, 2014, 8:23 am

Re: TMD model viewer example

Post by HatMusic » August 17th, 2014, 4:35 am

You're right - I can't believe I didn't notice, but then again I did only test it on an emulator
This has amazing potential and I must say I would like to see how much of this the ps1 could handle :D

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: TMD model viewer example

Post by LameGuy64 » September 24th, 2014, 1:21 am

Toon-shaded ponies anyone?
ImageImage
Even though the PlayStation lacked a Z-buffer which is essential for proper outline rendering, I was able to pull this off through some Ordering Table trickery... I'll release the source code of this once I'm done cleaning it up which won't take so long. Same goes for that TMD tutorial that I somehow forgot to make.
You do not have the required permissions to view the files attached to this post.
Last edited by LameGuy64 on December 12th, 2017, 12:04 am, edited 1 time in total.
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.

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2258
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: TMD model viewer example

Post by Shadow » September 24th, 2014, 2:04 am

Nice! It reminds me of Parappa the Rappa :)
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: TMD model viewer example

Post by LameGuy64 » September 29th, 2014, 9:48 pm

Added an experimental pseudo toon-shaded model example.
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.

User avatar
gwald
1997 Yaroze Enthusiast
1997 Yaroze Enthusiast
Posts: 256
Joined: September 18th, 2013, 8:44 am
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Location: Australia
Contact:

Re: TMD model viewer example

Post by gwald » July 5th, 2016, 6:34 pm

LameGuy64 wrote:Yet another impressive but very readable 3D graphics example from me 8-)... It uses libgs functions to draw TMD models at high speed complete with light source calculation (the light source is displayed as a light bulb).[/url]
Nice viewer..
I don't think libgs is optimised to draw "at high speed" tho.

RetroProgramming
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: November 13th, 2017, 11:04 am

Re: TMD model viewer example

Post by RetroProgramming » November 13th, 2017, 11:16 am

i have a question:
how i can convert the TMD file to C file?
like MARILYN.C, PLATAFORM.C and BULB.C
please I would greatly appreciate it.

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: TMD model viewer example

Post by LameGuy64 » November 13th, 2017, 11:26 am

Simply use either bin2h or raw2src to convert binary files (such as TMD) to C source and header files.

You can find both of those programs in the download section of this website:
http://www.psxdev.net/downloads.html
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.

User avatar
NITROYUASH
Serious PSXDEV User
Serious PSXDEV User
Posts: 99
Joined: January 7th, 2018, 12:03 am
PlayStation Model: SCPH-5502
Steam: NITROYUASH
Location: Russian Federation
Contact:

Re: TMD model viewer example

Post by NITROYUASH » August 17th, 2018, 11:39 pm

LameGuy64, thank you for TmdTest and QLP file format.

I slightly reworked TMDtest, connect QLP archive (with custom TIM+TMD) and that's what i got:
► Show Spoiler

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2258
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: TMD model viewer example

Post by Shadow » August 18th, 2018, 1:51 pm

NITROYUASH wrote:
August 17th, 2018, 11:39 pm
I slightly reworked TMDtest, connect QLP archive (with custom TIM+TMD) and that's what i got...
Whoa! That is very impressive :)

It would be awesome if you could add the MIME rigging so that he can be animated to move as well as talk ;)
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

User avatar
NITROYUASH
Serious PSXDEV User
Serious PSXDEV User
Posts: 99
Joined: January 7th, 2018, 12:03 am
PlayStation Model: SCPH-5502
Steam: NITROYUASH
Location: Russian Federation
Contact:

Re: TMD model viewer example

Post by NITROYUASH » August 18th, 2018, 6:56 pm

I'll try it, but later. Now i'm learning how to work with 3D :)

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: TMD model viewer example

Post by LameGuy64 » August 19th, 2018, 10:21 am

That actually looks pretty neat! Nice to see that you're picking up on it pretty fast and even learned how to use my QLP data files for easier management of model data.
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest