Sonic and Sega Retro Message Board: (Sega Saturn homebrew) Sonic Z-Treme - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 5 Pages +
  • ◄ First
  • 3
  • 4
  • 5
    Locked
    Locked Forum

(Sega Saturn homebrew) Sonic Z-Treme Homebrew 3D game for the Saturn

#61 User is offline SubCog 

Posted 04 July 2018 - 12:39 AM

  • Posts: 10
  • Joined: 21-August 14

View PostXL2, on 03 July 2018 - 06:53 PM, said:

Well, the only new thing I had time to add is Sonic's shadow, the rings' sprites, the drill enemy model and some basics analog controls.
I moved to a new house so I really didn't have time to put much work in the game.
I only have some 2 weeks and a half to fix the physics, add back the water animations and entities and maybe - if by some miracle I manage to have enough time for it - some paletted lightning.
So I guess the next showing will be at sage if I make it in time.


Posted Image
This post has been edited by SubCog: 04 July 2018 - 12:39 AM

#62 User is offline Ritz 

Posted 05 July 2018 - 06:27 PM

  • Subhedgehog
  • Posts: 3947
  • Joined: 01-January 06
  • Gender:Not Telling
  • Location:Glimmering Cornhole Zone
  • Wiki edits:2
Since you mentioned paletted lighting, I've always wondered, how do colors work on the Saturn? Hardware specs all say it's 15-bit RGB (32,768 colors), but when it comes to palettes, does that mean you've got 32,768 contiguous indices, or are graphics split up into 256-color banks, sort of like how the Neo Geo handled it? Can you do color cycling with more than 256 colors? Can you do color cycling on textured polygons?
This post has been edited by Ritz: 05 July 2018 - 09:17 PM

#63 User is offline XL2 

Posted 05 July 2018 - 08:43 PM

  • Posts: 21
  • Joined: 01-July 17

View PostRitz, on 05 July 2018 - 06:27 PM, said:

Since you mentioned paletted lighting, I've always wondered, how do colors work on the Saturn? Hardware specs all say it's 15-bit RGB (32,768 colors), but when it comes to palettes, does that mean you're got 32,768 contiguous indices, or are graphics split up into 256-color banks, sort of like how the Neo Geo handled it? Can you do color cycling with more than 256 colors? Can you do color cycling on textured polygons?


You can use either 15 bits colors (VDP1, but you can also use 16 colors lookup table) or use the VDP2 color RAM (4 KB only, so max 2048 colors).
With CRAM, for sprites, you can use 4 bpp or 8 bpp modes.
It also means that the VDP2 is drawing the sprite to the framebuffer instead of the VDP1.
But the only way you can do different transparency ratios (or more than 2) is by using VDP2 CRAM, which also "kills" gouraud shading (VDP1) since it's directly modifying the RGB value when writting to the framebuffer.

Which also means that, thanks to a hardware "bug", you can apply gouraud shading on the palette index and send it to the VDP2 for processing.
So by carefully manipulating your palettes, you can have both transparency and some gouraud shading or even bump mapping.
Like take a RGB with red colors only (LSB on Saturn), each increase will increase your palette index by 1.
So if you are careful to not overflow, you can have gradiants.

I want to use green gouraud to allow flat shading (so no gouraud shading needed, which is faster to render) for quads having 4x the same verticle normals, which means index jumps of 32 values (since green starts at bit 5).
It would also allow me to interpolate the "pseudo-gouraud shading" on the 4 vertices, and it would also modify the palette's adress, allowing me to have access to some 1024 colors vs 256 with red gouraud.

I have seen 2 tech demos using red gouraud - but no game ever did it AFAIK.
I'm not aware of anyone ever trying it with green gouraud, so it might not even work, but in theory I think it should.

Now my huge challenge is to have a CLUT (VDP1 16 colors sprites) for objects close to the screen to allow colored lightning and use CRAM for far away objects to allow transparency and basic shading.
The difference in colors can be quite huge and look "off", so it's not easy.
This post has been edited by XL2: 06 July 2018 - 08:41 AM

#64 User is offline Ritz 

Posted 05 July 2018 - 09:31 PM

  • Subhedgehog
  • Posts: 3947
  • Joined: 01-January 06
  • Gender:Not Telling
  • Location:Glimmering Cornhole Zone
  • Wiki edits:2
That sounds insane, and it's exactly the sort of application that makes me so enthusiastic about indexed color- really want to see you pull that off. And thanks for the explanation!

#65 User is offline SubCog 

Posted Yesterday, 01:40 PM

  • Posts: 10
  • Joined: 21-August 14

View PostRitz, on 05 July 2018 - 09:31 PM, said:

That sounds insane, and it's exactly the sort of application that makes me so enthusiastic about indexed color- really want to see you pull that off. And thanks for the explanation!

Honestly I have no idea what any of that means, but I can't wait to see it in action!

  • 5 Pages +
  • ◄ First
  • 3
  • 4
  • 5
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users