Working on some procedural materials and wondering if there's some way to get a sense of how much an area has been compressed or stretched from some resting position. Ideally this would be a vector value with direction of stretch.

I know there's the UV Stretch stretch feature in the UV editor as described here: Is there a way to show distribution of UVs as a heat map?

If there is some way to get these value into cycles I imagine it might be possible to calculate a vector stretch value for a neutral version of the model then subtract it from one for the deformed model.

My second thought is there may be some way to do this with OSL, but I've never dabbled into it before.

I'm currently digging into the Blender API and OSL to see if I can make my own script node for this, but I thought I'd ask the question here before I waste a bunch of time only to find out there's an easier way to do this.

  • 1
    $\begingroup$ No time to answer right now.. but 'Tension Map' might be a helpful search term. $\endgroup$ – Robin Betts Nov 29 '19 at 8:52
  • $\begingroup$ @RobinBetts Ah! That is a very helpful search term, thank you! $\endgroup$ – Tim Hope Nov 29 '19 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.