Jump to content
The Dark Mod Forums

Things that could be improved


Berny

Recommended Posts

I got it working:

 

https://dl.dropboxusercontent.com/u/17706561/darkmod_imageDownsize_patch.zip

 

The only problem is that if you downsize too far, the Postprocess (bloom) effect

Makes the game screen black so you have to disable it.

 

I'll give it one more night but I think this is as good as it gets.

 

The code?

 


// HACK: to allow keep fonts from being mip'd, as new ones will be introduced with localization
// this keeps us from having to make a material for each font tga
if ( name.Find("fontImage_") >= 0 )
{
allowDownSize = false;
}	
else if ( name.Find("fonts/") >= 0) 
{
allowDownSize = false; 
}	
else if ( name.Find("guis/assets/") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("postprocess/") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("_cookedMath") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("_currentRender") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("_currentDepth") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("/consolefont") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("/bigchars") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("/entityGui") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("video/") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("fsfx") >= 0)
{	
allowDownSize = false;	
}
else if ( name.Find("/AFX") >= 0)
{	
allowDownSize = false;	
}
else if (name.Find("_afxweight") >= 0)
{
allowDownSize = false;
}
else if (name.Find("_bloomImage") >= 0)
{
allowDownSize = false;
}

It turns out that the name parameter for image in image_init.cpp is the whole file path. That

Means that you can add whatever folder path you want to this blacklist.

 

Not the way I wanted to implement it but it works.

  • Like 1

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...)

Link to comment
Share on other sites

By downsize I assume you mean, via your custom darkmod.cfg args you give people when they request help..?

 

Yes:

 

seta image_downSize "1"

seta image_downSizeLimit "256"

  • Like 1

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...)

Link to comment
Share on other sites

seta image_downSize "1"

seta image_downSizeLimit "256"

So anything lower than the above with your fix above is to be considered a no-no?

 

As we seem to keep sending people your way for the above custom tweaks for people with low end systems? do we have a wiki entry for all your usefull info or if we don't could you create one when you get a sec..?

 

I will put a sticky in the Tech. Supp. section so we can point new players to it etc.

Link to comment
Share on other sites

I'll need to check the threshold. I think I set it to something silly like image_downSizeLimit "32" but I imagine you could go as

low as "128" without losing postprocess. Will need to test further but I was planning on trying to fix that by blacklisting whatever image

the bloom\postprocess shader is using. Couldn't find it yet apparently.

 

Edit:

 

Testing shows that you don't get anything visible below 256 and the whole scene doesn't render until your at 512.

When you are at 512 the bloom acts strange and more like lens flare. So something is definitely scaling unintentionally here.

Disabling image_downsize cures it so this is still better than before. You can choose between image_downsize or bloom.

 

Gonna test SVN to see what it does before this patch. It would be strange if the blacklist somehow had the opposite effect on

bloom.

 

Edit 2: HA! Same behavior before the fix (I didn't make anything worse!!! :) ). Still, now that I know it happens regardless I should try to cure it anyway.

  • Like 1

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...)

Link to comment
Share on other sites

  • 2 weeks later...

Hi, i'm returning from holidays, and it's nice to see your research on this subject. Thanks !!

Will you condition this with something like "seta tdm_gui_maps_downsize 1" ?

Link to comment
Share on other sites

You mean make GUI down-sizing optional?

 

I could do that but I doubt we'll see maps with too many GUI textures where there will be a benefit.

I've given up on fixing the post process issue until I have a better idea where to tackle it.

The only place left that I can fathom is in the material parser itself under the _scratch block. But I kept getting errors when I tried to add allowDownSize or nopicmip there so it's another case where I'd need to allow material.cpp to pickup info from image_load (etc). So it's back-burnered for now.

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...)

Link to comment
Share on other sites

Hi, I've tested your patch and it works perfectly, thanks !!

 

I'd like to test some others images found in \dds\textures\darkmod\decals\papers\ (in penny 3 FM)

Can you tell me if the syntax is correct if I want to test only two images like onania.dds and actuarian.DDS :

dds\textures\darkmod\decals\papers\
{
    {
    map \dds\textures\darkmod\decals\papers\onania
    nopicmip
    }

    {
    map \dds\textures\darkmod\decals\papers\actuarian
    nopicmip
    }
}
Edited by Apiai
Link to comment
Share on other sites

 

Hi, I've tested your patch and it works perfectly, thanks !!

 

I'd like to test some others images found in \dds\textures\darkmod\decals\papers\ (in penny 3 FM)

Can you tell me if the syntax is correct if I want to test only two images like onania.dds and actuarian.DDS :

textures/darkmod/decals/papers/onania
{
    {
    diffusemap textures/darkmod/decals/papers/onania
    nopicmip
    }
     // The following two blocks are required for the ambient shading:
     // TDM Ambient Method Related
         {
                if (global5 == 1)
                blend add
                map                     nopicmip        textures/darkmod/decals/papers/onania
                scale                   1, 1
                red                             global2
                green                   global3
                blue                    global4
         }
}

textures/darkmod/decals/papers/actuarian
 {
    {
    diffusemap textures/darkmod/decals/papers/actuarian
    nopicmip
    }
    // The following two blocks are required for the ambient shading:
    // TDM Ambient Method Related
    {
      if (global5 == 1)
      blend add
      map nopicmip textures/darkmod/decals/papers/actuarian
      scale 1, 1
      red global2
      green global3
      blue global4
    }
}

 

