Jump to content
The Dark Mod Forums
Sign in to follow this  
duzenko

Convert normal maps to RGTC?

Recommended Posts

Do you have a converter for RGTC @duzenko? I'd like to conduct an experiment so see how loading times are affected. I assume their is no code support needed to load RGTC normals at this point?

Share this post


Link to post
Share on other sites
3 hours ago, STiFU said:

Do you have a converter for RGTC @duzenko? I'd like to conduct an experiment so see how loading times are affected. I assume their is no code support needed to load RGTC normals at this point?

Good question that I can't answer fully ATM. D3 offers two automatic conversion options:

  • via the r_writeCompress_something cvar that is supposed to let the GL driver do the conversion and then simply bit copy the result from the VRAM. You'd think that driver's on-the-fly compression is fast but image quality might suffer.
  • using an external command-line tool. Supposedly this is the recommended option. We still need to decide which 3rd party compressor we want to use and how to wire it to TDM (command line params, etc)

Feel free to try either of these but keep in mind that texture loading is only a fraction of total map loading time.

I'd like to get the RGTC conversion completed but afraid to touch it before 2.08 is out

Share this post


Link to post
Share on other sites
40 minutes ago, duzenko said:

Feel free to try either of these but keep in mind that texture loading is only a fraction of total map loading time.

How can you tell? Did you profile map loading? If so, I'd be very interested to see the results!!

Quote

I'd like to get the RGTC conversion completed but afraid to touch it before 2.08 is out

Yes, this is definitely a 2.09 task.

Share this post


Link to post
Share on other sites
20 minutes ago, STiFU said:

How can you tell? Did you profile map loading? If so, I'd be very interested to see the results!!

Yes, this is definitely a 2.09 task.

Unfortunately VS2019 profiling does not work for me

But image_preload 0 will do the job - try it.

Share this post


Link to post
Share on other sites

 

17 hours ago, STiFU said:

Do you have a converter for RGTC @duzenko? I'd like to conduct an experiment so see how loading times are affected. I assume their is no code support needed to load RGTC normals at this point?

If you have time to have fun, you can try to implement your own in something like Python. All those texture compression formats are so simple compared to PNG and JPG, that writing a basic converter is a one-day problem 😎

13 hours ago, duzenko said:

Unfortunately VS2019 profiling does not work for me

I'm afraid CPU profiling is not the right way to conduct experiments in this case. There are many things involved which you won't be able to properly measure with profiler: disk accesses, OpenGL driver work, GPU transfers, etc. I suggest doing more complicated measurements with temporarily disabling some parts in the code. I guess most of the time should be taken by texture loading, models loading, and sound loading (also covered in zip compression unless you are on SVN).

Share this post


Link to post
Share on other sites
2 hours ago, stgatilov said:

 I guess most of the time should be taken by texture loading, models loading, and sound loading (also covered in zip compression unless you are on SVN).

.map/.proc/.cm files can take a while to load, as well as AAS parsing

Then, there are also scripts, def's, materials

Share this post


Link to post
Share on other sites
On 3/26/2020 at 8:01 PM, duzenko said:

Good question that I can't answer fully ATM. D3 offers two automatic conversion options:

  • via the r_writeCompress_something cvar that is supposed to let the GL driver do the conversion and then simply bit copy the result from the VRAM. You'd think that driver's on-the-fly compression is fast but image quality might suffer.
  • using an external command-line tool. Supposedly this is the recommended option. We still need to decide which 3rd party compressor we want to use and how to wire it to TDM (command line params, etc)

Feel free to try either of these but keep in mind that texture loading is only a fraction of total map loading time.

I'd like to get the RGTC conversion completed but afraid to touch it before 2.08 is out

What about ATI/AMD compressionator? It was the tool that idsoftware used to compress normal maps for Doom 3 and splash damage for quake wars, you can find the old version used in Doom 3 here.

Or perhaps ODCompress from Overdose?

Share this post


Link to post
Share on other sites
48 minutes ago, HMart said:

What about ATI/AMD compressionator? It was the tool that idsoftware used to compress normal maps for Doom 3 and splash damage for quake wars, you can find the old version used in Doom 3 here.

Or perhaps ODCompress from Overdose?

Does either of them support RGTC?

Share this post


Link to post
Share on other sites
3 hours ago, duzenko said:

Does either of them support RGTC?

Don't know a thing about texture compression but latest compressionator "Can compress to a wide range of compression formats including ASTC, ATC, ATInN, BCn, ETCn, DXTn and swizzled DXTn formats, and supports conversion of textures between 8bit fixed, 16bit fixed and 32bit float formats."

 

Taken from this link:   "ASTC provides a single-channel and two-channel version, equivalent to RGTC's formats."

  

Edited by HMart
  • Like 1

Share this post


Link to post
Share on other sites

As I recall, RGTC is just another name for Microsoft's BC4 or 5

This seems to confirm it:

RGTC1_RED = BC4U, RGTC1_SIGNED_RED = BC4S, RGTC2_RG = BC5U, RGTC2_SIGNED_RG = BC5S

 


Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Share this post


Link to post
Share on other sites
6 hours ago, HMart said:

Don't know a thing about texture compression but latest compressionator "Can compress to a wide range of compression formats including ASTC, ATC, ATInN, BCn, ETCn, DXTn and swizzled DXTn formats, and supports conversion of textures between 8bit fixed, 16bit fixed and 32bit float formats."

 

Taken from this link:   "ASTC provides a single-channel and two-channel version, equivalent to RGTC's formats."

  

Can't see any reference of a compression tool on that link

Share this post


Link to post
Share on other sites
4 hours ago, duzenko said:

Can't see any reference of a compression tool on that link

Nor was that my intention I was just showing that I've read that ASTC is equivalent to RGTC but I don't know if is really true or not. 

Ha now I know what you meant by that, the first quote in dark gray from my reply above was from the latest AMD compressonator page, the link to it is on my reply above with the links for the tools, the other quote in white, is from another link, the "taken from this link" was referring to the white quote only.    

Edited by HMart

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...