Adding sunflare to a skybox

I’m experimenting with an old project of mine.
Making a night/day cycle skybox with material nodes.

I was wondering if anybody knows how to add a sunflare to it.
Preferrably with light data from a lamp, so that if you move the lamp the sunflare moves.

It’s not the goal to be super realistic just an indication of where the sun is.

Anything that could help me make it myself, tutorials, projects, documentation is welcome!

hi ProGamer , i make some test to generate a(fake) sunflare.

There is a PJ bllend file.

explanation are in text editor.

P to run.

a flare “come from” the blue cube.

the flare is visble when the camera is above and look at the blue cube.



sunflare_camera_bge_en.blend (260 KB)

Here’s another fun blend. This one is not a “flare” but generates a nice looking sun based on a sun lamp and a sphere.
Sun.blend (516 KB)

hi sdfgeoff

very nice and tricky effect.
I saw this in your last bgmc26 solar sailing game (good hypnotic mood …).

I guess you didn’t find that effect by reading blender or programmation pdf manual

I make some tests on your sun.blend file.
The result is very adapted for static point of view.
I try to move a camera or the orientation of the sun, artefacts appears.

You probably have seen that you don’t need to keep all the 163 vertices of the icosphere.
after some test the result seem good with 16 vertices.

I put the blend file test for people who want to learn or test this technique.

Thanks for your sharing.


Sun_light.blend (95.4 KB)

Parent the skybox to the camera and it’ll be fine.

I’ll be looking into these when i get back to blender, i’m having a little break right now holidays and stuff.