anyone knows a technique to make light rays visible?? or information about it?
anyone knows a technique to make light rays visible?? or information about it?
What you're looking for is called volumetric light. I've never attempted it before, but there's lots of info on google. Looks like you might need some complex math with shaders.
Programming Your Mom. http://www.dandongs.com/
Of course volumetric light is much more realistic, but you could just add fog and blending and with a few calculations you'll have a basic light ray! Simple and easily-rendered, but not very realistic. It's up to you.
Those i described are also known as static light rays because it's too much to recalculate them every frame, so you let them fixed at the position you want to appear as heavily lit or/and misty.
Light rays can be done via world-oriented primitives. The rays will need a density and some spacial information to render correctly.
Trying to do light rays in a shader is probably not going to yield the results you want. Post processing will probably not work b/c the image would have to be filtered many times to get a bright area to streak out enough to become a light ray. It is much easier to cast rays from the object in question to the light source creating the rays. If a certain percentage of the rays reach the light source you can then create a primitive along this ray and use colors to color the primitive to look like the color of the light source. Blending can be used to gradually blend out and/or alpha out the light ray primitive. Then post-processing can be applied to the final render which will create the bloom and glow you are looking for.
I highly recommend you read Real Time Rendering as it explains the concept very well. It is a great book if not the single greatest book about rendering ever published. It is now in it's third edition and is worth every penny. You will be hard pressed to find graphics docs on the internet that do not in some way reference material either in the book or by the authors of the book.