Your thoughts on and comments to Volume Rendering in Unreal Engine 4.

Hey! I ran into this when trying integer textures for DICOM rendering. the trick is to use asint() and asuint() in the materials.
Spent 2 bloody days banging my head against the wall, but then I tried this and it worked (also worked for R32_(S)INT and R8_UINT, as far as I remember).
But In the end didn’t end up using integer textures, as stuff looks just too blocky without interpolation.

But yeah, if you create a texture as an INT texture somewhere in code, then you can read from it in materials like this:


int LabelValue = asint(VolumeTexture.Load(int4(CurPos, 0)));

same with asuint();

Try putting that in a custom node and returning it, should convert the int to a float and make it useable further down the road.

note - int4(pos, 0) is for volume textures, 2D will have int3(pos, 0).

Hope this helps somebody, because I wasted way too much time on this :smiley:

Also, for people interested - I made a plugin that works with a custom build of 4.22 for volume raymarching using actual VolumeTextures,
Check it out here :
https://forums.unrealengine.com/comm…n-and-labeling

Currently figuring out how to redo it in a way that does not need a custom engine build, seems like it’s possible (and will be a lot more elegant).