Modular meshes texcoord

I was looking at this free package for UE4: http://www.supergrid.io/

And I’ve noticed one interesting feature: the textures auto-adjust to the mesh scaling. Check this:

grid_scale

Instead of stretching the texture, it looks like it creates an UV in realtime. How is that done?

My guess is that it uses tiling textures and a shader that constructs UV coordinates from the world position of the vertex and probably it’s normal instead of using UV coordinates in the model.

1 Like

Something like this - what the gif demonstrates - would not be very hard to make. Take a look at the dynamic geometry sample (34) and maybe try to add some interactivity to it. If you have any experience with mouse rays it should be clear after that how you could recreate this snapping box that writes UV coordinates together with any changes in the vertex coordinates.

3 Likes

Thanks for the tips, guys! I’ll take a chance on this.