Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
General discussion about the Sega Saturn / Re: Transparent Shading on The Saturn
« Last post by corvusd on August 24, 2018, 12:54:27 am »
Incredibles posts these days XL2!

Well, it's a very creative solution on your part. I think that if you can facilitate the creation of content with this routine, it could be used well, in specific things. For large crystals for example.

With respect to making the transparency work in both VDP1 and VDP2. I still believe that you have to see how Burning Rangers does it. Well I think it's the best solution, using the SS pipeline.

The maximum that I have come to find out is that BR make two "spaces" of drawing are alternated in the VDP1. In first, only the opaque elements with their texture or color are drawn. And in a second the transparent elements and a part of the black opaque elements that cover the transparent elements.

The first space is drawn with a clipping system "total" and the second to half. For example for a final output resolution of 320x240 non-interlaced, with a Clipping System of VDP1 of 319x239. The second space will be 160x120 and then send it to VDP2 to NBG1 at 16bit color and using a Color calculation of this layer over the VDP1. The elements drawn by the VDP1 will look transparent over the VDP1 and VDP2 at the same time.

All for "one" frame. BR have 20FPS peaks stable.

Problems that still exist:

1) The elements of the VDP1 between them do not mix. Could we use VDP1 H-T? Solving the redrawing problems. Using only non-deformed elements in the vertical like: Scaled sprites, Normal Sprites or Distorted sprites like Billboards. Or new tricks like yours XL2.

2) Can we get to render the second space to the total resolution?

3) In Burning Renger the final layer of transparency is on top of everything, including the UI. Could we somehow avoid this problem? For example creating a mask on these parts. Or using a VDP2 layer for the UI.

Objective: Make a total Sun Lens Flare effect that works on VDP1 and 2 and that are 3D elements of VDP1.

A for all! :)
52
General discussion about the Sega Saturn / Re: Transparent Shading on The Saturn
« Last post by XL2 on August 23, 2018, 11:29:58 pm »
Anyway, if anyone is wondering, it's super easy to do (took me like 10 minutes), here is a Jo engine friendly version :


void drawLine(unsigned int no, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, FIXED drawPrty)
{
    SPRITE user_sprite;
    user_sprite.CTRL = 6;
    user_sprite.LINK =0x3000;
    user_sprite.PMOD = (1<<12) | (0<<11) | (1<<10) | (0<<9) | (1<<7)|(1<<6)| (CL32KRGB) | 3;
   
    user_sprite.COLR = (CD_Red);
    user_sprite.XA= x1;
    user_sprite.YA= y1;

    user_sprite.XB= x2;
    user_sprite.YB= y2;

    slSetSprite(&user_sprite, drawPrty);
}

It doesn't mean it's the fastest way (using the VDP2 is faster), but anyway...
The red shape is made of lines, I just went lazy but you could do any shapes you want and even add some shading (maybe just by playing with the color code or by using gouraud shading). The "background" is just sprites, it won't work on a VDP2 layer and will just replace the color in the framebuffer.
You could, I guess, just flicker it on and off or flicker the mesh effect, but then what's the point of the half-transparency?
The only real solution I see is to use line color tables with VDP2 layers, but that requires knowing what's on screen, which isn't easy at all.
53
Project announcement / Re: Sonic Z-Treme
« Last post by XL2 on August 23, 2018, 09:38:10 pm »
I'm using SBL for the audio.
You mean only the left or right speaker is outputting cd audio?

No I mean both channels are being "squished" into the center as if the audio was mono. Also If you are using SBL I think the correct command is:
Code: [Select]
SND_SetCdDaPan(-15, 15);

Seems you were right about the Cdda pan!
It will be fixed in the Sage demo.
Thanks again
54
Project announcement / Re: Sonic Z-Treme
« Last post by XL2 on August 23, 2018, 09:40:11 am »
Yeah, but the solution is to subdivide the map further. The PS1 had that feature in the sdk from day one. The Saturn, as usual, doesn't and can't really do it. I'm trying to find a way to clip textures in vram to subdivide it in 4, but I'm not sure it will work.
55
Project announcement / Re: Sonic Z-Treme
« Last post by ponut64 on August 23, 2018, 09:35:46 am »
Great stuff !

I imagine the fisheye effect might have a small effect on texture warping? If the projection plane is not reduced in size and is merely closer to the camera, the vertices would have a little more space to go off camera before they started injecting you with LSD.
56
Project announcement / Re: Sonic Z-Treme
« Last post by XL2 on August 23, 2018, 02:29:35 am »
The engine does push quite a bit of quads!
Without the LOD, it would destroy performances, but it holds up nicely.
I hope in the future to implement a hidden surface removal, but for now that will do.
Here is the new wireframe mode (hidden in options - Just L+R+Up to active it) plus the pseudo fisheye (the projection plane is closer to the camera, giving a larger FOV and little distortion).
57
General discussion about the Sega Saturn / Re: Transparent Shading on The Saturn
« Last post by XL2 on August 22, 2018, 02:53:12 am »
I guess one "easy" solution to transparency involves the following trick :
-Calculate your 4 vertices. Sgl has a function to do it and return the results (something like slConvert3dto2dfx).
-Get your min x and max x.
-Build an array [max x - min x] containing your min y and max y (so 2 unsigned shorts).
-Doing a bit of interpolation, calculate your min y and max y for each x value.
-If you are feeling on fire, interpolate your gouraud shading too.
-Use MANUAL draw commands (slSetSprite in SGL) and use 2 points lines, with your current x value and min y for point A and your current x and max y for point B. Set your color, select transparency and in your draw priority put your z value (max or center usualy).

Now it won't work correctly with scaled sprites because your minimum width is 8 (but I never tried with zero, it might just work too even if Sega says it doesn't. If it does your points x width should be 1 ).
Your "covered" data in the framebuffer must be in rgb code (16 clut or rgb) else the transparency won't even be processed and you will waste precious cycles.
Like usual, expect slower performances with transparency, so make sure you have no overdraw if you use it.
Cpu wise it shouldn't be too demanding unless you do it for like 20 objects or more.

58
Project announcement / Re: what p64 does
« Last post by ponut64 on August 21, 2018, 04:23:46 pm »
There was never any delay.. it was just the capture device being the garbage it is...  ::)
https://youtu.be/0TOLTnLY5YE
59
Project announcement / what p64 does
« Last post by ponut64 on August 20, 2018, 09:22:52 pm »
So I'll start a thread, I guess, instead of spamming the help forum :)

https://youtu.be/Y3nbalLUi0k

Anyone got clues about delayed audio? Might the B-Bus be saturated, causing a command delay?

If anyone wants to build/look at the code, here it is:
http://www.mediafire.com/file/9d3draeitk98ot0/proj_82018.zip/file

And yes, most of my posts are going to be about problems, as is typical...
60
The Atari 8 bit line also offered the ability of the sprites to be used as an overlay to make real color in high res mode. Even transparency existed before the 16- bit generation ;).
Pages: 1 ... 4 5 [6] 7 8 ... 10
SMF spam blocked by CleanTalk