11
\$\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\$
4
  • 2
    \$\begingroup\$ You could just draw them onto your background? \$\endgroup\$
    – Shaun Wild
    Jun 30, 2016 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, 2016 at 15:04
  • 1
    \$\begingroup\$ Are you looking specifically for 2D solutions or 3D solutions? Does it matter to you? \$\endgroup\$
    – user1430
    Jun 30, 2016 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, 2016 at 13:45

4 Answers 4

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
  • 1
    \$\begingroup\$ Where did you get that screenshot? Just curious. \$\endgroup\$
    – Evorlor
    Jul 2, 2016 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\$
2
  • \$\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, 2016 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\$ Jun 30, 2016 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\$
0
\$\begingroup\$

When using Unity 2019.3, Universal Renderpipeline (URP) and specifically the 2D renderer, you can use 2D Sprite Lights. You need a texture (like what volvis shows), add a new "light/2D/Sprite Light 2D" to your scene and you can then select that texture as a 'sprite' in the property inspector.

For an official Unity sample, check out "Lost Crypt", look in the scenegraph under "Lights/Forest/Light Group-shafts", see the following image (note: the effect is more subtle originally, intensity was increased in the below image). If you try it, also check out the 'sun spots' which is very similar and also gives a nice effect.

Unity Lost Crypt Sample https://assetstore.unity.com/packages/essentials/tutorial-projects/lost-crypt-2d-sample-project-158673

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .