Jump to content
The Dark Mod Forums

Bloom in Saint Lucia


Dram

Recommended Posts

Not sure if anyone knows this, but bloom already exists in the SL build (off by default).

 

Do note that it can be quite taxing on performance, depending on settings.

 

EDIT: Apparently some files required for bloom were not included in the release, causing a black screen if bloom was turned on. If this is the case for you, then download this pk4 and place it in your doom3/saintlucia/ folder. It contains the two material files required for bloom to function correctly.

http://72.8.59.188/TheDarkMod/files/TDMBloom.pk4

 

Here are 4 variations of settings I use - low to ultra:

 

LOW:

r_bloom = 1

r_bloom_contrast_min = 0.6

r_bloom_contrast_mult = 1

r_bloom_buffer = 3

r_bloom_blur_mult = 0.9

 

MEDIUM:

r_bloom = 1

r_bloom_contrast_min = 0.75

r_bloom_contrast_mult = 1.15

r_bloom_buffer = 4

r_bloom_blur_mult = 1.05

 

HIGH: (Best IMO)

r_bloom = 1

r_bloom_contrast_min = 0.9

r_bloom_contrast_mult = 1.3

r_bloom_buffer = 5

r_bloom_blur_mult = 1.2

 

ULTRA:

r_bloom = 1

r_bloom_contrast_min = 1.3

r_bloom_contrast_mult = 2

r_bloom_buffer = 6

r_bloom_blur_mult = 1.5

 

The also an extra bloom control for turning on or off blooming of the HUD (off by default):

r_bloom_hud = 1

 

Different Settings for Bloom

 

Bloom Compare shot 1

Bloom Compare shot 2

Bloom Compare shot 3

Bloom Compare shot 4

 

 

Also, there is another wonderful little shader effect which you can turn on, making the game look like a noir cartoon (quite awesome actually. Again, off by default):

g_rotoscope = 1

 

This effect's performance impact is negligible, as no FPS drop could be seen.

 

Rotoscope Compare shot 1

Rotoscope Compare shot 2

Link to comment
Share on other sites

Added screenies...

 

Please note these wonderful effect shaders were donated to us by:

Hellborg - For his Rotoscope (Noir cartoon-like) shader

maha_x - For his bloom shader and source

 

Just thought they deserved a mention :)

 

 

Also it is possible to use either of these shaders in in-game cutscenes via map script. You would do this by executing the following script command within a function in your map script:

 

sys.setcvar( "g_rotoscope", 1 );

 

So if you wanted to (for example) have the map start off with the rotoscope shader you would just add that command to the void main() function in the map script. For example if we wanted this in Saint Lucia:

 

Change this in the map script in the .PK4 from:

void main()
{
	// key starts out hidden so that we can grab the cap before frobbing it
	$room2_key.hide();

	m_hatkey_hat_frobbed = 0;
}

 

To:

void main()
{
	sys.setcvar( "g_rotoscope", 1 );
	// key starts out hidden so that we can grab the cap before frobbing it
	$room2_key.hide();

	m_hatkey_hat_frobbed = 0;
}

 

This would mean that Saint Lucia would start out with the rotoscope shader on. You should not forget to set this to off however in a later function, or else it will stay on for the next map etc and the player would have to turn it off himself via console.

 

Hope that leads to some awesome cutscenes :)

Link to comment
Share on other sites

No probs, I posted this because I noticed that in an interview with OMGPCGames.com he asked whether we were planning on implementing bloom or not, and it has been in TDM for quite some time now. I believe even in Thief's Den - same settings.

 

The interview I'm talking about is here.

Link to comment
Share on other sites

I asked about the bloom in another thread too, because I am having a problem with it. When I enable it the screen turns black. The console says that textures are missing e.g. blurx1024, blury512. I patched Doom 3 to 1.3.1 number 1304. So everything should be fine. How come the textures are missing on my installation?

Link to comment
Share on other sites

Hmm, please check this:

Go into your saintlucia/ folder and find the materials/ folder, then check if within it there is a file named tdm_bloom.mtr

 

If it is not there, then copy an existing .mtr file, rename it to tdm_bloom.mtr. Then, open it, erase its content and paste the following into it:

