Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs or learn how to Submit Your Own Blog Post
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 informations here : https://www.kickstarter.com/projects/dreamirl/jurassic-snap?ref=creator_nav
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.
Read more about:
Featured BlogsAbout the Author
You May Also Like