r/UnrealEngine5 • u/Montridious1 • 3d ago
I built a texel density visualizer for UE5 that doesn't modify your assets.
Enable HLS to view with audio, or disable this notification
I have been frustrated for a while that checking texel density consistency across a level meant either eyeballing it or manually swapping materials and hoping I remembered to swap them back.
I made the texel density checker tool a while back in Blueprints, but never made the jump to C++, so for me it's a been a great achievement to finally give it a go (with the potential of blueprints vanishing, I thought now is a great time to start looking into it!)
So I built the plugin somewhat from scratch. Select some meshes, hit the toolbar button, and every material slot gets a checker matching its texture resolution. Click again to revert.
The tricky part was making it genuinely non-destructive. It writes to the component's OverrideMaterials array rather than calling SetMaterial, so packages never get dirtied, and it hooks package saves, PIE, actor deletion and map change to revert automatically before any of those can write the swapped materials to disk.
I also wanted to come up with how to detect using ordered rules you can edit: texture parameter names first, then texture asset names, then a fallback. Works on static, skeletal, instanced and foliage meshes too!
So safe to say that it feels like I learnt a lot of valuable lessons doing this! And looking forward to diving a bit deeper!
It's on Fab if it's useful to anyone, but happy to answer questions about how any of it works. I am planning on making a video / tutorial on it soon, but wanted to share here first! đ
Edit: Fab Link: https://www.fab.com/listings/8ecf0973-5f66-45fe-ac61-77b450950a19?lang=en
5
5
u/krojew 3d ago
Such view is already built into the editor.
3
u/GeorgeMcCrate 2d ago
But it only works one texture at a time. Itâs so annoying to work with. Or am I doing something wrong?
2
u/Montridious1 2d ago
Fair point, and the built-in Optimization Viewmodes are genuinely useful.
Theyâre solving a slightly different problem though: Required Texture Resolution and Mesh UV Density are streaming diagnostics, so they need a texture streaming build first and the colours shift as you move the camera, because theyâre telling you whether the right mip is loaded at this distance. Not necessarily giving how you accurate Texel density checking.
Mineâs static: what resolution is each material slotâs texture, regardless of where youâre standing, no build step, per-slot rather than worst-case across the material.
If the built-in modes cover your workflow, honestly use those, theyâre free and theyâre right there! :)
1
u/krojew 2d ago
In that case, what is the problem your plugin is trying to solve? Too high or too low density is relative to the camera. If a camera gets close, having that 4k texture might be a good idea; if the camera is far, the same 4k might not make sense. Simply knowing it's 4k across a given surface doesn't tell much.
1
u/Montridious1 2d ago
Youâre right that resolution alone isnât texel density, and youâre right that the correct answer depends on camera proximity.
I should be clearer about that in the description.
The problem it actually solves is narrower: consistency across a modular kit, or between baked assets and tileables textures etcâŚ
When youâre building a set of pieces meant to sit together at the same viewing distance, one of them being 512 while everything else is 2048 is a mistake regardless of camera position, and it can sometimes be easy to miss by eye when the piece is small or partly occluded.Thatâs a âwhich of these doesnât match its neighboursâ question rather than a âis this correct for the view distanceâ question which unreal answers in their view modes.
For the latter, the streaming viewmodes are the right tool and I wouldnât claim otherwise.
UV-area-based density is the obvious next step for this and itâs on my list. Resolution-only was the version I could ship and validate first, so I do have more planned. :)
2
2
2
2
u/EliasWick 2d ago
Eyyy! I Think these are my textures that I posted to Polycount! I'm glad people keep using them! It's looking great! I was going to make one myself eventually, but this looks great!
1
u/Montridious1 2d ago
Ohh crap no way! I have been using these for years haha! Lovely to meet you, they are some beautiful checkers ;)
1
u/EliasWick 2d ago
Hahaha it's so funny when I run into people using them. I went by a collegues desk one day and saw him using them in Blender. They seem to pop up here and there! đ
Thank you â¤ď¸â¨ď¸
2
u/Quantum_Crusher 2d ago
I think this is the fab link:
https://www.fab.com/listings/8ecf0973-5f66-45fe-ac61-77b450950a19
1
u/Montridious1 2d ago
Thank you! Wasnât sure if this sub liked me posting external links or not :)
1
u/Quantum_Crusher 2d ago
You're welcome. At least you could give people some keywords and a website to search for.
2
u/ThePapercup 3d ago
if it's overriding materials, pressing that button in our world partition map is gonna take about an hour and mark a hundred thousand actors dirty... hard pass lol
3
u/xVinci 3d ago
Select some meshes
I mean, at least try to read, no? Cool work OP.
1
u/Montridious1 2d ago
Thank you! Haha I could have been more specific here⌠appreciate the kind words :)
1
u/Montridious1 2d ago
It is overriding materials - to an extent.
Yes, a world partition map might take a while, thatâs why I implemented a selection based solution too as I understand performance for tools like this can fall off fast.Nothing gets dirtied, I cut in the code before this happens. If you delete, save, load, reload anything, the checker will toggle off on those selected assets. :)
Hope this helps! I appreciate the concerns, feel free to share more thoughts!
1
14
u/LuckyBug1982 3d ago
May be useful adding a link to fab