12
\$\begingroup\$

I'd like to create cartoon looking sun / light shafts that look very close (or identical) to the ones in very well known and loved games like Journey:

enter image description here

and Ori:

enter image description here

How can I accomplish this?

\$\endgroup\$
  • 2
    \$\begingroup\$ You could just draw them onto your background? \$\endgroup\$ – Shaun Wild Jun 30 '16 at 14:57
  • \$\begingroup\$ @AlanTuning and fade between them to simulate change? That would work well in 2D but Ori was made fully in 3D, it will work still as it's 2D perspective in 3D world, but it wouldn't work so well in 3D game like journey? :( \$\endgroup\$ – gEdringer Jun 30 '16 at 15:04
  • 1
    \$\begingroup\$ Are you looking specifically for 2D solutions or 3D solutions? Does it matter to you? \$\endgroup\$ – Josh Jun 30 '16 at 19:57
  • \$\begingroup\$ @JoshPetrie I would say 3D cause if I was to make a side scroller I would still deploy it in 3D world. \$\endgroup\$ – gEdringer Jul 1 '16 at 13:45
4
\$\begingroup\$

Use stretched particle to get the effect. In Renderer, choose "Stretched Billboard". Change Length Scale as you need. This can be used in both 3D and 2D scenes.

Ori additional effect

If you are actually into effect stuffs learn Shader. Mostly vertex and fragment shader. Drawing things is not always a solution. Build size increases due to extra artworks. Talking about overall effects. See Hearthstone's gold card effect.

\$\endgroup\$
  • 1
    \$\begingroup\$ Where did you get that screenshot? Just curious. \$\endgroup\$ – Evorlor Jul 2 '16 at 15:51
8
\$\begingroup\$

You mention you're using Unity so you can use their official "Sun Shafts" feature; it's built right into the engine: You can read these Unity Docs to get a good idea of what they're capable of and this YouTube video can walk you through implementing it.

By the way, you'll need to download the Unity Standard Assets in order to use then.

\$\endgroup\$
  • \$\begingroup\$ Hmmm, this video is very interesting. I was sure that you'll be able to see the sun shafts only if you look directly into the source of the light, as opposed to the picture of Journey. Will have to figure this one out ^^Thank you for the video though! Much appreciated! \$\endgroup\$ – gEdringer Jun 30 '16 at 15:18
  • \$\begingroup\$ These are not the type of Sun Shafts you'd use for a 2D game. See the Stretched Billboard answer for a more realistic (and performant) approach. \$\endgroup\$ – Selali Adobor Jun 30 '16 at 17:45
2
\$\begingroup\$

This is what we're doing and the results look somewhat like they do in Ori.

You need a texture for your light shaft that loops vertically. This is from our project (hence the watermark, sorry)

enter image description here

You add it to a particle material, and add the material to a Plane primitive. It should look nice and glowy.

Two more steps. One, you stretch the plane really tall. As tall as need be. And two, you animate the vertical offset of the texture via shaders or scripting. This makes the light look alive. Add tiny dust particles for extra finesse.

You could add a sort of fall-off effect too with shader scripting, but that's a more complicated matter.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.