Author Topic: Transparent Shading on The Saturn  (Read 823 times)

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Transparent Shading on The Saturn
« on: August 13, 2018, 02:48:59 am »
I've made a demonstration of circular transparent shading by not using perspective distortion, and instead, use affine transformation and it looks fine: Now, would the shadow be corrupted by having overdraw if I skewed it, in other words, kept the coordinates parallel with each other?
« Last Edit: August 14, 2018, 12:26:59 am by 20EnderDude20 »

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Circular Transparent Shading on The Saturn
« Reply #1 on: August 13, 2018, 08:47:01 pm »
Okay, so there is a solution to the perspective distortion with rectangular shadows. What you do is that you make a 16-frame animation of a square moving two points together. You would then use the palette swap trick to compress it to one texture, and you would use affine transformations for the rest. Observe: .

corvusd

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +8/-0
    • View Profile
    • Personal Web Portfolio
Re: Circular Transparent Shading on The Saturn
« Reply #2 on: August 13, 2018, 10:57:01 pm »
Very good ideas! Are you think about How make the change of shape when the camera rotate above the shadow?
David Gámiz Jiménez

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #3 on: August 13, 2018, 11:02:49 pm »
Yes. The frame number of the texture depends on the view that you're looking at it from. Since it's 16 frames long, it should change about every 5 degrees within 90 degrees. When it's 0, it should be at the frame with the triangle, if it's 90, it's square. If you go above 90 degrees, you flip the texture, and the same applies there. I'm not a coder, but I can animate in Flash, so I might ask XL2 to implement a system like this, if he has time  ;). Here is a much more impressive-looking gif:
« Last Edit: August 14, 2018, 12:31:50 am by 20EnderDude20 »

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #4 on: August 15, 2018, 11:06:16 pm »
Wait, if the ps1 used affine texture mapping for everything 3d, and if the shadow looks the same even with the warping, why didn't any developers program shadow polygons to turn off perspective correction (calculating q value, tessellation, etc.) on the Saturn?
« Last Edit: August 16, 2018, 12:44:40 am by 20EnderDude20 »

ponut64

  • Full Member
  • ***
  • Posts: 175
  • Karma: +13/-0
    • View Profile
Re: Transparent Shading on The Saturn
« Reply #5 on: August 16, 2018, 01:26:48 am »
There are a few possibilities.

- They did not conceptualize the shadows as polygons, whether or not they actually were.

- Development for the system never got to the point where such a thing was conceived (remember, it was premier on the market for far less time than the PS1 and N64)

- Developers of the period hadn't a grasp of perspective correction well enough to understand that any method short of absolutely correct perspective correction has its applications compared to other methods. In other words, the Saturn doesn't have to use affine texture mapping, and the PS1 is worse for it, so the thought would be counter-intuitive.

- Developers were concerned with contextual overdraw, wherein interrupting the Saturn's perspective correction meant a part of the entire polygon pipeline, which could have drastic effects on the numbers of polygon's rendered if anything went wrong. (Most critically, because the texture warping on the Saturn is more or less because non-visible vertices are no longer calculated)

- Most likely, some developers of the time actually did do this, and we just don't know.

corvusd

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +8/-0
    • View Profile
    • Personal Web Portfolio
Re: Transparent Shading on The Saturn
« Reply #6 on: August 16, 2018, 09:55:04 am »
To understand the problem of transparencies and the redrawing in SS. We have to dig deeper into our technical knowledge of the SS graphic pipeline.

Tessellate a Quad will not help in reducing overdraw or redrawing of pixels in the H-T VDP1.

In addition to using the VDP1 H-T (No Gouraud + H-T) has other problems added:
- If the quad is very deformed it will take up to 6 (According to documentation) drawing cycles.
- Ideally if It do not redraw any pixel, up to 2 cycles (This is a speculation on my part, being in essence the same as Gouraud.).
- Restriction of color types to work well within VDP1.
- It will never see the VDP2.
- Simple to program.
- Infinity blend layers.
- 1 Level transparency. 50% blend.

In other hand, if we use the transparency of VDP2 with sprites of the VDP1:
- It will not have redrawing problem.
- It does it in a cycle.
- Restriction of color types to work well within VDP2.
- It will not ever see the VDP1.
- More complicated to program.
- Up to 2 blend layers. 1 real transparency, other MSB Shadow function whit a lot of restrictions. Finally 1 effective transparency layers.
- Up to 32 levels of transparency.
« Last Edit: August 16, 2018, 09:58:32 am by corvusd »
David Gámiz Jiménez

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #7 on: August 16, 2018, 04:01:28 pm »
But a shadow’s just one color, so it shouldn’t matter that much

