Author Topic: Post-processing  (Read 71659 times)

0 Members and 1 Guest are viewing this topic.

Offline Hery

  • 26
The problem is solved. Tomorrow I will experiment with DaBrain suggestion to make extreme colors glow and then I will post updated builds.

 

Offline Topgun

  • 210
we should map intensity to a new map/channel, rather than making glow be based on color.

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Here's my log

At least the EXE is no longer crashing upon start.

I have a Radeon 4650 card, by the way.

[attachment deleted by admin]
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
we should map intensity to a new map/channel, rather than making glow be based on color.

That would involve altering the current ship shaders... (Even then I don't know if it's actually possible...)

I doubt that is a good idea until Hery is done with the resource and material systems.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Nighteyes

  • 211
can't we just make the glow maps glow? and on top of that the regular specular bloom?

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
That's the same thing Topgun asked for.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Hery

  • 26
we should map intensity to a new map/channel, rather than making glow be based on color.
Bloom is based on luminance, not color.
Personally, I don't see many reasons to use G-buffer to store bloom intensity.

Quote
can't we just make the glow maps glow? and on top of that the regular specular bloom?
If you make them bright enough they will glow.

@Tolwyn: what about -post_process flag?

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
If you make them bright enough they will glow.
Glow as in X3: Terran Conflict glowmap glows? Show me.

 

Offline Hery

  • 26
They have to be bright enough not to be cut off by high-pass filter.
Ok, I agree that it is a good idea to make bloom at some places more intense than at the another, but that won't be achieved until alpha channel is used by opaque objects. However, that will be only an addition to the current effect that probably will make things easier.

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
@Tolwyn: what about -post_process flag?

Crap. Knew I forgot something...

[attachment deleted by admin]
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Hery

  • 26
brightpass-f.sdr
Code: [Select]
uniform sampler2D tex;

const float Luminance = 0.08;
const float fMiddleGray = 0.18;
const float fWhiteCutoff = 0.8;

// High-pass filter
void main() {
vec4 ColorOut = texture2D(tex, gl_TexCoord[0].xy);

ColorOut *= fMiddleGray / ( Luminance + 0.001 );
ColorOut *= ( 1.0 + ( ColorOut / ( fWhiteCutoff * fWhiteCutoff ) ) );
ColorOut -= 6.0;

ColorOut = max( ColorOut, 0.0 );

// ColorOut /= ( 10.0 + ColorOut );

gl_FragColor = ColorOut;
}


 

Offline Nemesis6

  • 28
  • Tongs
I have encountered two bugs with last downloadable version posted by Hery: 50% of the time, upon loading up a mission from the standard campaign, I'll get an error about some thing that didn't load or something, didn't get to see it in full, sorry. Second, when I check the spinning weapon animations on the loudout screen, one will be replaced with a kind of template image. Lastly, on the Knossos portal, the surfaces would have a sort of purple shine, like the glowmap or something is missing. Got some screenshots, looking for the location they're saved now.
« Last Edit: October 13, 2009, 11:06:52 am by Nemesis6 »

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
In your FS2 folder, there should be a folder called screenshots. The images will be there in tga format; you'll need to convert them to jpg or png before uploading.

If you're on Vista or 7, and FS2 is in C:\program files\, you may need to click on the "Compatibility files" button in the Explorer window that shows up when you're looking at the FS2 folder.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Nemesis6

  • 28
  • Tongs
http://img394.imageshack.us/i/screen0001.jpg/
http://img384.imageshack.us/i/screen0002.jpg/

I'll see if I can get some of the errors... damn, lazyness is a burden.

 

Offline Hery

  • 26
There was a bug that lookd similar to this but I'm nearly 100% sure it is already fixed. Have you checked if this happens on other builds?

Error messages in FSO are ususally copied to the clipboard.
I would like you to run this mission on debug build and send me the log (which is in Data/fs2_open.log in the main fs directory).

Update: I've played a mission with Knossos and env mapping looks similar to the "problems" on your screenshots. Are you sure it's not a feature but a bug? :P
« Last Edit: October 13, 2009, 11:52:35 am by Hery »

 

Offline Nighteyes

  • 211
Any idea why its working in one mod and in another not? in Earth Defence its working, but in Diaspora all i get is a hud and a black screen, while the game plays in the background...

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
brightpass-f.sdr
Code: [Select]
uniform sampler2D tex;

const float Luminance = 0.08;
const float fMiddleGray = 0.18;
const float fWhiteCutoff = 0.8;

// High-pass filter
void main() {
vec4 ColorOut = texture2D(tex, gl_TexCoord[0].xy);

ColorOut *= fMiddleGray / ( Luminance + 0.001 );
ColorOut *= ( 1.0 + ( ColorOut / ( fWhiteCutoff * fWhiteCutoff ) ) );
ColorOut -= 6.0;

ColorOut = max( ColorOut, 0.0 );

// ColorOut /= ( 10.0 + ColorOut );

gl_FragColor = ColorOut;
}



Still no difference...

Code: [Select]
Frame  0 too long!!: frametime = 57.573 (57.573)
Got event GS_EVENT_ENTER_GAME (2) in state GS_STATE_BRIEFING (10)
Entering game at time =  78.280
render_target: creating new 256x256 FBO
texture_pool: creating new 256x256 texture
texture_pool: creating new 256x256 texture
  Compiling special shader ->  post-v.sdr / brightpass-f.sdr ...
  Compiling special shader ->  post-v.sdr / blur-f.sdr ...
Fragment shader failed to compile:
Fragment shader failed to compile with the following errors:
ERROR: 0:2: '' :  #version must occur before any other statement in the program
ERROR:  compilation errors.  No code generated.

ERROR! Unable to create fragment shader!
Post-processing disabled.
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

  

Offline Hery

  • 26
@Nighteyes: No idea until I see the debug log. That's an old bug that I completely forgot about. Additionally, I haven't heard of any other mod that has such problems with post-processing.

@Tolwyn: that's a big difference :P Now, the whole brightpass-f.sdr code is acceptable for Ati cards. The problems causes bloom-f.sdr, but to fix that I'll have to do some modifications in FSO code, so the build will be available later.

Update:
Cockpit clipping problem: solved.
A few of the large number of problems with shaders on Ati cards: solved.
Additional modifications: more intense bloom (if you don't like it, then just take advantage of -bloom_intensity flag :D )

Download

Please, attach debug log to your bug report. That will make solving problems much easier and faster.
« Last Edit: October 13, 2009, 02:27:43 pm by Hery »

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Allright, updated shaders and the EXE and run the debug build again. Here's the output.

Code: [Select]
Frame  0 too long!!: frametime = 37.147 (37.147)
Got event GS_EVENT_ENTER_GAME (2) in state GS_STATE_BRIEFING (10)
Entering game at time =  60.702
render_target: creating new 256x256 FBO
render_buffer: creating new 256x256 render buffer
texture_pool: creating new 256x256 texture
texture_pool: creating new 256x256 texture
  Compiling special shader ->  post-v.sdr / brightpass-f.sdr ...
  Compiling special shader ->  post-v.sdr / blur-f.sdr ...
  Compiling post shader (0x1f) ->  post-v.sdr / post-f.sdr ...
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Hery

  • 26
There is no error message in that part of the log, so it means that all shaders compiled without problems. However, in most cases the first post shader is 0 (no 0x1f). Is this a post-processing demo mission or have you changed anything in post_processing.tbl?