Page 1 of 2

Project Scarlet - My very own 3D engine for the PSX

Posted: January 28th, 2018, 10:16 pm
by LameGuy64
In the past year or so, I've been working on a 3D game engine made specifically for the PlayStation named Project Scarlet which I plan to use for a 3D platformer game soon but I intend to make the engine work with different game genres as I plan to release it as open source once I find it to be ready for others to use.

The engine currently features some MIPS assembly routines for custom subdivision of flat and textured quads and a custom model renderer with its own custom file format. The main world renderer however is mostly written in C and lacks occlusion optimizations which has yet to be implemented as well as subdivision of other polygon types such as triangles and shaded polygons.

I have a couple of screenshots of what I've made so far right here. The ones captured from an emulator demonstrate the object placement feature of the engine while the one captured from hardware is a 3D platformer prototype which I will do a video of soon.

As far as I'm aware, this is probably the most notable 3D homebrew game project known so far.

Image

Image

Image

Image

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: January 29th, 2018, 2:01 am
by Shadow
How's the collision stuff coming along? :)

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 2nd, 2018, 12:49 am
by LameGuy64
Here's a demo video of the engine in action as a 3D platformer prototype.
[BBvideo=560,315]https://www.youtube.com/watch?v=b1Esb8xIVQ0[/BBvideo]

I still have lots to do with the engine such as model animations and implementing the occlusion culling mechanism among other things.

I'm kinda shocked nobody seems to have bat an eye about this project. I guess 3D in homebrew is super trivial these days but how many full 3D homebrew games are out there? None as far as I'm aware.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 2nd, 2018, 1:47 am
by Shadow
Damn... absolutely jaw-dropping! We got to get this pressed on CD's and marketed :)
It beats the crap out of Bubsy 3D, and YOU made it. ONE guy!!

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 2nd, 2018, 6:32 am
by Xavi92
Sorry for not saying anything, but I've had quite busy days.

Tremendous work! :praise Are you planning to share its source code so other people can create their own 3D homebrew game with less effort?

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 2nd, 2018, 7:57 am
by Shendo
Impressive work LameGuy. You probably already know about this but if not it might be useful.
The Playstation had this oddball 512×240 video mode that everyone else ignored, it wasn’t standard (320×240) and ate up video memory others wanted for textures. But it looked SHARP and we found the machine was really good at rendering shaded, but un-textured, triangles. In fact, just as fast in the 512 mode as 320. Jason pointed out — he’s always been the master of seeing the intersection between art and tech — that since polygons on 3D characters our size were just a few pixels, shaded characters actually looked better than textured ones. So we went with more polys on the characters, less texture. This was a highly usual approach, but had lots of advantages. The characters popped, like cartoons are supposed to, we had lots more polygons to work with, and it worked around the Playstation’s lack of texture correction or polygon clipping.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 2nd, 2018, 8:17 am
by NITROYUASH
Quake 2 PS1 Port is also using 512x240
Are you planning to share its source code so other people can create their own 3D homebrew game with less effort?
I'm interested too ;)

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 5th, 2018, 12:00 pm
by LameGuy64
Xavi92 wrote: February 2nd, 2018, 6:32 am Are you planning to share its source code so other people can create their own 3D homebrew game with less effort?
I'm planning to open source this engine once it is ready for others to use. Right now, the engine is still a bit in a messy state and releasing it in this state would be a bit embarrassing and infuriating to those not completely familiar with the engine.
Shendo wrote: February 2nd, 2018, 7:57 am You probably already know about this but if not it might be useful.
I'm already aware of the 512x240 mode of the PSX. I also know about the 384x240 mode which is even more obscure and works great as a widescreen mode. My engine should be able to run at any resolution.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 6th, 2018, 12:51 am
by CosmoGuy
Dude, oh my god.
:praise
It's incredible how much did you put into that! Everything is based on Psy-Q or how? Anyway I was thinking since september about such thing, but i couldn't find the time, because of uni and job :/.

I'd love to contribute when you'll release that on github or somewhere.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 6th, 2018, 12:57 am
by Xavi92
That's good to know. :) BTW, I always use 384x240 resolution on my games.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 6th, 2018, 7:00 pm
by Misscelan
Just came here to show my respects :P.
This project looks amazing! It's incredible that a prototype with a decent amount of geometry and that many features already implemented runs as smoothly as this one. Keep up the good work!

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: February 8th, 2018, 1:41 am
by HatMusic
This is crazy amazing! The cell shading and big texture is amazing enough, but a whole engine that could make 3D homebrew a more viable thing for the PSX?
I'm excited to see how this develops, particularly as you mention there's a way to go performance-wise - ~45fps already without occlusion and other planned optimisations is great!

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: March 2nd, 2018, 9:53 am
by pool7
Just saw this; amazing!!!
Keep up the great work!!!

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: March 21st, 2018, 12:25 pm
by LameGuy64
After some time, here are some updates so far.