corvusd

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +8/-0
    • View Profile
    • Personal Web Portfolio
Re: Transparent Shading on The Saturn
« Reply #8 on: August 16, 2018, 04:17:45 pm »
But a shadow’s just one color, so it shouldn’t matter that much

Of course it matters. 1 color or 32,000 colors not is the important. The issue is in how those colors are painted by the VDP1. Think about that deeply a time, you will see how it is not so simple.
David Gámiz Jiménez

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #9 on: August 16, 2018, 04:29:03 pm »
I know, I’ve seen perspective corrected sprites have a kind of moire pattern, but maybe that is a desirable result for some things, like for dust.

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #10 on: August 16, 2018, 05:29:39 pm »
Another thing to do would be to make the shadow out of rows of squares, like the fm towns marty’s “3d” sphere, and let the further sprites be smaller to make a rough resemablance of perspective distortion.
« Last Edit: August 26, 2018, 08:03:06 pm by 20EnderDude20 »

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #11 on: August 16, 2018, 06:09:46 pm »
What if we just ask an sh-2 to make a distorted version of the shadow to be displayed as a sprite with affine transformation?

corvusd

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +8/-0
    • View Profile
    • Personal Web Portfolio
Re: Transparent Shading on The Saturn
« Reply #12 on: August 16, 2018, 07:03:01 pm »
What if we just ask an sh-2 to make a distorted version of the shadow to be displayed as a sprite with affine transformation?

Everything is possible. But are you aware of the programming implications they have? Time, effort and knowledge. Right now we are in an early moment of homebrew for SS. With public official SDKs or Jo-engine all these things that you pose are far away.
David Gámiz Jiménez

20EnderDude20

  • Full Member
  • ***
  • Posts: 115
  • Karma: +6/-0
  • I'm also known as "The Blender Fiddler" on Youtube
    • View Profile
    • Youtube Channel
Re: Transparent Shading on The Saturn
« Reply #13 on: August 16, 2018, 07:30:54 pm »
But now we have more efficient compilers, letting all of these great ideas become more possible, and worth the while, to break the rumor that the SS can't do transparency. ;) Now that we know that transparent shading is possible, let's sit back and wait a couple of weeks for sonic z-treme to be released, to get the movement of hombrews for the saturn. Oh, what a time to be alive!
« Last Edit: August 16, 2018, 08:06:01 pm by 20EnderDude20 »

Jorhlok

  • Newbie
  • *
  • Posts: 13
  • Karma: +3/-0
    • View Profile
Re: Transparent Shading on The Saturn
« Reply #14 on: August 17, 2018, 04:31:49 am »
You mentioned the fm towns marty 3D sphere which gave me an idea but then I looked it up on youtube and it was nothing like my idea.

The idea is to use a normal VDP2 layer with small premade tiles and a CPU can decide how to composite the tiles to recreate what looks like any shadows.


The VDP1 draws arbitrary lines from the left line to the right using a greedy algorithm which causes pixels to be overdrawn. This avoids PS1-like gaps but causes the moire pattern with transparency. The other thing that causes the moire pattern was demonstrated well in one of Jon Burton's Sonic R videos. So unless each line is perfectly vertical or horizontal it'll overdraw causing transparency to be bollocks. This applies to skewed and rotated quads, not just perspective corrected quads.


One of the things you might have heard is that CRTs and composite video blurs the dithering enough to be a convincing shadow just drawing a dithered black oval over the ground. I didn't understand just how effective this was until I saw this composite capture of Z-treme on youtube: https://youtu.be/x7cW9wgIW00?t=50
Anyways you can tell how, back in the day, a team on a deadline scraping for ounces of power on a not quite adequate for 3D system would just draw an oval and be done with it.

I think one of the major issues with performance is that we're using an incredibly old jack-of-all-trades graphics library instead of tightly focused custom routines. Unlike a more straightforward graphics system, the saturn's really hard to write efficient graphic routines or even wrap your head around especially the memory scheduling. If two chips try to access the same memory chip in the same cycle, one of them will be halted until it gets access. This can basically throw away many cycles of work the saturn would otherwise be able to accomplish.

Anyways we got some interesting ideas floating around.

 

Sitemap 1 2 3 4 5 6 7 8 9 10 
SMF spam blocked by CleanTalk