# Volumetric Space Environment With RayMarching

**URL:** <https://forums.unrealengine.com/t/volumetric-space-environment-with-raymarching/139229>\
**Category:** Game Development\
**Tags:** unreal-engine, Showcase\
**Created:** [March 3, 2020, 1:41pm UTC](https://forums.unrealengine.com/t/volumetric-space-environment-with-raymarching/139229 "2020-03-03T13:41:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameek4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sameek4](https://forums.unrealengine.com/u/sameek4)\
**Post date:** [March 3, 2020, 1:41pm UTC](https://forums.unrealengine.com/t/volumetric-space-environment-with-raymarching/139229/1 "2020-03-03T13:41:57Z")

</div>

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/1/891fd34dfa5131505fbfecfeeacd374174ceb785.jpeg "Volumetric Cloud Test With RayMarching in Unreal Engine 4") ](https://www.youtube.com/watch?v=m-EmTD_wiWI)

Initially my attempt was to learn how to procedurally create Nebulas for a space scene for a dark fantasy non linear game that I have been planning to start working on for a while now. This was few days ago when I had no idea how volumetric shaders work, and I had ended up building some cool looking shaders with world displacement that was rather looking like a Planet shader and not something like cloudy gaseous structure. Then I started to learn about volumetric shader development, when I came across the concept of RayMarching, and boy that felt like a paradigm shift once I started to understand how it works and got the hang of it.

Presenting a very early stage of how I utilized Raymarching for Volumetric Clouds in Unreal Engine 4. As of now, the clouds look comicky and not realistic, that is most likely because of the Noise shader I developed was a very simple Perlin-Worley noise. I will now start working on developing a more advanced Noise shader that might be able to give a more realistic look.

Took me about 3-4 days to understand Raymarching following a bunch of tutorials, how Perlin Worley Noise works with cloud generation, and to develop the below shader with what I learnt. The shader is currently very unoptimized, the frame rate drops exponentially the closer you go towards the position of the volume where the shader is applied.

 ![HighresScreenshot00000.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/d/8d24be4dcc685a57007799cbeddf689334df2310.jpeg)  
 ![HighresScreenshot00002.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/5/e53a1e67fcebf9ee13411497cb74a28d6bb986b1.jpeg)
