Jump to content
The Dark Mod Forums

peter_spy

Member
  • Posts

    3201
  • Joined

  • Last visited

  • Days Won

    109

Posts posted by peter_spy

  1. This is more like a wish for TDM itself, rather than DR, but what do you think about adding support for other compression formats to TDM? Right now we can only use the old "deflate" method which is rather slow and inefficient. 7-Zip offers several types of compression for zip files, and here is a small comparison for bigger TDM missions out there:

    Zip_Compression_Rates.jpg

     

    PK4s are original files, compression methods are in suffixes. As you see, the difference can be substantial, and those LZMA and PPMd archives also compress much faster. It took 3 minutes for Volta to compress with the deflate method vs 50 seconds with PPMd and LZMA.

    • Like 3
  2. That was interesting, thanks. Well, if I really want to see the framerate go down, tons of transparent objects probably will do the trick, as in any engine ;)

     

    That said, I can't wait to tinker with the depth biased alpha for fog, haze or light shafts. I really missed that in T3ed, along with proper specularity. But I guess that was the whole problem with using DX 8.1, a lot of things went borked along the way. Or maybe that was because some guy wrote a renderer over a night or two, and then disappeared ;)

  3. In terms of performance tweaks, I have the official minimum specs and think I might have found something helpful.

     

    First of all, I think this game isn't really optimized for "fixed" graphic settings on any platform, on lower-end systems in particular. You can use settings below as a base for further tweaks, if your hardware is capable enough.

     

    - Set your screen resolution as you like, although try to go with 1080p or lower (I used 1080p). Full screen is fine.

    - Presets: set it to Auto. It will probably set everything to very low.

    - Turn off Vsync, use Frame limiter instead, set it to 30 FPS.

    - Set Adaptive resolution to Always, set either Balanced or Quality. In my case Quality was ok.

    - Set Anti-aliasing to TXAA, set the Sharpening slider somewhere in the middle.

     

    This is what works for me at the moment, and the game runs more smoothly. If you have high enough framerate, try higher quality textures, shadows etc.

  4. Tell that the guys always complaining about how bad idTech4 is in regards to performance. ;)

     

    I can tell them that I also used 2x AA ;)

     

    Who knew our little engine would beat the Unreal engine... :D

     

     

    Technically not UE, it's so-called "Flesh" renderer that was hacked into Unreal Editor 2.x. Nobody really knows what it can or can't do, but man does it obey the "Lights that touch too many objects" metric like the law of gravity ;)

     

    It doesn't really matter how many objects a light is hitting - idTech 4 can sling polys into the hundreds of thousands without breaking a sweat. Problems typically start when you have too many overlapping, shadowcasting lights. Fortunately, hardware has advanced enough that you don't have to be as strict as in 2009, just don't go overboard with several lights hitting the same area.

     

    Well, that's still very good news! Typically calculating light and realtime shadows should put a strain on CPU (or is it GPU? not sure which process uses which hardware). In T3ed, I used one shadow casting light and a few "nonshadows" to fake light bouncing and such. I had a daylight mission prototype and it was pretty good for that purpose.

  5. I can't check whether the DX5nm compression works, because somehow DDS textures don't show when I test the map. I see them in the lightning preview in DR, but not in game. What is even more weird, when I use TGA textures for custom materials and test them in game, there's a warning in the log: "couldn't load the image", but it actually is loaded and visible.

  6. My general approach:

     

    DXT1 – RGB with 1-bit alpha, so no smooth transparency, only fence textures and the like (I often used DXT3 anyway, because the result sucked)

    DXT3 – RGBA, but gradients are a big no

    DXT5 – RGBA with gradients, linear and radial gradients will look fine. Irregular shapes are problematic.

    DXT5n – it should be for normals, but it never worked for me. Maybe it was for ATI cards only.

  7. Even with super awesome engines like UE3 or 4 you have to choose the image / compression type for every texture you import to your package, so it's probably not so easy to make this stuff automatic.

     

    On a positive note, it's either the GIMP dds plugin version (gimp-dds-win64-3.0.1) or the card drivers, because now compressing 2048 px textures is as quick and painless as with 512 and 1024 px. It took much longer on my PC when I last tried it. I might have used mipmap generation though, as default mipmapping in TDS was awful and couldn't be changed.

  8. As I understand it, the engine uncompresses the textures for use during play, so converting to .dds can affect the amount of visual memory needed (and possibly load times?). I've never confirmed this myself, but that seems to be the conventional wisdom.

     

    I just did a quick research, actually it looks like compressed DDS textures can be handled by graphic cards in their compressed form. I've been working with this format for so long, and I didn't know that... PNGs, JPEGs and other formats need to be decompressed to their full size after being loaded in-game, obviously increasing loading times, memory usage, and demand for processing power. So, no easy way out here :)

     

    Edit:

    (Well, new AMD and Nvidia GPU's internally compress texture data so if you don't care about end-users with hardware over 1yr old you

    could just ignore this issue... [:D] )

    Yeah, on TTLG I've been harassing guys like SoulTear over how disrespectful it is to the audience, to release missions in such unoptimized state – certainly it would be a great display of me practicing what I preach ;)

    • Like 1
  9. DDS is smaller because TGA only has RLE compression, which is way less aggressive than DXT and doesn't have different modes for different image types. But, players download only the compressed pk4 packages and don't need to unpack them. So, the uncompressed DDS images have impact only on our hard drives, not theirs, am I right?

  10. We'd probably have to switch to map file / resource package file workflow, not sure there's any reason for that. We compress the final package anyway.

     

    I'm not sure how exactly the compression (or lack thereof) influences the loading time and performance in-game, but there's only a slight difference between the DDS image with DXT1 compression, and the same image with no DXT compression zipped with LZMA method. For 1024 textures it's a difference between ~520 kb and ~660 kb.

     

    So maybe we can skip the DDS compression entirely and let the pk4 packages (and the game) do the work?

  11. I'm actually pretty anal when it comes to my textures and materials, I do most things from scratch (no photo bases), and you can be sure that I will tweak every goddamn specular until it looks like I want it to :P

    I always have large (2048) .xcf source files, at least for diffuse, and if the greyscale version doesn't translate to proper normals and spec, I keep separate files for it too, etc. etc. I don't like .dds because of the compression, because I have to choose compression according to texture type, and because Gimp is pretty slow with the compression, especially with larger files. They would probably be easier to use without compression, at least in the prototyping stage, but in my T3Ed days I had to compress them, otherwise there was nothing in the texture browser.

    • Like 1
  12. You're absolutely right Melan, and I'm using njob most of the time. It's the material preview I need, so I don't have to jump into the game every time I tweak something.

     

    Also, I must be doing something wrong, because I have my .pk4 package in the main TDM folder, so I can see my textures and materials in the DR.

     

    Edit: Oh, now I get it, I had to set up a path in a Mod (fs_game) to maps/myfolder for my stuff to appear in media browser. Whew, that will speed things up a bit.

  13. I tried making my first custom material, I'm getting the hang of it. I'll probably create one .mtr file per material, because debugging anything with more than a few definitions in one file would be a pain for a GL code newbie like me. I could probably paste it all into one file later?

     

    Since I'm using all those for myself, I kinda skipped the folder structure and used the naming convention I'm used to (_d, _n, _s), and it was nice that DR didn't complain about that at all. Having everything in textures/myfolder is also nice and quick. Putting textures into .pk4 every time I change something is not :) But, I can either use MindTex, as Biker suggested (Crazybump is still 100 bucks :o), or just preview textures in 3dsmax or Blender first.

     

    By the way, since .pk4s are basically zip files, have you thought about supporting other compression formats? .7z was pretty efficient with Deadly Shadows maps, and I see that it handles Darkmod missions pretty well too. Volta and the Stone is a 100 mb zip file vs. 80 mb when compressed with 7zip, IMO that might be worth looking into.

  14.  

     

    Wow, I'm speechless right now :o that's tons of useful information, Biker! I kinda wish I had sent you something better than this crappy stuff, but you managed to make so much out of it anyway! Thanks for your time, and congrats on the map, it looks very promising. Quality wise it's the the level I'm aiming at in the future.

     

    As for the doorway and room sizes, I used what I typically apply to T3/UT3 mapping: 64 x 128 is a size of typical doorway there, as the player collision model is around 48x 48 x 96. I don't know typical measurements in DR yet, but I'll find that out eventually.

     

    Edit: Re: lights:

     

    In my case a default light with biground1 texture looks like this:

    image.jpg

     

    While the same light using falloff_exp1 looks as it should:

    image.jpg

    • Like 1
×
×
  • Create New...