Sun & halo

Hi everyone!

Have anyone noticed the cool effect of sun
in Homeworld2? Bright while you’re watching,
but becomes much less bright when obstacle is on the line of sight.

How to render this?

HDR is a possibility. The idea is to render a scene to a floating-point buffer, where intencity can be more than one and then rescale the intencity in respect to average scene luminance(exposure control). I don’t know if it is used in this game. They could be optimising this algorithm or maybe doing something elese…

Often discussed topic here, do a search for lens flares or halo on the board.

That can be achieved with the NV/ARB_occlusion_query extension.

Jan.

Pretty simple, but it depends on your chosen approach. You’re really looking for a light bloom effect.

One method is to render a really small view of the sun with the occluding objects in black, then you convolve that image and blend it over the scene as an additive textured quad over the appropriate part of the scene. This gives you a light bloom that geometrically matches the occlusion and light source interraction. It’s not really HDR , just a variation on post processing the scene.