PDA

View Full Version : Glow effect on a texture?


Renato Lima
10-16-2010, 08:46 AM
Is there a way of obtaining a glow effect on a texture?

Veleno
10-18-2010, 06:20 PM
Hi Renato Lima,

Can you elaborate a little on what kind of effect you are looking for? Specifically, are you asking primarily about making an object look self-illuminated, or do you want a more complex effect? Can you post an image of what you are trying to achieve?

Renato Lima
10-18-2010, 08:00 PM
Hello Veleno, I am trying to produce something similar to the Bloom Filter (which creates a glowing halo around bright objects) which is provided by PANDA3D. I don't know if Vizard has a plugin for doing this out of the box though.

Veleno
10-19-2010, 12:10 PM
Hi Renato,

This sort of effect is typically done though shaders (occasionally it is also done through billboarded sprites). Vizard has support for GLSL vertex and fragment shaders. I don't have such a shader on hand, but you may be able to find one online if you don't want to program one yourself.

Info on how glow shaders are implemented:
http://www.gamasutra.com/view/feature/2107/realtime_glow.php

Info on writing shaders:
http://www.opengl.org/code/category/C20

Renato Lima
10-24-2010, 10:57 AM
Thank you. In other words: Vizard does not support glow effects out of the box.

Veleno
10-25-2010, 04:27 AM
I can see you didn't like my answer. Vizard provides a set of tools for the user to work with, but it is up to the user to supply the raw materials. It has support for any GLSL pixel shader you wish to use. It is up to you to provide them much as you would a texture, environment, or the coding for your application.

Alternatively, for simple objects like lightbulbs, you can create a billboarded quad textured with a white map with a circular gradient in the alpha channel, and place these around the scene where you want the glow. You need to be careful to avoid having the glow intersect with other transparent objects as this can cause draw order problems. This was the method used in most games before complex shaders were around.