Jump to content
System downtime for updates - Sunday 13 July 2025 ×
The Dark Mod Forums

Recommended Posts

Posted

Discussed here: http://forums.thedarkmod.com/index.php?s=&am...st&p=185202

 

I had a go at this and I can see it working quite well, with a bit of tweaking and possibly a few different "frequencies" of cloudiness for ambients of different sizes.

 

post-254-1243024768_thumb.png

post-254-1243024659_thumb.jpg

 

With a proper map the varied brightness could give the impression of general soft shadows that are not linked with any particular geometry.

Posted

Yes, there is a potential danger of striping (a true 3D texture would be much better of course).

 

However, there's no reason (AFAIK) that an ambient light cannot be a giant projected light instead of an omni light, so at least the stripes could fall at an angle. You could even determine where the moon/main light source was, and angle the projected light appropriately.

Posted

Make sure that the light-projection image has an alpha-channel filled with a value of 1 ( 0-255 scale ), or the fixed ambient light won't catch on.

Posted

Would a "translate" keyword make that texture scroll along?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

I'm having trouble setting this up. I made a cloud texture with a black alpha 1 channel and saved it as a tga, 32 bit/pixel. The problem is that faces turned away from the ambient light are completely black, this is the material I made.

 

lights/ambientlightnfo_clouds
{
ambientLight

lightFalloffImage makeintensity( textures/lights/ambientlightnfo)

{
	forceHighQuality
	map textures/lights/ambientlightnfo_clouds
	colored
	zeroClamp
}
}

Posted

Unfortunately, no. Doom3 automatically removes a fully black alpha-channel ( thanks id ).

You need to fill it with a value of 1. In Photoshop just put in RGB( 1, 1, 1 ) in the color-picker and fill the alpha-channel with that.

 

It's weird, i know :).

 

But so far it seems to have proven as a more reliable way to get non-coal-miner ambient lights in Doom3.

Posted
This is very interesting, is it possible to use a 3d texture to prevent striping? Or does that have it's own drawbacks?

 

It is possible if you program your own engine (with the drawback being that 3D textures are massive -- basically you have 256 or 512 separate "slices" to build a cube texture), but Doom 3 does not offer them.

 

You need to fill it with a value of 1. In Photoshop just put in RGB( 1, 1, 1 ) in the color-picker and fill the alpha-channel with that.

 

Why is a constant alpha channel required anyway? Couldn't the shader just assume a fixed value, if it is not going to change?

Posted

It tells the shader that the current light is supposed to be an ambient light.

This needs to be constant because otherwise you would get artifacts where the value isn't below the testing threshold.

 

The old version used a value that was passed to the shader by the rendering system, but this turned out to not be a reliable one and caused problems on certain cards.

Posted

That is very cool. I do have a dumb question though: What steps can the mapper take to make sure that stuff within this ambient is still visible to the player? I.e., what if the player is unlucky and some crucial item that's normally visible in an ambient happens to have a cloud drift over it right then? Or are these not the same kind of ambients you'd use to make sure that stuff is sufficiently visible?

Posted
It is possible if you program your own engine (with the drawback being that 3D textures are massive -- basically you have 256 or 512 separate "slices" to build a cube texture), but Doom 3 does not offer them.

That kind of 3d texture :) , I thought you meant something like a special falloff image.

Posted
It tells the shader that the current light is supposed to be an ambient light.

This needs to be constant because otherwise you would get artifacts where the value isn't below the testing threshold.

 

Oh I see. Clever, in a "necessary but less-than-ideal hack" kind of way.

 

It's interesting that the light texture's alpha channel is available though; once I was experimenting with gloss map shaders, and never achieved success trying to use the alpha channel of the specular map for this purpose. I concluded that the game was simply not loading alpha channels from specular maps (or providing it to the shader); perhaps in fact this was the same problem with the removal of a black alpha map that you encountered here.

 

I do have a dumb question though: What steps can the mapper take to make sure that stuff within this ambient is still visible to the player? I.e., what if the player is unlucky and some crucial item that's normally visible in an ambient happens to have a cloud drift over it right then? Or are these not the same kind of ambients you'd use to make sure that stuff is sufficiently visible?

 

The clouds are actually very subtle; I had to go back and increase the contrast several times before you could even notice them in game. You would have to increase it a lot more before things could actually be obscured in the dark patches.

 

Besider, in my view anything crucial for the mission should certainly not be left buried in an ambient light somewhere.

Posted

I got the ambient light working as it should. But when it didn't work and I got black texture on faces turned away from the light I did got an awesome depth effect in my entire map because the ambient light was casting shadows on all the textures normal map. I wish the ambient light somehow did use the texture's normal maps so nothing will look flat any more.

Posted

@Orbweaver :

 

Thanks :).

Yes gloss-mapping is certainly possible, there are a few custom vfps that have them, with different ways of implementing it. I've been fiddling with it in my "fiddle-interaction", where the ambient-fix actually originated.

 

The Doom3 Art-Project that someone posted some time ago on Doom3World ( i forgot the name atm, that brown cave-like map with the artsy flashbacks etc ) also has a vfp with gloss-mapping.

 

@Flanders :

 

It actually uses the Normal-Maps, but in a subtle way so it doesn't end up introducing a different kind of coal-mine look on character-models.

 

If you use a standard light with disabled shadows, you should get the same look you got when the alpha-channel wasn't adjusted yet.

Posted
It actually uses the Normal-Maps, but in a subtle way so it doesn't end up introducing a different kind of coal-mine look on character-models.

I noticed the normal maps of some characters faces make it look like asphalt rather than skin in bright light. Is there a value somewhere that determines the amount of normal map used for ambient light? I'd like to see for myself how it looks.

Posted
Yes gloss-mapping is certainly possible, there are a few custom vfps that have them, with different ways of implementing it. I've been fiddling with it in my "fiddle-interaction", where the ambient-fix actually originated.

The Doom3 Art-Project that someone posted some time ago on Doom3World ( i forgot the name atm, that brown cave-like map with the artsy flashbacks etc ) also has a vfp with gloss-mapping.

 

I know gloss mapping is possible in some way; the problem was that the shader I found used the alpha channel of the diffuse map to set the glossiness, which I considered wholly unacceptable -- the alpha channel of the diffusemap is already used, so trying to make it serve two purposes at once is just going to be a recipe for confusion.

 

If the alpha channel of the specular map is available though, I think it would be a no-brainer to implement this in the interaction shader -- maps with no alpha could behave in the default way, whereas maps with alpha could modify the glossiness form the default.

Posted

@ Flanders :

The look of things in ambient-light very much depends on how much shading is in the diffuse-map, if there is little to no shading in it, then there's only the subtle ambient-shading from the normal-maps trying to make things appear less flat.

 

There is no CVar controlling that effect, because its not possible to pass a value to the interaction-file.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...