Page 1 of 1

LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: April 30th, 2018, 1:36 am
by Kannagi
Hello,I will talk here mainly about the PSX version.

This lib uses PSXSDK, I have not yet been tested on the real hardware, emulator indicates me between 2000-3200 triangles max (but I have not really optimized the rendered part).

It's an alpha version for the moment, you could not make a game with it.

I think I will do 4 functions for 2D :
-Sprite
-Sprite_Array
-Text
-TileMap

For the 3d, I think to put the animation by skeleton and some optimization like "Viewing frustum culling" and "Contribution culling" (it will be possible to enable/disable).

Screen :
Image

LMP3D Demo:
https://www.youtube.com/watch?v=AEwg1k-KOf4

PSX Demo :
https://www.youtube.com/watch?v=GMi-hJxRsLU
As I mentioned on my last video, I have long had perspective bug using the GTE.

The code works on Windows, Linux, PS1 / PS2,DC.
For each platform I manage the appropriate conversions floating / fixed number, a small idea of what format is optimized for each platform:
PC: floating point number, index
PS1: fixed number, no index
PS2: fixed number, index + submesh
DC: floating point number, index

I create a converter (internal) that converts the images into the appropriate format, here are the recommended formats:
PS1, PS2: PCX
DC: PNG or VQ compressed
PC: PNG

For the PS1, I will advise to use textures of 128x256 in PCX format, it will put about 16 textures, you can put another image in 4bpp (for hud or other).

For 3D format, I use my own format, a converter exists here : https://github.com/Kannagi/BCMConvert
The source code : https://github.com/Kannagi/LMP3D

Thanks for reading me ! :)

Re: LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: April 30th, 2018, 12:18 pm
by Shadow
My gosh that is impressive. Excellent work! Can't wait to see how this progresses :)

Re: LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: May 1st, 2018, 3:56 am
by Kannagi
Thank you, but it will be a bit long, I have a lot of details to finish.
I hope to finish a stable version soon enough! ;)

Re: LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: May 1st, 2018, 10:25 pm
by Xavi92
You already know my opinion about this. You are awesome!!

Re: LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: May 13th, 2018, 4:39 am
by Kannagi
Thank you, I hope you will be a user of my new lib ;)

Well, I have news since :)

I finally add my 2D functions, do 4 times the same code in a slightly different way is a bit painful.
This results in:
Image

It took me a lot of time because I wanted to manage the 8bpp / 4bpp for each platform.
The Dreamcast is quite limited on this point, it only manages 1024 levels of color palette (say that the compression is not really at this level).
On PC 8bpp converted to RGBA (but if you use effects on the palette it will not work on PC ah ah xD).

I add the Backface culling on PS1, PC and Dreamcast.
On Dreamcast, there is no cross product in hardware, I made 2 inner products + subtraction :p

I hope to quickly finish the management of the Camera.
The 'Viewing frustum culling' will be easy to do, I already have my 3D box.

I have not updated for Github yet,I think I will compile the library for each platform, I will update the source code later.
So I think I'm close to a stable version, when it will be the case will remain that the Skeletal animation ^^

I made a video :
https://youtu.be/yobIrC6U320

Re: LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: September 23rd, 2018, 10:29 pm
by Kannagi
I was pretty busy, not big news (except that the code is cleaner and consistent), unfortunately I don't intend to advance the PS1 version because doing 3D on it is quite painful (matrix3x3, no Zbuffer, fixed point etc etc).

But if one of you has a little knowledge of 3D and uses PSXSDK then I would be happy to see you as a future contributor;)

This will allow me to focus on the Gamecube / Wii version ^^

Re: LMP3D 3D Library for Dreamcast, PS2, PS1

Posted: September 25th, 2018, 12:26 pm
by LameGuy64
I have a lot of experience regarding 3D graphics programming on the PS1 but I only work with the Programmers Tool/PsyQ SDK which I think you'd be too squeamish to use in your project. I've been occasionally tinkering with writing my own SDK based on GCC that has support for calling console BIOS functions and even wrote my own ELF to PS-EXE converter that doesn't suck (because PSXSDK's elf2exe never works for me) but I've been busy with other things.