I just experimented with 3D skyboxes in Project Scarlet and it turned out looking pretty gorgeous! I don't know of any other PlayStation game featuring this style of skybox but what I've made sure has potential in making really nice skyboxes.
Image

I've also made this large flat test map for fleshing out the 3D platformer controls of the test game. This also shows an untextured model of the character you'll be playing as when this project gets further in development. I didn't texture the map as I want to get consistent 60fps as I haven't started working on optimizing my renderer yet.
Image

I also made 2 new tools for Project Scarlet. One is an animation tool for testing and converting per-vertex animation frames. I was originally going to use a skeletal animation system but found it too complicated and possibly more computationally intensive than per-vertex animation. Also, per-vertex allows for more flexibility in animating characters.
Image

The other tool is an SMX equivalent to RSDTOOL more or less but it lacks coloring and texturing the primitives. It currently only supports ordering the primitives for pre-sorting 3D skybox meshes but I plan to add coloring and texturing capabilities into it soon and maybe even support for RSD files in the future.
Image

My next steps in this project is to get 3D model animations working, 3D platforming and renderer optimizations. I also need to write a few more assembler routines for subdividing shaded polygons and figuring out better recursive subdivision algorithms.

Anyway, I really appreciate the compliments you guys have given.
HatMusic wrote: February 8th, 2018, 1:41 am This is crazy amazing! The cell shading and big texture is amazing enough, but a whole engine that could make 3D homebrew a more viable thing for the PSX?
I'm excited to see how this develops, particularly as you mention there's a way to go performance-wise - ~45fps already without occlusion and other planned optimisations is great!
Something like this is certainly a rare breed in the PSX homebrew scene as far as I'm aware. I got the occlusion stuff working well enough which improves performance quite a bit but I still need to rewrite intensive parts of the renderer to MIPS assembly in an attempt to achieve 60fps on simple textured maps.

Yeah, I plan to make this engine usable for others to make 3D homebrew development on the console a bit more viable. Though I may have to make a custom license or something where my engine can be used for free for free homebrew projects but you'll need to donate a sum if you've sold enough copies of your commercial homebrew. Dunno exactly how I'll do it but I'll figure it out once this project reaches usable state and is released for everyone to use.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: March 21st, 2018, 9:43 pm
by NITROYUASH
I love you, man. You have created so much for PS1 ;_;

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: April 3rd, 2018, 8:48 am
by MrQuetch
Wow, I'm really impressed. This is so cool. There is a lot going on here. I'm looking forward to the open source - that is... When you plan on releasing it. I'm sure your source code is completely packed with goodies. :D

Overall, very good job. Keep us posted.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: April 9th, 2018, 8:02 am
by Yagotzirck
That's some commitment over there - well done :clap

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: May 7th, 2018, 12:11 pm
by LameGuy64
After about a month of work, this is what SMXTOOL looks like now:
Image

You can edit pretty much anything in a SMX model file (Scarlet's equivalent to RSD) with this tool except polygon types and lighting settings. You can color flat and gouraud shaded polygons, edit texture coordinates with A ZOOM-ABLE TEXTURE VIEW (anyone who's worked using RSDTOOL will understand), set double-sided (non culling) flag to polygons and blending modes to individual polygons. Blending modes and brightened textures (textures with color values greater than 128) are properly represented in the 3D preview. You can even move the rotation axis of the camera around or switch to a first person style view so you can easily edit level geometry.

The tool also supports loading and saving RSD files and can even be used to convert RSD projects to SMX format by simply saving it as an SMX file and vice versa. Though there really isn't much of a point to keep using the TMD model format once Project Scarlet releases someday as most of the TMD rendering routines included in Sony's SDK doesn't support things like double-sided polygons or differing blending modes on individual polygons even though the file format supposedly supports it.

It also features uploading your SMX model projects (and SMX only) to your console via the serial port for on-hardware preview of your model pretty much like a budget equivalent of the H201A minus the real-time editing of primitives on the console itself. The previewer is still pretty basic for now but I plan to add rendering of models in different shading methods such as cel or environment mapped. Perhaps after I update the SMD format to support quads.

I may release this tool separate from Project Scarlet as this tool can be used to edit RSD project files which will be very useful to those who still work with that format.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: May 7th, 2018, 1:53 pm
by Marble_
Wow! I hardly know what any of that means. But I made an account just to let you know you have my full support! 3D homebrew games are so rare to find these days and you're doing a huge service to homebrewers everywhere by making this open-source. Keep up the great work!

Also, can I have your permission to share this on reddit? You deserve the recognition and I just want to spread the word.

Re: Project Scarlet - My very own 3D engine for the PSX

Posted: May 7th, 2018, 3:27 pm
by LameGuy64
Ah, thanks! Yeah, homebrew for the PSX in general is quite rare these days especially ones that are still in active development. It seems most homebrew devs tend to go for the Dreamcast or older pre 32-bit systems sadly.

Feel free to share this project including the demo video around if you want. I'm curious what folks on reddit have to say about this.