Jump to content
  • Advertisement
Sign in to follow this  
EternityZA

how do i create this effect?

This topic is 2777 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use defered rendering. I use 4 render targets in my first pass. I want to know what i need to do in order to create an effect like this.

weapon glow

I dont know where to begin I dont even know where in the pipeline i would fit this in. Im guessing i have alot of reading ahead of me but i just need someone to point me in the general direction. Give me the term/terms i need to google.

Thnx In Advance!

Share this post


Link to post
Share on other sites
Advertisement
It is called glow effect.

I'm adding this effect to an existing scene using a sample application on Nvidia website :
http://developer.download.nvidia.com/SDK/10/opengl/samples.html

(The forth sample).

Basically we need to setup an FBO and send the particular objects to the FBO where the effect will be applied then we blend back the result to the frame buffer.

Share this post


Link to post
Share on other sites
Well, I guess it's just simple glowing particle system. it emits particle along the sword's blade using additive blending, and (perhaps) depth cueing..

Share this post


Link to post
Share on other sites
As already said, it looks like a bloom effect in combination with bright particles. When using a deferred renderer I would sugguest to use pipeline like this:

render phase:
- render g-buffer
- render particles
- render lights

bloom phase:
- scale down buffer to 1/2 to 1/4 and "extract" high luminance pixel (=> bloom render target)
- blur bloom render target (2 pass, separable gauss filter)

final composition phase:
- combine render buffer and (up-scaled) bloom buffer, i.e. by adding 10% of the bloom buffer to the render buffer



The interesting part is to extract high luminance pixels. Are you using HDR or LDR ? When using LDR the alpha channel could hold a luminance value. When your are using HDR you can tone map the render buffer to a brighter range and use some "soft" threshold to cut out low luminance areas.

Share this post


Link to post
Share on other sites
Those kinds of results could also be done through traditional particle systems -- in which case, you'd just be rendering a lot of blended quads after your lighting/geometry passes.

Share this post


Link to post
Share on other sites
is Bloom and glow the same thing?

Also what is meant by "extracting" high luminance pixels? Would i need to render "luminance" information to a texture at some point to distinguish between pixels that needs to glow and pixels that dont.

Share this post


Link to post
Share on other sites
Quote:
Original post by EternityZA
is Bloom and glow the same thing?

Also what is meant by "extracting" high luminance pixels? Would i need to render "luminance" information to a texture at some point to distinguish between pixels that needs to glow and pixels that dont.



Bloom and glow effects are more or less the same. One way is to render the "glowing" textures to a dedicated texture or atleast texture channel (alpha channel).

When you are using high dynamic range rendering and i.e. floating point render targets, you can extract high luminance values in a special tone mapper. I.e. your standard luminance value of standard lit surfaces is between 0..1. Very bright surfaces like glowing lava or highly lit surfaces will get values above 1.To determine the luminance of a RGB color you could use this simple code (GLSL example):

float luminance = dot(color.rgb, vec3(0.3,0.59,0.11))



Now you "copy" your render target to a tempory render target and apply a special tone mapper (=scaling down the high dymanic range to normalized,displayble values), this is sometimes called bright pass. The tone mapper should map low luminance values to very dark colors (i.e. all below 1 will be mapped to 0) and keep high luminance values. In your example images you would only see the blue/red particles and everything else would be almost black.

This render buffer will then be blurred to get the glow effect and after blurring you blend/add it to the original render buffer.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!