textures/fsfx/blur
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	vertexProgram blur.vfp
	fragmentProgram	blur.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blurx2048
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blurx2048.vfp
	fragmentProgram	blurx2048.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blury1024
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blury1024.vfp
	fragmentProgram	blury1024.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blurx1024
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blurx1024.vfp
	fragmentProgram	blurx1024.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blury512
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blury0512.vfp
	fragmentProgram	blury0512.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blurx512
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blurx0512.vfp
	fragmentProgram	blurx0512.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blury256
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blury0256.vfp
	fragmentProgram	blury0256.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blurx256
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blurx0256.vfp
	fragmentProgram	blurx0256.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blury128
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blury0128.vfp
	fragmentProgram	blury0128.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blurx128
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blurx0128.vfp
	fragmentProgram	blurx0128.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blury64
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blury0064.vfp
	fragmentProgram	blury0064.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blurx64
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blurx0064.vfp
	fragmentProgram	blurx0064.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}

textures/fsfx/blury32
{
noshadows
noimpact
sort	postProcess
{
	if (fragmentPrograms == 1)
	rgba 1
	vertexProgram blury0032.vfp
	fragmentProgram	blury0032.vfp
	fragmentMap 0 _fsfx_input
}
{
	if (fragmentPrograms == 0)
	map _fsfx_input
}
}


textures/fsfx/blend_add
{
noshadows
noimpact
sort	postProcess
{
	colored
	map _fsfx_input
	blend add
}
}

textures/fsfx/current_blend_add
{
noshadows
noimpact
sort	postProcess
{
	colored
	map _currentRender
	blend add
}
}

textures/fsfx/blend_modulate
{
noshadows
noimpact
sort	postProcess
{
	map _fsfx_input
	blend modulate
}
}

textures/fsfx/blend_modulate_2x
{
noshadows
noimpact
sort	postProcess
{
	map _fsfx_input
	blend gl_dst_color, gl_src_color
}
}

textures/fsfx/invert_dst
{
noshadows
noimpact
sort	postProcess
{
	colored
	map _white
	blend gl_one_minus_dst_color, gl_zero
}
}

textures/fsfx/add_color
{
noshadows
noimpact
sort	postProcess
{
	colored
	map _white
	blend add
}
}

 

Then save it, and try bloom again. If that fails, then there must be another problem. What vid card do you have btw, and what operating system are you using?

Link to comment
Share on other sites

Thinking about it more, could be that you are missing the shader files themselves. Check your saintlucia/glprogs/ folder and look if you have the following files:

blurx.vfp

blury.vfp

blurx0064.vfp

...etc up to...

blury1024.vfp

 

If not, then let me know and I will package them up into a pk4 that you can plop into your saintlucia/ folder.

Link to comment
Share on other sites

Still a black screen, but at least he finds those two textures I mentioned earlier. My Pc is still not finding the following files in the textures/afx folder: afxweight, afxmodulate, afxadd . I am running WinXP SP2 with a Geforce 8800 GTS here. I also had Bloom running on my previous install of doom 3 and in thief's den (I think).

 

I just tried to enable it in base-doom3 and was pretty suprised to find out, that the command r_bloom didn't exist. I am going to download the patch your linking to and check out if the patch I had on my hdd is somehow corrupted.

Link to comment
Share on other sites

Still a black screen, but at least he finds those two textures I mentioned earlier. My Pc is still not finding the following files in the textures/afx folder: afxweight, afxmodulate, afxadd . I am running WinXP SP2 with a Geforce 8800 GTS here. I also had Bloom running on my previous install of doom 3 and in thief's den (I think).

 

I just tried to enable it in base-doom3 and was pretty suprised to find out, that the command r_bloom didn't exist. I am going to download the patch your linking to and check out if the patch I had on my hdd is somehow corrupted.

 

Bloom was a community addon, not a default doom 3 setting.

Link to comment
Share on other sites

Still a black screen, but at least he finds those two textures I mentioned earlier. My Pc is still not finding the following files in the textures/afx folder: afxweight, afxmodulate, afxadd . I am running WinXP SP2 with a Geforce 8800 GTS here. I also had Bloom running on my previous install of doom 3 and in thief's den (I think).

 

I just tried to enable it in base-doom3 and was pretty suprised to find out, that the command r_bloom didn't exist. I am going to download the patch your linking to and check out if the patch I had on my hdd is somehow corrupted.

 

Yeah, as NH said, it was a community addon which the developer allowed us to use.

 

As for those missing files, check your materials folder again, and look for tdm_bloom_afx.mtr. If you do not have it, again create a text file etc and paste this into it:

 

