informa
/
Programming
Featured Blog

How to create GodRays in Unity URP

Hello, this is Romain, VFX Game Artist at Dreamirl and today I'm gonna explain in this Article how to create a fake God Rays FX thanks to the Particle System.

Before we start, If you're curious about our ongoing project, it is live on Kickstarter and you can read all the information here.

You can’t create reals Volumetrics Light/God Rays in URP, I tried to workaround, and made these fake volumetric rays.

Start by creating your Material from a Particle Texture, let the Color and the Alpha to White be cause we will change them in the Particle System. Put it in Additive. You can find this Material in Universal Render Pipeline/Particles/Unlit.

Plug in the Material in the « Renderer » section of the Particle System to work asap in the best conditions.

Give him a 3D Start Rotation of 360 to to make them spawn with a random Rotation. You can also put your Render Alignment to « View » but I prefer that one. You can keep the default Start Lifetime of 5 but do not hesitate do change it.

Time to stretch it, change the 3D Start Size to give him a Ray look :

You can now choose your Color, for me it is a light Ocre. You can also play with the Alpha to Override the Opacity of your ray. That’s why our texture is Black and White, so you can change the Color here.

Time to choose a Shape, a Box should do the job. Tick the Emission and increase the Rate to make them pop the speed you want.

We definitely want our effect to fade-in and out. To do so, play with Color Over Time by adding a Ramp. The alpha might be like this, from 0 to 255.

GodRays moves because they are passing through vegetation, add a Noise and play with Frequency and Strength. You can go deeper is this Node but this is enough to get your Effect.

Now it’s time to custom your System by playing with all the Sliders. Test them all, try a different texture not adding more Components.

The Tutorial in Video :

https://www.reddit.com/r/Unity3D/comments/pfvnz6/how_to_create_godrays_in_unity_urp/

Consider give us a follow on Twitter, we are used to share our work in progress and blog posts like this one.

Specific to the game and Unity: https://twitter.com/JurassicSnap

The Studio in general: https://twitter.com/DreamirlGames

Thank you for reading!

Romain, Dreamirl.

Latest Jobs

Sucker Punch Productions

Bellevue, Washington
08.27.21
Combat Designer

Xbox Graphics

Redmond, Washington
08.27.21
Senior Software Engineer: GPU Compilers

Insomniac Games

Burbank, California
08.27.21
Systems Designer

Deep Silver Volition

Champaign, Illinois
08.27.21
Senior Environment Artist
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more