There's a corrected example. You need to separate each material into it's own block, the way you had it they were stages of the same

material. Also, all lit textures need a diffuse stage, normal stage, or specular stage. Finally, I added our simple ambient so you can set the ambient

shading to simple if desired.

 

http://wiki.thedarkmod.com/index.php?title=Texture_Creation_-_Basic_Tutorial

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...)

Link to comment
Share on other sites

And if I want to handle the full directory, do I need to include the same block ?

dds\textures\darkmod\decals\papers\
{
    {
    map \dds\textures\darkmod\decals\papers\
    nopicmip
    }
    
    {
    if (global5 == 1)
    blend add
    map nopicmip textures/darkmod/decals/papers/
    scale 1, 1
    red global2
    green global3
    blue global4
    }
}
Link to comment
Share on other sites

This (down_size directory-based black-listing) can only be done in engine-code, materials can only do inheritance by result image.

 

By the way, you never include DDS in the texture path.

The engine automatically goes there and treats it as the root folder when image compression is enabled.

 

The only quick way to do this other than adding the decals/paper path as a black-list item in the engine is to relocate

the textures to guis/assets/ and then update the "map file" and "material defs" to reflect that new path.

 

Eg:

 
guis/assets/decals/papers/actuarian
{
{
    diffusemap guis/assets/decals/papers/actuarian
   
    }
// The following two blocks are required for the ambient shading:
// TDM Ambient Method Related
 
{
    if (global5 == 1)
    blend add
    map guis/assets/decals/papers/actuarian
    scale 1, 1
    red global2
    green global3
    blue global4
}
 
}
 

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...)

Link to comment
Share on other sites

Thanks for your answer, and for the patch.

 

Another suggestion, what about the ability to throw a coin to distract guards like in NOLF

https://youtu.be/w-nrVua5KTo?t=1447

The cost (50 or 100 gold) could be subtracted from the loot amount to prevent player to use it too much

Link to comment
Share on other sites

There are a number of ways to distract guards already. Aside from noise arrows (or regular arrows), you can throw anything you can pick up, or drop an inventory item into your hands and throw it. One time I threw my spyglass across the room to distract a guard who was about to stumble on me in a dark corner. It would be nice to be able to pick up a junk object like a bottle and keep it in inventory until you need it though.

Link to comment
Share on other sites

  • 1 month later...

If there is one thing that irritates me, it's the lacking contrast. The shadows should be much, much darker to avoid annihilating immersion. And guards should obviously carry torches or lamps when patrolling dark spots, but I guess that's a level desing problem so it doesn't really fit in here I guess.

Link to comment
Share on other sites

And FYI, if you've ever seen gamma curves, it means bright things stay bright & dark things get darker, so it preserves the contrast. It's not just a blanket uniform dimming.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

  • 2 weeks later...

I think the hud display items should have size slider adjustment, I find them too large. Save for the hell that's a little bit tiny. I also think the light Jem with the border is over-produced and a more simplistic design would be better I even think no light gem at all and once the player becomes affected by light then the light gem can start to appear on the screen to give the player full option for no inventory items on the screen while playing the game without completely turning off the lights on. I know that would be an undertaking but it's just my 2 cents because I can't get rid of the weapons and I can get rid of the inventory but I cannot remove the light gem because I am always using it. Fifth Third light only when off when the player was becoming in two stages of this ability then it would keep the American intact for the player too soak up the environment more than just splitting their attention focusing on their visibility indicator. Just some thoughts

Link to comment
Share on other sites

Fortunately the things you mentioned are easy for a fan to fix. I made a custom lightgem. You just find the art in the .pk4 and drop in new art with the same names in a folder with the same name.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

The liughtgem fix is on the coding side, the appearence in game is a gui thing. Two completely seperate things, which can be worked on seperately. As demagogue already said you can easely create your own lightgem if you want to.

 

Regarding the size of the inventory/weapon icons. It wouldn't be too hard to implement the possibility to change the size of them. But a cvar would needed to be added so the settings can be applied. The cvars are however part of the source code, so the change would only apply in the next update.

 

Filed a bugtracker: http://bugs.thedarkmod.com/view.php?id=4393

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

That's right Obs. Lightgem optimization is code side and from what I understand is finished for now. The aesthetics of the gem are a subjective thing. I don't see a reason to redesign the appearance of the gem as it fits the mod. I do find the gem gets stretched depending on resolution though, so either a permanent fix it a way to adjust the size would be nice.

Link to comment
Share on other sites

A GUI scaling project was already started in v1.05 but was not completed.

 

There are existing cvars that can alter the size of GUI elements:

 

* gui_Width (scaling 0..1.0 of screen size)
* gui_Height (scaling 0..1.0)
* gui_CenterX (offset 0..1.0 of screen width)
* gui_CenterY (scaling 0..1.0 of screen height)

 

Tracker 2703.

 

I associated that with the new ticket.

  • Like 2

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...)

Link to comment
Share on other sites

Maybe ability to arrange size / placement on screen. I still don't have widescreen haha, but I like feature with curving border desigb that let's player see if character is crouched or standing. i want to learn about how to go about customizing light gem in the HUD.

Link to comment
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.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 1 reply
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...