Duke4.net Forums: Doom 3 Virtual Texturing - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Doom 3 Virtual Texturing

#1

Over the past week I've been working on adding virtual texturing to Doom 3.

Here's a full playthrough of Mars City1 using my virtual texturing code. After the initial cutscene, I change the vt debug type(the bit that's drawing the numbers of the pages), and you can see the game retranscoding all of the images, to add the new debug information to the pages.


4

User is offline   Gambini 

#2

I have no idea what you did, but i watched the whole video and it brought me some nice memories of playing the game :o
0

#3

 Gambini, on 28 September 2019 - 10:00 PM, said:

I have no idea what you did, but i watched the whole video and it brought me some nice memories of playing the game :o

Virtual Texturing pages in segments of textures, rather then loading them all into memory at once. So idTech 4(Doom 3/Quake 4/Prey), load all of the textures in there entirety into memory. Virtual Texturing pages in only the segments of textures required for that frame. See the image in the middle of the video, and watch it grow; its paging in needed texture pages.

Each page is separated by yellow borders, which is why you see a yellow grid all over everything in the video. The yellow border is created by a debug feature I added, called transcode visualization. Basically it just adds a yellow border around the page, and adds some debug numbers. The debug numbers are either pageX or pageY in page space, or pageX/pageY in Virtual Texture atlas space.

This post has been edited by icecoldduke: 28 September 2019 - 11:45 PM

1

User is offline   Gambini 

#4

Yeah i noticed those things, i didnĀ“t know where was your change. Among other things, it may be useful for modders. I for example use r_reloadallmaterials command when i edit a material and dont want to reload the whole game again.
0

User is offline   Phredreeke 

#5

So this is a way to conserve VRAM so you can have larger textures?
1

#6

 Phredreeke, on 29 September 2019 - 07:34 AM, said:

So this is a way to conserve VRAM so you can have larger textures?

Exactly, with Virtual Texturing you can stream in "megatextures" or stream in regular textures, and your texture VRAM footprint will be the same. One image streaming pipeline for everything.
1

#7

Made some progress today, got mipmapping on its feet with virtual texturing.


0

User is offline   NightFright 

  • The Truth is in here

#8

Does this have any positive benefits regarding how well/fast the game is running? I guess visually it's exactly the same.

This post has been edited by NightFright: 29 September 2019 - 12:07 PM

1

#9

 NightFright, on 29 September 2019 - 12:06 PM, said:

Does this have any positive benefits regarding how well/fast the game is running? I guess visually it's exactly the same.

Aside from the memory benefits, another big win with virtual texturing is lightmaps. I currently have a RTX lightmapper that can bake a "megalightmap". It doesn't take long to generate the mega lightmap, and can easily be streamed in using virtual texturing.
0

User is offline   NightFright 

  • The Truth is in here

#10

Nice. Not that I had issues running the game before, though. People with weaker graphics cards might appreciate this quite a bit more.

(BTW just noticed my "positive benefits" tautology. Ouch... :o)

This post has been edited by NightFright: 29 September 2019 - 10:27 PM

0

#11



I measured load times compared to Doom 3 vanilla and RBDoom3BFG. Basically the test is run the game with the command line arg +devmap game/mars_city2, and timer starts at the first black screen(timer starts at 0:09 seconds, and ends at 0:17). This is also a debug build so my load times will be even faster in a release build.

Doom 3 Base ultra settings: Cold Boot to mars_city2 22 seconds.

RB Doom 3 BFG: Cold Boot to mars_city2 14.5 seconds.

IcedTech Doom 3 Vanilla: Cold Boot to mars_city2 8 seconds.


This video also shows virtual texture mipmapping working.
0

#12

I released the source here if anyone wants to try it out.

https://github.com/j...hall23/IcedTech
0

User is offline   NightFright 

  • The Truth is in here

#13

Ok, from 22 down to 8 seconds is over 60% faster. That seems quite impressive already, even for a first test. If it's consistently like that for all levels, I might actually consider a full replay of the game just because of the shorter waiting times.

Hopefully this can also be applied to Quake 4 once it's done.

This post has been edited by NightFright: 04 October 2019 - 12:43 AM

0

#14

 NightFright, on 04 October 2019 - 12:36 AM, said:

Ok, from 22 down to 8 seconds is over 60% faster. That seems quite impressive already, even for a first test. If it's consistently like that for all levels, I might actually consider a full replay of the game just because of the shorter waiting times.

Hopefully this can also be applied to Quake 4 once it's done.


Unfortunately Quake 4's source code was never released.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options