Volumetric Shader Using RayMarching

In an attempt of creating Realistic looking Nebula for my game, I was studying about Raymarching for a while, and how we can implement it in unreal. I was looking into Ryan Bruck’s awesome work and progress on this for volumetric clouds generation, and got a chance to play around with custom developed raymarching shader for about a week, but my main focus has been to generate a Nebula and not a clouds.

So I created a noise material that provides texture sheets of 16x16. I am baking the texture sheet as render target, and feeding the render target in a materila to create PseudoVolume Texture. Then with density raymarching I created volums that is fixed inside a given bound, and I added tweakable parameters that let me customize properties like color, density , shadow, threshold, etc.

I created this thread to share my updates as I progress. Showing few snapshots of very early prototype of my work so far.

b03a77327f96374495363bb61d539b8baa99e781.jpeg

1ebcb79b8e6b4932de4108b5b164ae7539ae5a7c.jpeg

910811d3b5cafa185f5a8fc5d3e66c4d6ae63038.jpeg
https://forums.unrealengine.com/core/image/gif;base64

0563d3502a0dd328fb26cbfc8cfc9e778796d52b.jpeg

WIP - Mesh to Volume Converter.

This is an early demonstration of the tool I am working on that would convert any static mesh into volumetric texture sheet, which can then be used for Volume Rendering. I believe this will greatly aid in defining the shapes of the Nebula via static meshes.

1 Like

Working on Custom Perlin Worley Noise generation system that would let me define the shape of the volume

Added Billowy effect to the custom Perlin Worley noise to make more cloud like structure. Result looks promising.