How to get a single depth value of an object within a material?

How could you reliably get a single depth/distance value of an object within a material?

Using something like the depth buffer provides a separate value for each pixel, which warps textures when used for their UV input. I’m trying to figure out a way to get a single depth value without just getting a distance value from a blueprint during runtime.

I think it is named “Object location”, and there was something like “Actor world location”.
Kind of unsure of exact names for those nodes.

1 Like

Huh, more obvious than I thought it would be and this setup seems to do exactly what I need.

This is great yt around stuff you asked about:

ps. I google, then found out algorithm (formula) that creates pseudo random number based on actor (or object) world location. So it will always have same random for same location. So if you want it i can dig project and post.