# How can I recreate this "simple" galaxy volume shader?

**URL:** <https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269>\
**Category:** FX\
**Tags:** unreal-engine\
**Created:** [January 10, 2020, 5:46pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269 "2020-01-10T17:46:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliengamedev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/juliengamedev/32/1091996_2.png) [@juliengamedev](https://forums.unrealengine.com/u/juliengamedev)\
**Post date:** [January 10, 2020, 5:46pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269/1 "2020-01-10T17:46:55Z")

</div>

The material in question:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/7/bb773eca960e508275c9345fb1405785eb802937.jpeg "Galaxy Volume Shader - Unreal Engine 4") ](https://www.youtube.com/watch?v=E2aq_Vm_PqA)

The last week I have been messing around with volumetric materials/particle emitters, but I can’t figure out how he did it like in the video. There isn’t really any information online about volumetric materials, only the basics and I haven’t been able to progress. I know how to make a spiral texture and so on, but not how to get this effect.

The author of this material mentions that \*\*\*the set-up is \*\*\*_ **supposedly very easy** _, so I am a bit confused.

Any help is highly appreciated.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [January 10, 2020, 8:45pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269/2 "2020-01-10T20:45:47Z")

</div>

Trying to do it in material editor only, or in Cascade / Niagara?

---

<div class="post-metadata">

**Author:** ![juliengamedev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/juliengamedev/32/1091996_2.png) [@juliengamedev](https://forums.unrealengine.com/u/juliengamedev)\
**Post date:** [January 11, 2020, 12:05am UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269/3 "2020-01-11T00:05:24Z")

</div>

> [@preston42382](#):
>
> Trying to do it in material editor only, or in Cascade / Niagara?

I’m trying it in Cascade right now, using a volume material and exponential height fog in the level.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [January 11, 2020, 2:10am UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269/4 "2020-01-11T02:10:01Z")

</div>

How about ultra-diffuse and faded lights (via an emissive material) inside the “arms” of the spiral galaxy. Use particle modules Initial Rotation, Velocity, Location, and Color Over Life (especially the Alpha feature of it) to determine where they’re at in the fog and shape them to a spiral. I don’t know how to do a spiral effect in materials yet. Have you tried using what you know about creating a spiral in a material? Another thing to look up for it, potentially, is blendables… with more than one particle system or between a particle system and a volume or other material.

> **[Blendables](https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/PostProcessEffects/Blendables/)**
>
> Blendables assets can be smoothly interpolated and used to affecting the rendering (e.g. post processing, fog, Ambient Cubemap, ambient occlusion).

---

<div class="post-metadata">

**Author:** ![juliengamedev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/juliengamedev/32/1091996_2.png) [@juliengamedev](https://forums.unrealengine.com/u/juliengamedev)\
**Post date:** [January 11, 2020, 10:49am UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269/5 "2020-01-11T10:49:40Z")

</div>

I currently use this material set-up:

[![](https://i.imgur.com/Yvg2jmZ.png) ](https://i.imgur.com/Yvg2jmZ.png)

I then use this material in a particle emitter and let it spawn one particle. This is what it looks like in the level using a directional light:

[![](https://i.imgur.com/0PUj4oH.jpg) ](https://i.imgur.com/0PUj4oH.jpg)

The volume is there, but it looks the _same from every viewing angle_, which is of course, the main problem.

Not sure how to progress. What I would need is an “extrusion”-like effect of the texture in the z-axis, so that its like a cylinder, if you know what I mean.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [January 11, 2020, 6:25pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-this-simple-galaxy-volume-shader/136269/6 "2020-01-11T18:25:36Z")

</div>

I see…lol…there’s a setting in the particle system Required module to change camera, isn’t there? Doesn’t it require non-uniform scale, and not always facing the camera on its flat material plane?

I think I understand the extrusion effect reference. Extrude, rather than stretch though its similar and can distort the image a ton, would be able to yield a more volumetric display of the fog so it can be modified to fit in a certain space and have certain form(s).

In the material graph of it, what’s it doing from Sine / Cosine over to the Append node? Are those sine and cosine functions over time or based on a different criterion?
