|
Post by ketmar on Jul 21, 2023 11:40:59 GMT -5
it uses Boom silent teleports, afair.
|
|
|
Post by Herr Dethnout on Jul 21, 2023 13:33:58 GMT -5
of course, i'll be glad to see maps designed specifically for k8v lighting, and with 3d pobjs, especially if there will be some interesting gamplay built around those features. ;-) I will do that... But unless I got a GPU Upgrade (since I using the best iGPU drives that I was able to get lol), I will still having the cake but can't eat it.
|
|
tdrr
Doomer
Posts: 68
|
Post by tdrr on Jul 21, 2023 13:50:14 GMT -5
I know this might be an absurd suggestion, but have you considered either updating your drivers or trying a live Linux distro to test out K8Vavoom? Puppy Linux is small and getting the Windows build of K8Vavoom running is really easy, and you can do it all from an USB drive without having to install anything. I can guide you through the process if you want to check that out.
Granted, it'd just be for playing, unless you either want to try running Doom Builder through Wine (not recommended at all lol) or learn a native Linux map editor like SLADE or Eureka (which also isn't great since this all takes a lot of getting used to), but at least trying out K8Vavoom is worth it IMO.
Or just buying a GPU. I have an Nvidia GT 730 and Ketmar himself has a GT 720, either does the job really well for K8Vavoom (and all Dooming needs really), they don't require a beefy power supply, go for very cheap and are super easy to install.
|
|
|
Post by Herr Dethnout on Jul 21, 2023 18:32:36 GMT -5
I said that I'm using the lastest drivers that I can get for my GPU, but never tried a Linux Distro for that heh
|
|
|
Post by ketmar on Jul 22, 2023 23:47:30 GMT -5
dev diary #iforgot. ;-)
one thing i really want to implement for a long time is a proper 3d clipper. currently, the engine is using 2d clipping, and it's a problem. this clipper has no idea of height, so, for example, out-of-screen window in a wall will not clip rendering. i added several hacks for such cases, but 2d nature of the clipper still manifests itself. also, 2d clipper doesn't work good enough with freelook.
another way to implement clipping is to use fullscreen span buffer (like Quake and Unreal). with BSP we have strict front-to-back rendering order, and can perform clipping with pixel precision, regardless of camera orientation. such clipper is slower than 2d, but can give a speedup due to processing less geometry.
second thing i need to implement is sprite clipping. currently, the engine renders all sprites from the visible sector. it doesn't matter much for "normal" maps, but complex maps with a lot of monsters is a different deal. i have test maps where single-digit FPS could be turned to 60 by turning off (voxel) mobj rendering. the problem is that the player sees a small part of a huge sector with many monsters inside. no monsters could be seen, but the engine still renders them all. and rendering sprites eats both CPU and GPU.
all those invisible sprites should be lit by dynamic lights too. of course, the engine tries to clip invisible lights (and this clipper is way more aggressive than sprite clipper), but such clipping is an approximation, and some useless work is still done.
also, there could be some sense in introducing dynamic sprite atlases. most of the time the player sees the same sprites (so-called temporal coherency), so instead of using one texture per sprite frame (switching textures is slow), we can gather them in one big "atlas". currently, the engine tries to sort sprites by their textures to minimise texture switches, but tbh, this doesn't really help.
and of course, i need to cache map geometry in GPU RAM instead of sending it again and again each frame. this can drastically decrease the amount of data the engine sends to GPU (rough estimation: 3-10 times). it really matters for complex maps (Frozen Time bridge scene, for example).
long-term plans: with proper 3d clipping, i will (again) try to implement floodfill rendering, and dynamic sector tesselation. this may (or may not ;-) give us the ability to freely move sectors around, a-la Build. this needs properly built maps, tho (with properly closed sectors, and without missing textures), so old-style BSP renderer will not go away.
there are several other problems to solve with "no BSP": BSP tree is used for may things besides rendering, including hitscan tracing (sometimes) and light culling. so i will need to develop several new algorithms, not only renderer. that's why it is a "long-term" plan.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 23, 2023 0:46:31 GMT -5
and of course, i need to cache map geometry in GPU RAM instead of sending it again and again each frame. this can drastically decrease the amount of data the engine sends to GPU (rough estimation: 3-10 times). it really matters for complex maps (Frozen Time bridge scene, for example). This is the bane of our existence as well, and I haven't the first clue how to do any of that as I am a rendering caveman.
|
|
|
Post by ketmar on Jul 23, 2023 1:09:41 GMT -5
This is the bane of our existence as well, and I haven't the first clue how to do any of that as I am a rendering caveman. currently, my plan is to write a specialised memory manager for this. upload the initial geometry (with some vertex attributes) completely to GPU, and use triangle fans/strips (as does model code now). this way, we can render the whole subsector flat with only one number, for example. we can also join adjacent subsectors into "megastrips", and render them as a whole (because it should be cheaper to allow GPU to do some more work instead of trying to cull everything with CPU). custom memory manager is required mostly due to t-junction fixer: number of vertices per surface is not constant, so i need to free/move vertex blocks on updates (and eventually just wipe everything and start from the scratch). k8v does partial per-frame caching now (because rendering one frame requires several passes over the geometry), it makes things slightly faster (1-3 FPS more). i'm also trying to invent some way to cache shadowmaps. for most static lights it should be possible to cache traced shadows, i believe. shadowmaps are expensive, because i need to snap trace origin to texel center, to minimise acne/piterpaning. sadly, i cannot use texture selection in shaders without bumping minimum OpenGL requirements to 4.6. maybe i'll write a standalone PoC for geometry caching. if i go that way, i'll share the code with you. p.s.: i don't know much about gfx too, so i'm "learning by doing". ;-)
|
|
|
Post by ketmar on Jul 27, 2023 0:44:04 GMT -5
yesterday i decided to do one thing out of curiousity… and was really shocked. i think this is a great start. ;-)
i'm usually playing with Cheello voxel pack, and one one map i decided to find out why it is at ~27 FPS without complex geometry and such. so i turned off model rendering (i.e. all sprites became sprites), and… i instantly got solid 60 FPS.
tbh, i never thought that voxel models could be SO expensive to render. i mean, most of triangles should be rejected by facing checks, and z-buffer, and models are uploaded to the GPU and rendered with one call… but it looks like my GPU is still struggling with triangle count.
so i decided to implement simple LOD system for voxel models. nothing really fancy. and after some tweaking i got my 60 FPS, but this time with voxel models. of course, now models are "popping", but this is inevitable with any LOD.
i will prolly implement another trick: using lower resolution models for shadow casting. we don't really need pixel-perfect shadows, so if i'll use less detailed models (with less triangle count) for shadows, nobody will notice… except the GPU. ;-) LOD system already does this for faraway lights (because LOD level is based on the distance to the actual camera), but for lighting i prolly can always take next LOD in addition to this.
i may also introduce a way to specify LOD models in model definition files (because simplifying "real" 3d models is hard to do automatically), and the way to specify "shadow models" too. this way mod authors will be able to help the engine. maybe i'll even create a standalone utility to generate "automatic LODs". or something like that.
there is another way to make model rendering less expensive: replace faraway models with sprites (generated from the model itself). but this will require extensive engine modifications, so i prolly leave this for the next time. ;-)
|
|
|
Post by Herr Dethnout on Jul 27, 2023 1:12:27 GMT -5
tbh, i never thought that voxel models could be SO expensive to render. i mean, most of triangles should be rejected by facing checks, and z-buffer, and models are uploaded to the GPU and rendered with one call… but it looks like my GPU is still struggling with triangle count. I think is because every cube is treated as a individual model (I'm probably talking pure nosense, but I recall thats how GZDoom does iirc). Idk, I'm not a programmer just probably saying a lot of bullshit
|
|
|
Post by ketmar on Jul 27, 2023 1:32:34 GMT -5
I think is because every cube is treated as a individual model k8vavoom does much better job at converting voxel models. i wrote a voxelib conversion library, which tries very hard to optimise things: it merges adjacent quads into bigger ones, and significantly reduces triangle count. and "inner" cubes (which are never visible) generate no geometry at all. of course, there are still a lot of triangles there (counts in tens of thousands). i just thought that it shouldn't press GPU that hard, because roughly half of them is thrown away early, and many others didn't get past the z-buffer checks. but it looks like simply processing this number of vertices already eats most GPU resources. like hey, GPUs can render millions of triangles, right? but it looks like there is more than meets the eye. ;-) also, advrender is a multipass one, so one model can be rendered 3-5 times (for lighting and such). again, most model triangles are rejected by z-buffer on 2nd and other passes, but the GPU still have to perform transformations and such, and it looks like i heavily underestimated the amount of work here.
|
|
|
Post by ketmar on Jul 27, 2023 9:17:38 GMT -5
Herr Dethnout, oh, and i forgot to say that you're right about the idea of voxel → model conversion, of course! we invented several methods to optimise the result, but the basic idea is exactly what you wrote. now you're officially The Programmer! ;-)
|
|
|
Post by camper on Jul 27, 2023 13:58:12 GMT -5
ketmar, how do the shadows from the models look now? until the last moment, the shadows were rather strange, consisting of triangles and cast both from the light source and to the source. Or are you playing with model shadows disabled?
|
|
|
Post by ketmar on Jul 27, 2023 17:42:50 GMT -5
they look exactly as they were before. ;-) i've never seen any probems with model shadows.
|
|
|
Post by Herr Dethnout on Jul 27, 2023 21:35:36 GMT -5
Herr Dethnout , oh, and i forgot to say that you're right about the idea of voxel → model conversion, of course! we invented several methods to optimise the result, but the basic idea is exactly what you wrote. now you're officially The Programmer! ;-)
|
|
|
Post by camper on Jul 28, 2023 7:00:44 GMT -5
they look exactly as they were before. ;-) i've never seen any probems with model shadows. It looks like this for me: streamable.com/xyde9wBut in general, my system (windows10, AMD Ryzen 5 3500U with Radeon Vega) has some peculiarities, I already talked about the lack of water texture on q2doom.pk3, but others, as far as I know, everything is fine with water: ibb.co/FhtJ4Z2
|
|
|
Post by ketmar on Jul 28, 2023 9:49:28 GMT -5
It looks like this for me: definitely looks like some problem with your video drivers. sorry. i don't think that i can do something on k8v side to fix this. :-( of course, it may be something slightly wrong in shaders i wrote, but i don't think so (and can't fix it anyway ;-). here we need somebody with much better GPU programming knowledge than me, and that person should be on your end. alas. sorry. p.s.: AMD video drivers sux even more than intel's. they are broken in so many ways… basically, AMD only check some common code pathes used by common games/engines, and then they call it a day.
|
|
tdrr
Doomer
Posts: 68
|
Post by tdrr on Jul 28, 2023 14:31:34 GMT -5
I remember hearing all the time that AMD driver updates kept breaking GZDoom. Those were the days :)
|
|
|
Post by camper on Jul 29, 2023 1:03:18 GMT -5
I remember hearing all the time that AMD driver updates kept breaking GZDoom. Those were the days So Linux, Intel and Geforce guarantee that everything will work as it should? It's funny, in the old days there were Wintel and AMDunix.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 29, 2023 1:18:54 GMT -5
I remember hearing all the time that AMD driver updates kept breaking GZDoom. Those were the days So Linux, Intel and Geforce guarantee that everything will work as it should? It's funny, in the old days there were Wintel and AMDunix. If you're using nVidia with Linux, you'll want the actual nVidia drivers and not nouveau. When it comes to open-source drivers for Linux, AMD blows them out of the water.
|
|
|
Post by ketmar on Jul 29, 2023 3:41:55 GMT -5
yep, dasho is right. and GNU/Linux (32 bit) is the preferred OS, because that's the OS i am using to develop the thing. CPU doesn't matter, though, as i am deliberately not using any SIMD code (and even nuked SIMD optimisations from some libraries), and no assembler. ARM may not work due to alignment, tho (a lot of the code casting pointers left and right, and expect unaligned RAM access to work).
|
|
|
Post by ketmar on Jul 29, 2023 3:45:17 GMT -5
and btw, i really-really-really want to replace VavoomC with Oberon. the only thing that stops me is 4MB of VavoomC code i will need to rewrite. ;-)
(this is actually greater than real C++ code amount!)
|
|
tdrr
Doomer
Posts: 68
|
Post by tdrr on Jul 29, 2023 13:32:49 GMT -5
So Linux, Intel and Geforce guarantee that everything will work as it should? It's funny, in the old days there were Wintel and AMDunix. Nvidia works well on Linux, but AMD has them beat, especially since the driver is open source, and most distros simply include it built-in. But for Nvidia, you always start out with the nouveau driver, which usually has FAR worse performance and doesn't support the latest API versions (on this GPU I think it gives me like GL4.2 or so support, but the official driver can go up to GL4.6). You can install Nvidia's propietary driver but it's just not as easy. No real bugs or anything beyond the less than ideal install, at least.
|
|
|
Post by ketmar on Jul 29, 2023 15:13:38 GMT -5
You can install Nvidia's propietary driver but it's just not as easy. tbh, i never had any problems with proprietary nvidia driver installer. just download and run, and that's all. but of course, i stopped upgrading nvidia driver years ago, because they stopped uploading 32-bit builds. i hate that idiotic 64 bit craze.
|
|
tdrr
Doomer
Posts: 68
|
Post by tdrr on Jul 29, 2023 18:46:53 GMT -5
I've never had serious issues either, sometimes I'd need to restart and change something as the installer requires but nothing too bad. Still, compared with the ability to just install the distro you want and just have your GPU work exactly as it should... an installer isn't quite as good :p
Most popular distros do have the option to download it automatically though, but Slackware isn't one of them, and the less popular ones usually don't have any such feature.
It's never really a dealbreaker but I do appreciate the extra convenience when possible, and it lowers the barrier of entry for anyone who wants to try out Linux.
|
|
|
Post by ketmar on Jul 29, 2023 19:07:32 GMT -5
It's never really a dealbreaker but I do appreciate the extra convenience when possible, and it lowers the barrier of entry for anyone who wants to try out Linux. let's be honest: nobody in their sane mind will choose Slackware if they simply want to try linux… ;-)
|
|