Hey guys,
Planning on releasing a content plugin very soon that has this stuff all hooked up. In the mean time, here are some sizes and dimensions to consider for pseudo volumes. Note that currently the “create static texture” feature only works with power of 2 sizes.
16 ^ 3:
16 x 1 frames of 16x16 in a 256 x 16 texture
8 x 2 frames of 16x16 in a 128 x 32 texture
4 x 4 frames of 16x16 in a 64 x 64 texture
32 ^ 3:
32 x 1 frames of 32x32 in a 1024 x 32 texture
16 x 2 frames of 32x32 in a 512 x 64 texture
8 x 4 frames of 32x32 in a 256 x 128 texture
64 ^ 3:
64x1 frames of 64x64 in a 4096 x 64 texture
32x2 frames of 64x64 in a 2048 x128 texture
16x4 frames of 64x64 in a 1024 x 256 texture
8x8 frames of 64x64 in a 512 x 512 texture
100 ^ 3:
20x5 frames of 100x100 in a 2000 x 500 texture
10x10 frames of 100x100 in a 1000 x 1000 texture
128 ^ 3:
64 x 2 frames of 128x128 in a 8192 x 256 texture
32 x 4 frames of 128x128 in a 4096 x 512 texture
16 x 8 frames of 128x128 in a 2048 x 1024 texture
196 ^ 3:
14x14 frames of 196x196 in a 2744x2744 texture
200 ^ 3:
50x4 frames of 200x200 in a 5000 x 400 texture
25x8 frames of 200x200 in a 2500 x 200 texture
256 ^ 3:
32x8 frames of 256x256 in a 8192 x 2048 texture
16x16 frames of 256x256 in a 4096 x 4096 texture
324^3:
18x18 frames of 324x324 in a 5184 x 5184 texture
400^3:
20x20 frames of 400x400 in a 8000 x 8000 texture
You can also use some ‘fudged’ sizes like:
12x12 frames of 170.666x170.666 in a 2048.
This gives an effective volume texture of size 170x170x144. I used this in some early example images even though its not a true valid cubic dimension.
Also, I updated the PseudoVolume function to support different types of mip mapping and non-square layouts. This is a new download for common.usf for UE4.14.1:
https://www.dropbox.com/s/f7qm8uzx1kfy7un/Common.usf?dl=0
Here is the full function call:
float4 PseudoVolumeTexture(Texture2D Tex, SamplerState TexSampler, float3 inPos, float2 xysize, float numframes, uint mipmode = 0, float miplevel = 0, float2 InDDX = 0, float2 InDDY = 0)
As before you can still call it as just:
float4 PseudoVolumeTexture(Texture2D Tex, SamplerState TexSampler, float3 inPos, float2 xysize, float numframes)
By default this will look up mip0. If you want additional control, use these arguments (mip switch gets compiled out if you specify it using a constant):
// @param Tex = Input Texture Object storing Volume Data
// @param inPos = Input float3 for Position, 0-1
// @param xsize = Input float for num frames in x,y directions
// @param numFrames = Input float for num total frames
// @param mipmode = Sampling mode: 0 = use miplevel, 1 = use UV computed gradients, 2 = Use gradients (default=0)
// @param miplevel = MIP level to use in mipmode=0 (default 0)
// @param InDDX, InDDY = Texture gradients in mipmode=2