bloom effect.
Moderator: Moderators
bloom effect.
Is there a way to add a light bloom effect to spring?i think it might make the units look much better since it wil cover a bit for their edginess.
No, atm it is not possible with lua.
You need floating point textures for this (the lua api don't support them yet). Also the engine itself would have to render everything into a fbo (+fp texture), too.
Only reducing the colorspace into something more brown is possible (trepan already wrote something like this), but that's ... ehmm ... ugly.
You need floating point textures for this (the lua api don't support them yet). Also the engine itself would have to render everything into a fbo (+fp texture), too.
Only reducing the colorspace into something more brown is possible (trepan already wrote something like this), but that's ... ehmm ... ugly.
jK
Three strikes ... and you're out
1. The current lua OpenGL interface does support float textures.
http://trepan.bzflag.bz/spring/floattex.lua
2. You can do a lot more then just make things "more brown".
The example you're probably referring to was one of my very
first spring test shaders, intended to make spring look more
like an old photograph. It really had nothing to do with the
bloom shader effect, no more so than my grayscaling shader
that is was based on. Note that the weird interference lines
in the picture are supposed to be there, they look neat when
animated, imo.
http://trepan.bzflag.bz/spring/sepia.jpg
3. There are bloom shaders kicking around that do not use
fullscreen float textures. Besides rendering specific bright
objects into a float texture (not the whole scene), there are
also bloom shaders that simply do the blur filter on an integer
screen buffer. They naturally aren't is nice as a full blown
float texture setup. Google is your friend if you want more info.
Quiet is better than wrong.
Three strikes ... and you're out
1. The current lua OpenGL interface does support float textures.
http://trepan.bzflag.bz/spring/floattex.lua
2. You can do a lot more then just make things "more brown".
The example you're probably referring to was one of my very
first spring test shaders, intended to make spring look more
like an old photograph. It really had nothing to do with the
bloom shader effect, no more so than my grayscaling shader
that is was based on. Note that the weird interference lines
in the picture are supposed to be there, they look neat when
animated, imo.
http://trepan.bzflag.bz/spring/sepia.jpg
3. There are bloom shaders kicking around that do not use
fullscreen float textures. Besides rendering specific bright
objects into a float texture (not the whole scene), there are
also bloom shaders that simply do the blur filter on an integer
screen buffer. They naturally aren't is nice as a full blown
float texture setup. Google is your friend if you want more info.
Quiet is better than wrong.
1.
LuaTextures.cpp
-> dataType is always GL_UNSIGNED_BYTE, except for depthtextures
2. you tried to get 3 points? o_O
* it has something to do with a bloom shader, because it reduce the colorspace
* I know that you can do a lot more, but they requested a BLOOM shader
3. Yeah it is possible to redraw only specific stuff and blur this, I already do so in my Halo/Outline shader (also i plan a special bloom particle in LuaPaticleSystem). But a bloom shader is quite uninteresting for units (cause they don't emit light by themselves and their reflection leave
rarely the colorspace), and you can't (and don't want to) redraw the terrain/skybox within lua, but that would be the main part of a bloom effect. Also you can't use it with the ceg, what would be the 2nd main usage of bloom shaders.
LuaTextures.cpp
Code: Select all
...
GLenum dataFormat = GL_RGBA;
GLenum dataType = GL_UNSIGNED_BYTE;
if ((tex.format == GL_DEPTH_COMPONENT) ||
(tex.format == GL_DEPTH_COMPONENT16) ||
(tex.format == GL_DEPTH_COMPONENT24) ||
(tex.format == GL_DEPTH_COMPONENT32)) {
dataFormat = GL_DEPTH_COMPONENT;
dataType = GL_FLOAT;
}
glClearErrors();
glTexImage2D(tex.target, 0, tex.format,
tex.xsize, tex.ysize, tex.border,
dataFormat, dataType, NULL);
...
2. you tried to get 3 points? o_O
* it has something to do with a bloom shader, because it reduce the colorspace
* I know that you can do a lot more, but they requested a BLOOM shader
3. Yeah it is possible to redraw only specific stuff and blur this, I already do so in my Halo/Outline shader (also i plan a special bloom particle in LuaPaticleSystem). But a bloom shader is quite uninteresting for units (cause they don't emit light by themselves and their reflection leave
rarely the colorspace), and you can't (and don't want to) redraw the terrain/skybox within lua, but that would be the main part of a bloom effect. Also you can't use it with the ceg, what would be the 2nd main usage of bloom shaders.
Last edited by jK on 21 Oct 2007, 10:59, edited 1 time in total.
1. You should read the glTexImage2D a few times before
pointing to code that you obviously don't understand. It also
appears as though you didn't even bother to test the code
that I wrote to prove that they do work.
2. The sepia shader is a grayscale filter with a slight brown
tint, intended to reduce the image quality. Bloom shaders
aren't really meant to "reduce the colorspace". They smear
the bright sources across an area. Pick a better example if
you want to make a comparison with the intent of displaying
a limitation.
3. I'll paraphrase your response: yes, you can do bloom shaders
without float textures, even if jK originally said that it could not be
done.
pointing to code that you obviously don't understand. It also
appears as though you didn't even bother to test the code
that I wrote to prove that they do work.
2. The sepia shader is a grayscale filter with a slight brown
tint, intended to reduce the image quality. Bloom shaders
aren't really meant to "reduce the colorspace". They smear
the bright sources across an area. Pick a better example if
you want to make a comparison with the intent of displaying
a limitation.
3. I'll paraphrase your response: yes, you can do bloom shaders
without float textures, even if jK originally said that it could not be
done.
1. i did, it seems glTexImage2D() overwrites bad dataTypes, but this is not mentioned on its man page
2. "tone mapping" is THE problem of any HDR, it is also a science for itself (there are multiple ways to reduce the colorspace into visible space). A gaussian blur is easily written, the tone mapping is not.
(e.g. in the cartoon first the colorspace is reduced to brown, then darkened)
3. no, it is not. They requested a bloom shader, but atm it is only possible to blur the rarely occured overblending on units, what is not a Bloom effect (i.e. in the cartoon the enviroment is blurred). W/o blurring the enviroment you cut out the units (->don't want).
2. "tone mapping" is THE problem of any HDR, it is also a science for itself (there are multiple ways to reduce the colorspace into visible space). A gaussian blur is easily written, the tone mapping is not.
(e.g. in the cartoon first the colorspace is reduced to brown, then darkened)
3. no, it is not. They requested a bloom shader, but atm it is only possible to blur the rarely occured overblending on units, what is not a Bloom effect (i.e. in the cartoon the enviroment is blurred). W/o blurring the enviroment you cut out the units (->don't want).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
bloom is ok if used in moderation but imo its a unesscary comp strain id like nicer looking stuff without the need of bloom and bloom noawdays is over used
and i dont like how bloom looks on explosions tbh
but any feature wud help as said and modders coulc choose to use it in the mod just dont think bloom suits the TA based mods but for other ideas could look cool
but over bloomers must burn in hell ;]
and i dont like how bloom looks on explosions tbh
but any feature wud help as said and modders coulc choose to use it in the mod just dont think bloom suits the TA based mods but for other ideas could look cool
but over bloomers must burn in hell ;]
Re: bloom effect.
I hate bloom because the only time I see it happen in real life is when my glasses are dirty.
Re: bloom effect.
looks likethe bloom effect "may" be good. but... can it be a widget to switch on/off? then it would be convenient and if one with a poor computer has bad performance and low fps, he could switch it off easily at any time.
Re: bloom effect.
But usually, u don't play from this camera mode don't you? And if you cannot recognize your units because of the bloom effect, it's crappy, i think.HoneyFox wrote: looks likethe bloom effect "may" be good. but... can it be a widget to switch on/off? then it would be convenient and if one with a poor computer has bad performance and low fps, he could switch it off easily at any time.