Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Any way to generate curvature texture?

Discussion in 'World Building' started by DGordon, Jun 24, 2019.

  1. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    It would be great if we could generate a curvature texture to use for some nice edge weathering effects. As it is, I can't think of how to do this except for exporting a probuilder mesh as an fbx/obj, bringing it into external software, and then bringing that texture in. Any chance theres a way to generate this data off the mesh? Im looking to use this in a splatmap painting tool Im writing, so Im hoping to find a way to generate an actual texture with this data I can use as a weathering mask.

    Thanks!
     
  2. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    So if anyone cares, Im going down the path of finding the normal for every face and creating a weight for each edge between faces based on the difference of the normals. I _think_ that should give me what I want ... a higher value for a higher angle. Ill need to play with it, etc etc ... but in case any one else is thinking about this, Im just sharing.

    It would be nice if we could get this type of thing built into Unity someday, just because Im sure a lot of people would find baking textures out of meshes useful (I saw someone is making an Asset for it). But ... I wont hold my breath. I can only imagine the stuff they actually do have on their plate ...
     
    Last edited: Jun 24, 2019