| Home | Forums | What's new | Resources | |
| Reading from the framebuffer? |
| XL2 - Aug 23, 2018 |
| Prev | 1 | 2 | 3 | 4 | Next |
| XL2 | Dec 7, 2018 | |||
| Tested on real hardware and it works fine! The framerate is mostly at 30 FPS, but it slows down more often to 20 than before (some optimizations would help improve that). On a side note, could anyone give me a hand transforming some SGL functions? It would be faster that using my own code since I could just use the whole SGL pipeline. I just need to scale at screen space (again, x * 0.454545 and y * 0.5) after the transformation. I know almost nothing about assembly atm, so could anyone point me where to look at? Thanks! Code:
| ||||
| XL2 | Dec 20, 2018 | ||
| (very) Slowly getting everything together. On a side note, gouraud shading on the Saturn simply looks amazing, even with OpenGL's default gouraud shading settings you can't replicate such amazing lighting. I ditched the color bank sprites for RGB sprites only to allow better lighting. I think it's worth it as long as I can keep up the draw distance. While I still have a ton of things to do on the engine, hopefully next year I'll be able to add dynamic lighting. Here are some shots in SSF. | |||
| David Gámiz Jiménez | Dec 21, 2018 | ||
| Seriously XL2. You are amazing. Little by little, you are getting very far away! Congratulations!! Again XD With respect to penalize drawing distance. You know what will happen, it is expensive to calculate. But you also know, that you have room to optimize. Just like you can apply a LOD by distance, for vertices and textures. You can scale the lighting detail by distances. From Gouraud with four vertices to a flat face. That affects several local lights to only one or only pre-calculated light. Finally for geometry in the far-clipping directly without shading, since with so few pixels hardly notice the effect. Adding up everything, you can compensate to have that magnificent light closer to the camera. We already know, that all this will depend on your implementation of BSP or similar that you finally do. And that is a lot of work. Even, really, I do not know where SGL (closed) will let you do all this, to be able to optimize even more. It is clear that your creativity has no limit! Cheer up! For anything you know that you can count, humbly, with my help. Regards! PD: It is difficult see in the screenshots. Is possible the Local Light are sum to main Paralell Light source in Sonic model? | |||
| XL2 | Dec 21, 2018 | |||||
About possible slowdowns, I meant mainly with the gouraud shading adding something like 20 or 25% rendering time, which is quite a lot. About the CPU, it can always be optimized, so I'm not too worried. I will try to use the current octree implementation and add a PVS to it. It should work as I can already build the BSP tree on the computer (I use it for lighting), so I just need to raycast to find visible nodes/leaves. But that raycasting will be slow, so I might need to speed it up. It won't eliminate overdraw, but it should reduce it quite a bit, even if it's useless to solve the problem with VDP2 transparent sprites. That octree/pvs system won't be as efficient as a BSP/portal system obviously, but it's simplier for now to reuse what I have and it will work with Z-Treme's maps, so I can quickly test. About the light on Sonic, it's just a "demo" light that turns around, I haven't implemented local lights on the Saturn side (only while converting on PC). For the dynamic lighting, I will probably just use it on the high quality model, not on the low quality model. I want to try something like that :
But that's something that won't happen for a long time as I have many more important things to do on this project. EDIT : I did a quick test on real hardware (gouraud shading on everything + BR-style transparency) and the game still ran at 20-30 fps. There is room for improvements, hopefully I can reach a stable 30 fps will all these effects. | ||||||
| luisoft | Jan 4, 2019 | ||
Impressive work!! Hey , you are working in framebuffer effects right? Its hard do a similar effect like Tomb Raider save state from ps1?
1:25:50 This effect copy the framebuffer to a polygon and put a purple pallete. | |||
| XL2 | Jan 4, 2019 | |||
Yes and no. The problem is the lack of texture coordinates, which limits what you could do. | ||||
| mrkotfw | Jan 7, 2019 | ||
| Sonic R did the above entirely in software. | |||
| David Gámiz Jiménez | Jan 7, 2019 | ||
| Sonic R not make exactly the same. The texture reflection is static. In other hand. Tomb Raider in PS1 not use a UV refraction mapping, only a planar proyection of the previous frame buffer how texture plus inked and light whit gouraud source light. All this is possible in SS, in fact actually the SS version had the inked Gouraud sourced part. The miss part is the frame buffer texture, possible like XL2 made it. And last the UV planar protection, RockinB made it a long time. All is possible in SS, tricky but possible. | |||
| luisoft | Feb 20, 2019 | ||
| News in your engine? Can i download the last build? I really like this project Do you test multiplicative lighting to see if run better than additive? | |||
| XL2 | Feb 20, 2019 | |||
Nothing new, I didn't have much time recently, but I put back collision detection and removed the framebuffer clearing to gain a bit more rendering speed. I'm not sure I'll keep the BR style transparency because of limited ram and vram, and it's also slower. About multiplicative lighting, it's one option right now for smoother shading, I know it can probably be done using lookup tables, but normal additive lighting isn't bad either. The problem is that it would kill vdp1 half transparency, which was my backup plan instead of BR-style transparency (by using lines to rasterize polygons). | ||||
| XL2 | Mar 29, 2019 | ||
| Still no name nor any gameplay to show, but here is some footage from last month's version. The textures aren't very good and they are too dark and I didn't put enough lights so it's hard to see. I didn't have much time recently so I haven't made much progress, but I am currently working on a Quake .map converter, which should allow me to make maps faster and help with moving entities/switches/doors. Anyway, it runs at 30 fps, but I still have visual glitches that I will try to fix once I am done with the converter.
| |||
| luisoft | Mar 29, 2019 | ||
| I see this video! Really impressive!!! The texture mapping is really nice in this demo! And running at solid 30fps show the power of your engine. This small glitches is not really a big problem the demo is really nice!! I love one day get your code and study hard this game and the awesome Sonic Z. Using bsp tree speed up the Sonic Z game? Not clearing the framebuffer cause visual glitches? | |||
| XL2 | Mar 29, 2019 | |||
Not clearing the framebuffer doesn't cause glitches if you always overwrite all the pixels, which is what I do. The glitches must be related to dma or cache, I will work on that later. As for Sonic Z-Treme, the maps wouldn't work with a bsp tree and I don't see how I could ever make it work, so this project is on hold, most likely cancelled. The bsp helps mainly for visibility calculation (pvs, portals), which is very nice for indoor maps, but not so much for outdoor maps. | ||||
| luisoft | Mar 30, 2019 | ||
All times i turn on my saturn i NEED play Sonic Z many times! Its a dream play a sonic3d into saturn hardware. "this project is on hold, most likely cancelled"
A similar game can be done with saturn using 2 scroll planes one for water and other for the level and can use your nice sonic 3d model. | |||
| XL2 | Apr 16, 2019 | ||
| Here is a demo for lighting using lightmaps and alpha blending on the VDP2. It's still the same framebuffer trick I mentionned before. The edges are sadly a bit too rough, so they don't fully cover the cube, but if it was an interior map with the screen filled with polygons it would be OK. | |||
| luisoft | Apr 16, 2019 | ||
| Impressive work again! This texture mapping is software? Your engine is really nice and get better and better all days. Nice Work man! | |||
| XL2 | Apr 16, 2019 | ||
| It's all made by the hardware. | |||
| Prev | 1 | 2 | 3 | 4 | Next |