Project Ninja Star - help wanted - ported to windows on 26th
WEll basically i went onto this idea of creating sun and clouds, i have stumbled upon a project called ATMOsphere which had a sun going around and appropriate background on the skydome, also i have came across a project which generates clouds. BUT ALL THAT was not too realistic to be honest.
Here are my goals:
1) port some of ATMOsphere to get the sun and skydome
2) make a sun class (later use with shadows)
3) The sun would bloom
4) Then the moon would be introduced
5) It will bloom too and so will the stars
6) make some cloud generator that makes a secondary dome/plane under the skydome, puts the clouds onto the dome and lights them up according to a thickness map (how thick the cloud is), height map (the shape of the cloud viewed from below) and the position of the sun (might be more factors in the future).
7) There would be a global vector describing wind speed and a variable for time, so the clouds move across the dome/plane
finally the clouds (and the map/buildings) would be rendered in block colour (the clouds wouldn't because they would be rendered in black but their thickness would determine the alpha) from sun's point of view and therefore cast shadows on the ground
9) if there is anything i missed out let me know
Now what i need to know, how do i make the sun bloom ( i know its a bit similar to gaussian blurr, but doesn't the shader need to know where the sun is in the bloomed frame??)
Secondly is there no other way to do shadows than to render the whole scene in black from the light's point of view
third would it be better to make a shadow map (like the shadows being cast down on the ground) or a light map (everything is rendered in black, and the backbuffer is cleared with sun's color at that time) so the visible objects get lighted up.
Lastly how do i project the shadows into the scene, in other words how do I put the shadows on the ground ??
Here are my goals:
1) port some of ATMOsphere to get the sun and skydome
2) make a sun class (later use with shadows)
3) The sun would bloom
4) Then the moon would be introduced
5) It will bloom too and so will the stars
6) make some cloud generator that makes a secondary dome/plane under the skydome, puts the clouds onto the dome and lights them up according to a thickness map (how thick the cloud is), height map (the shape of the cloud viewed from below) and the position of the sun (might be more factors in the future).
7) There would be a global vector describing wind speed and a variable for time, so the clouds move across the dome/plane
finally the clouds (and the map/buildings) would be rendered in block colour (the clouds wouldn't because they would be rendered in black but their thickness would determine the alpha) from sun's point of view and therefore cast shadows on the ground
9) if there is anything i missed out let me know
Now what i need to know, how do i make the sun bloom ( i know its a bit similar to gaussian blurr, but doesn't the shader need to know where the sun is in the bloomed frame??)
Secondly is there no other way to do shadows than to render the whole scene in black from the light's point of view
third would it be better to make a shadow map (like the shadows being cast down on the ground) or a light map (everything is rendered in black, and the backbuffer is cleared with sun's color at that time) so the visible objects get lighted up.
Lastly how do i project the shadows into the scene, in other words how do I put the shadows on the ground ??
[ link(without the spaces))] http://en.wikipedia.org/wiki/Bloom_(shader_effect) [ /link ]
aka, bloom is per scene, not per object.
aka, bloom is per scene, not per object.
i know that and been on that page
but the whole scene will be bloomed
I still need to show/designate the lightsource, it talks about using the alpha as the thing. Any idea how to do in irrlicht
P.S. I'm stupid, just make a render target texture, render the sun and clear the backbuff with white and the parts that are not white are glow sources.
but the whole scene will be bloomed
I still need to show/designate the lightsource, it talks about using the alpha as the thing. Any idea how to do in irrlicht
P.S. I'm stupid, just make a render target texture, render the sun and clear the backbuff with white and the parts that are not white are glow sources.
The concept of a proper bloom IS that the whole scene is bloomed. You render to a bigger color range than your final output (or later scale), then take all extreme values and have them leak around, through a blur algorithm or similar concept. Then, put the value in a proper range (255) and render to screen.
Just an idea:
But you can also have "fake-HDR" (like in MGS 3, for example). You just "degrade" the color for "bloommap" (image, which will be rendered
"upon" the actual viewport) by some value (that means - you subtract the value from every color channel). Also the resolution of "bloommap" must be lower (to achieve the effect of blooming). Then brighter the object is, more it will glow (you can control it by "the value" - bigger value = less glow). Also, there can`t be any negative (or higher than 255) values (so if it`s < 0, then it`s 0) ... and you can multiple "the value", so the glow will rise more dramatically.
But you can also have "fake-HDR" (like in MGS 3, for example). You just "degrade" the color for "bloommap" (image, which will be rendered
"upon" the actual viewport) by some value (that means - you subtract the value from every color channel). Also the resolution of "bloommap" must be lower (to achieve the effect of blooming). Then brighter the object is, more it will glow (you can control it by "the value" - bigger value = less glow). Also, there can`t be any negative (or higher than 255) values (so if it`s < 0, then it`s 0) ... and you can multiple "the value", so the glow will rise more dramatically.
Poor man's bloom:
Take pic. Make a smaller copy and darken it a lot. Put back on top of other additively. That's the cheap way. Hence only "bright" (high rgb value) will leak to surrounding. Of course, using a proper blur, higher range and such will give you a way nicer bloom. You can also do this "cheap" version a couple of time iteratively with smaller and smaller pic that also get more and more darkened (yes, you can reuse the one previously made for that)
Take pic. Make a smaller copy and darken it a lot. Put back on top of other additively. That's the cheap way. Hence only "bright" (high rgb value) will leak to surrounding. Of course, using a proper blur, higher range and such will give you a way nicer bloom. You can also do this "cheap" version a couple of time iteratively with smaller and smaller pic that also get more and more darkened (yes, you can reuse the one previously made for that)
Isn`t it just more demanding version of what I wrote?Dorth wrote:Poor man's bloom:
Take pic. Make a smaller copy and darken it a lot. Put back on top of other additively. That's the cheap way. Hence only "bright" (high rgb value) will leak to surrounding. Of course, using a proper blur, higher range and such will give you a way nicer bloom. You can also do this "cheap" version a couple of time iteratively with smaller and smaller pic that also get more and more darkened (yes, you can reuse the one previously made for that)
Re: [HELP WITH BLOOM AND SHADOW]Codename: Ninja Star
I just love this one...devsh wrote:P.S. I dont see much difference between C and C++
Co-Inventor of ZIP files.
Hardware - play with it long enough.. it BREAKS
Software - play with it long enough.. it WORKS
Hardware - play with it long enough.. it BREAKS
Software - play with it long enough.. it WORKS
No ... because the "bloom" texture will be smaller (for example 4 times), one pixel of this texture will be (for example) 4 pixels fullscreen, so surrounding pixels will be changed. I admit it won`t look as good as classical glow, but it`s easier to integrate.Dorth wrote:Prott, nah, 'cuz the whole idea behind bloom is that light captured with a lense will "leak" behind surfaces and such. Yours would only augment pixel already lighted, making the contrast sharper, missing the surrounding pixels which should also be splashed by that taint.
EDIT: I tryed to fake it in 2D and it looks pretty like crap. So the scaling-up technique seems useless.
Last edited by Prott on Mon Mar 23, 2009 5:28 pm, edited 1 time in total.