DeepTexel for Unreal Engine 5
Textures that keep their detail as the camera gets close. Where the view magnifies a texture beyond its real resolution, DeepTexel builds new, finer detail on the GPU from the texture's own finer regions (fractal self-similarity), up to 1,024 times its real resolution, only where you look, and blends it in seamlessly.
No AI model, no extra art, no network: each texture needs one small detail pack (about 2 MB), generated in the editor with a right-click in under a second.
- Requirements
- Quick start: the sample map
- Adding DeepTexel to your own mesh
- Reference
- Performance and memory
- Limitations
- Troubleshooting
- How it works
- Credits
Requirements
- Unreal Engine 5.8, Windows (Win64).
- DirectX 12 with Shader Model 6 (the default for new UE 5.8 projects). Any DX12 GPU that supports SM6 works; tested on NVIDIA (RTX 5080) and AMD.
- Project setting Engine > Physics > Support UV From Hit Results must be on (restart the editor after changing it). The component tells you in its Status and the log if it is off.
- For very close views (beyond about 6x), a small near clip plane (Project Settings > Engine > General Settings > Near Clip Plane, e.g. 0.05). The default 10 cm clips away surfaces you are closer than 10 cm to. The sample viewer sets it for you.
Quick start: the sample map
- Enable Support UV From Hit Results (above) and restart the editor.
- Open
Plugins > DeepTexel Content > Samples > FractalDetail_Sampleand press Play. (If the Content Browser shows no Plugins folder: its Settings > Show Plugin Content.) - Fly with WASD + mouse (E/Q up and down), or roll the mouse wheel to move towards whatever is at the centre of the screen. Speed follows the distance to the surface, so you can glide right up to the mosaic or the stone block. Press F to switch the detail off and on to compare. The top-left shows the magnification and the detail status.
The sample shows both ways to use the plugin:
- Mosaic: an
AFractalPictureactor, a ready-made framed picture. - Stone block: an ordinary static mesh with a lit material (
M_FractalDetail_Lit) and aFractalDetailcomponent, the way you would add it to your own assets.
Adding DeepTexel to your own mesh
- Generate the texture's pack. In the Content Browser, right-click the texture >
Generate DeepTexel Pack. A
<Texture>_DetailPackasset appears next to it. (Several textures can be selected at once.) - Use the material function. In the mesh's material, where the texture is sampled, put MF_FractalDetail instead:
UVinput: the mesh's UV0 (aTextureCoordinatenode, index 0, no tiling).Textureinput: the texture, as a Texture Object (parameter or node).Coloroutput: linear colour. Connect it to Base Color (lit) or Emissive (unlit), or into whatever the texture fed before.Samples/Materials/M_FractalDetail_Litis a complete example.- Add the component. Add a DeepTexel component to the actor and set its
Texture (the same texture) and Pack (its pack). If the actor has several meshes,
the first static mesh is used; call
SetTargetMeshto choose another, and set Material Index if the material is not slot 0.
That's all. Play, and move close to the mesh.
Reference
DeepTexel component
| Property | Default | Meaning |
|---|---|---|
| Texture | The texture to add detail to (the one the material shows). | |
| Pack | Its detail pack. | |
| Build Pack If Missing | on | Without a pack, build one when it first activates (a short hitch). |
| Material Index | 0 | The material slot using MF_FractalDetail. |
| Fractal Enabled | on | Switch the effect on and off at runtime. |
| Screen Wipe | 0 | Comparison split: detail only right of this screen position (0..1). |
| Performance | ||
| Activate Magnification | 0.25 | GPU resources are made once the view magnifies the texture this much (1 = real resolution). |
| Idle Seconds | 10 | ... and freed after this long without being looked at. |
| GPU Budget Ms | 2.0 | GPU time per frame for building detail (measured; the work adapts to it). 0 = fixed Ops Per Frame. |
| Ops Per Frame | 8 | Dispatches per frame before the first measurement, or always if GPU Budget Ms is 0. |
| Max Ops Per Frame | 64 | Upper limit per frame. |
| Sample Step | 2 | Match density: 2 = smoother, steadier edges; 4 = about 2.5x faster. |
| Look | ||
| Edge Protect | 0.7 | Keep clean straight edges and corners free of copied texture (0..1). |
| Deep Strength | 1.3 | Detail strength from the second level on (paintings ~1.3, photos ~1.0). |
| Detail Decay | 1.0 | Detail per level relative to the level above (photos ~0.9). |
| Detail Color | 0.4 | How much of the copied detail's colour to keep (photos ~0.2). |
| State (read only) | ||
| Status | What the component is doing, or what is wrong. | |
| Magnification | Screen pixels per real texture pixel at the screen centre. |
Blueprint: IsDetailReady() is true once every level the current view needs has been built
and faded in.
AFractalPicture
A framed picture: set Picture (texture) and Width, and on its Detail component the
Pack. Uses the unlit M_FractalDetail, so it shows the texture's exact colours.
Console variables
| Variable | Default | Meaning |
|---|---|---|
FractalDetail.MaxActive |
2 | How many components may hold GPU resources at once; the least recently viewed is released first. |
FractalDetail.MaxSlowdown |
20 | If the GPU builds detail this many times slower than an RTX 5080, the effect switches off for the session (0 = never). |
FractalDetail.Debug |
0 | Log what each component sees at the screen centre, about once a second. |
FractalDetail.TestShot |
Testing: save a screenshot here once the view's detail is complete. | |
FractalDetail.TestQuit |
0 | Testing: quit after the test screenshot. |
Log category: LogFractalDetail (activation, each level built with its GPU cost, release).
Performance and memory
Measured on an RTX 5080 at 1080p:
- Idle: components that are not close to the camera use no GPU memory and no GPU time.
- Active: about 0.75 GB of GPU memory per active component (search tables, work buffers,
ten detail levels). At most
FractalDetail.MaxActive(default 2) are active at once. - Building detail: about 2 ms of GPU time per frame (GPU Budget Ms), and only while a level is being built: each level takes about 0.1-0.15 s. A full close-up (9 levels) is ready in about a second; after that the cost is the material's blending only.
- Pack generation: about 0.2-0.6 s per 4K texture, in the editor.
- Slow GPUs: the plugin measures its own GPU time. On a GPU more than 20x slower than the reference (for example a small integrated GPU) it switches itself off and the material shows the plain texture.
Limitations
- Windows, DX12 / SM6 only in this version.
- The material's
UVinput must be the mesh's UV0 as-is. Tiling in the mesh's UVs is fine; scaling or offsetting UVs inside the material is not supported (the component locates detail through the mesh's UV0). - One texture per component (the one at the screen centre gets the detail). Use one component per mesh that should get detail.
- Regenerate the pack if you change the texture's pixels or size (the component reports a size mismatch). Compression settings can change freely.
- Detail is generated, not recovered: it continues the texture's own look at finer scales. It is not a replacement for real high-resolution source art where accuracy matters.
Troubleshooting
| Status / symptom | Fix |
|---|---|
| "enable Project Settings > ... Support UV From Hit Results" | Turn it on and restart the editor. |
| "inactive (not close enough yet)" | Move closer (see Activate Magnification). |
| Surface disappears when very close | Lower the Near Clip Plane (see Requirements). |
| "pack made for a W x H texture, image is ..." | The texture changed: regenerate its pack. |
| "off: GPU too slow for fractal detail" | See FractalDetail.MaxSlowdown. |
| "waiting: FractalDetail.MaxActive components are all in view" | Raise FractalDetail.MaxActive if you have the GPU memory. |
| Nothing happens, no status | FractalDetail.Debug 1 logs what the centre ray hits (the mesh needs collision). |
| "fractal detail needs Shader Model 6" | Project Settings > Platforms > Windows: DX12 and SM6. |
How it works
When the camera magnifies a texture beyond its real resolution, the component builds the next 2x level of a 1024 x 1024 patch around the point at the screen centre, and keeps going a level at a time as you get closer (up to 10 levels). For each small patch of the upscaled image it searches the texture's own example patches (320,000 of them, at two scales and in eight orientations, clustered into 1,024 groups by the detail pack) for the one whose surroundings match best, and copies that example's fine detail, scaled to the local contrast. Back-projection makes sure that shrinking the result gives back the original pixels exactly, so detail never changes what the texture looks like from further away. The same spot always gets the same detail.
Credits
Sample photos, both CC0 (public domain dedication), from Wikimedia Commons:
- Neptune and Amphitrite mosaic, Herculaneum, by Jebulon.
- The Wave rock formation, Arizona, by Romain Guy.
Support
Email universe@kportal.net with your engine version, GPU, and the component's Status or the
LogFractalDetail lines from the log.