//################ Maha_x's materials ##########################
//	Modified by Clone JCDenton to work with Use_less bloom 
//########################################
######################
textures/AFX/AFXweight 
{
noshadows
noimpact
sort	postProcess
{	
	vertexProgram 	afxweight.vfp
	fragmentProgram	afxweight.vfp

	fragmentMap 0 _currentRender
	fragmentMap 1 _afxweight
}
}

textures/AFX/AFXmodulate
{
noshadows
noimpact
sort	postProcess
{	
	rgba 1
	vertexProgram 	afxmodulate.vfp
	vertexParm		0 parm0
	vertexParm		1 parm1
	fragmentProgram	afxmodulate.vfp

	fragmentMap 0 _fsfx_input
	fragmentMap 1 _afxweight
}
}

textures/AFX/AFXmodulate2
{
noshadows
noimpact
sort	postProcess
{	
	rgba 1
	vertexProgram 	afxmodulate2.vfp
	fragmentProgram	afxmodulate2.vfp

	fragmentMap 0 _fsfx_input
	fragmentMap 1 _afxweight
}
}

textures/AFX/AFXadd
{
noshadows
noimpact
sort	postProcess

{	
	rgba 1
	vertexProgram 	afxadd.vfp
	vertexParm		0 parm0
	vertexParm		1 parm1
	fragmentProgram	afxadd.vfp

	fragmentMap 0 _currentRender 
	fragmentMap 1 _fsfx_input
}

}


 

Hopefully that should make it work. Again, if it doesn't then check your glprogs folder and look for these files:

 

afxadd.vfp

afxblend2.vfp

afxblend.vfp

afxmodulate.vfp

afxweight.vfp

Link to comment
Share on other sites

Oh yeah, sorry, I am a little out of it today, but now I remember. It was a feature of the Maximum Graphic Mod. (Which looks astonishing by the way)

 

The .vfp files are in place and the patch was correct too. I assume there's another .mtr file missing which defines the afx shaders.

 

Edit: Darn, why do I always see your posts too late... ;) The other .mtr files didn't exist indeed and it works now. I guess you should provide a seperate download for these files or alter the SaintLucia.exe . r_bloom was actually the first thing I tried, when launching the demo. :)

 

Thanks for your help!

Edited by STiFU
Link to comment
Share on other sites

I have just been playing around with the bloom settings a little to find a setup suited for my sophisticated eyes. :laugh: I found that lowering the r_gamma setting and raising the r_bloom_src_mult instead results in a better/different contrast. (I used values of 1 and 1.7) This of course is just a question of taste. The world is rendered a little bit more fable-like with this adjustment, but I think it really fits into the overall atmosphere.

Link to comment
Share on other sites

The world is rendered a little bit more fable-like with this adjustment, but I think it really fits into the overall atmosphere.

 

That's exactly why we don't officially support it...the TDM universe is supposed to be (and look) gritty and realistic. But as you say, personal taste. :)

Link to comment
Share on other sites

Hi new guy here. :)

 

Now I'm having a problem with the bloom effect, anytime i enable it the game becomes upside down like i'm walking on my head. :z

 

I have a ATI 3870 card and i did everything Dram said. Please help.

 

Weird, could you post a screenshot please? Also, when it is upside down, is it perfectly sharp, or is the bloom being applied? It'll help narrow it down with a screenie.

Link to comment
Share on other sites

I saw that problem once upon a time on D3W, but I can't remember what caused it. It's a D3 issue, though, not specifically a TDM one.

Link to comment
Share on other sites

That is truly strange. It seems it is flipping the render image of the world and applying the blurred bloom image correctly.

 

BTW, did you create the two material files or did you just download the pk4 I posted above?

Link to comment
Share on other sites

<br />That is truly strange. It seems it is flipping the render image of the world and applying the blurred bloom image correctly.<br /><br />BTW, did you create the two material files or did you just download the pk4 I posted above?<br />
<br /><br /><br />

 

I downloaded the pk4 and created manually all the files that you said if missing to create.

Link to comment
Share on other sites

<br />But that still shouldn't cause the problem...<br />

 

Yes, i deleted the PK4 and the problem still remains. But one thing is certain, the bloom shader is causing this so something on it is making the engine go crazy on my end. :P

 

Can it be GPU driver related? I'm using the new 8.10 ones.

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 replies
    • 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
×
×
  • Create New...