Ray marching without custom node

I followed a ray marching tutorial : video
I would like to bring ray marching into UEFN, but a current limitation is we cannot use custom code nodes. Does anyone know of a ray marching setup (can be simple, no lighting/shadow needed) using nodes only? Here is the code I would like to replace:

float accumdens = 0;

for (int i=0; i<MaxSteps; i++)
{
 float cursample = PseudoVolumeTexture (Tex,TexSampler, saturate(CurPos), XYFrames, NumFrames).r;
 accumdens += cursample*StepSize;
 CurPos += -LocalCamV*StepSize;
}

return accumdens;

You can effectively just “unroll” the loop by encapsulating one iteration through the loop in a material function and then chaining X copies of the function together (where X is the number of raymarching steps).


From TechArtAid’s video where he does this

It’s a horrible, ugly, painful way to work, and since you can’t exit the loop early it also won’t be performant… but when you can’t write a loop… well…

Haha thank you for this, isn’t pretty but will definitely work!