Search Unity

Question Generating UV map programmatically with 3d and textures generated at runtime.

Discussion in 'General Graphics' started by Kafar, Apr 4, 2021.

  1. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Hello,

    I have a project to generate 3d objects from external data received. In these data I receive also images about the original real objects and I convert in textures.

    My big issue is apply the texture on the relative 3d objects because the UV mapping must be generated realtime and to be adapted for any specific 3d with texture. I tried various codes and tutorials. The results are the texture wrong applied, stretched or replicated. There is some code with the generic algorithm for my case? Someone can help me? Thanks.

    UPDATE: I forgot a detail: I need to apply the texture on the top side only of the 3D.
     
    Last edited: Apr 4, 2021
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Sounds like you want to use perspective projection mapping.