Page 1 of 1

HD Texture Streaming Feature

PostPosted: Sat Apr 13, 2019 7:16 pm
by Steve5563
Hi there,
is it possible for texture streaming to be added in gzdoom?
the reason for the request is to optimize the gpu memory usage while running around using lots of HD textures well above 2048 x 2048 in resolution.
this is a issue we are facing as we are trying to bake lighting to a level and we end up with lots of textures with huge texture sizes and to pre cache all of those textures...
The gpu memory is limiting us with how big the level can be and how much detail we can add to the areas in the maps.
what we would like to do is make low resolution versions of the baked textures which can be stored in our wads / pk3 files as the base textures, these are used when applying textures to the map in gzdoom builder
and are pre cached when the level loads up with the gzdoom feature.
we can then have a separate pk3 file which is used as a HD texture pack for the level, ( original baked textures )
this is used to stream the HD textures from when needed, using the same folder as or similar to the " Hires folder ".
cheers

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 12:49 am
by Graf Zahl
With OpenGL, no chance. We already had problems with the upload of the software renderer's 3D image because the texture API is too unpredictable. With Vulkan it may work but don't expect any quick results. The engine simply isn't designed for it and it'd require a significant amount of refactoring.

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 3:26 am
by Steve5563
roger that... thanks for the reply.

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 3:41 am
by Nash
I'm not sure what exactly is OP's use case but this sounds like a prime candidate for actual baked lightmap support in the engine... :)

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 10:41 am
by dpJudas
That branch is more or less abandoned at this point. Attempting to draw a lightmap on every surface ended up too messy in the code for my taste, not to mention it still not doing it right a few places where I have no idea why.

I'm currently toying with other ways in my own engine (such as generating a lot of light probes automatically) which maybe one day could end up in GZD+ZDRay if it can be made generic enough. Lightmaps are somewhat obsolete anyway since they can't easily encode directional light, which is critical for good specular and reflection effects.

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 1:30 pm
by Steve5563
hi dpjudas,
bit off topic but you know how you can export a map as a obj file in GZDB, you reckon it's possible to make GZDB re-import that same .obj file... it currently does not work, the reason for asking is so we can export the map as a .obj file and then bake the lighting to our map in 3ds max... and then re import the level back into gzdb using the obj file or is it possible to make gzdb reload the resource files for the map... but instead we can use the new material file and baked textures? the way we are doing the textures is to import and apply them 1 by 1 and set the ceiling and walls at full brightness, we are then using a bright map to make the floor texture appear full bright while the sector brightness can still be adjusted to control the player / monster sprite brightness. its a bit of work to get what we want but the effect works quite well. cheers

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 2:23 pm
by dpJudas
I'm sorry, I didn't write the GZDB .obj export, or the GZD .obj import. I don't know why they aren't compatible with each other.

Generally speaking you're entering territory the engine wasn't built or battle tested to handle. I really can't recommend it.

Re: HD Texture Streaming Feature

PostPosted: Sun Apr 14, 2019 10:41 pm
by Steve5563
no worries thanks for the reply,
yea it's a shame the .obj import feature doesn't work that would be so so handy to have... and we would save so much time from converting the wad into a model then converting it back into a wad with all the new pre rendered textures applied to the map,
yes we have found out that we are on the limit on what we can do for map design, but this is actually very easy for gzdoom to handle as they are just pre rendered textures nothing more and nothing less.
we have found out that gzdoom cant handle any textures larger then 17k x 17k ( HD Textures ) and a few of these textures in a level really chews into gpu ram usage. so we are limited to small level sizes with low sector detail or a small texture count all due to gpu ram limitations.
but with all the limitations there is actually enough meat left on the bone to still make something cool out of it all.
cheers