Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Does Unity import texture coordinates as UVW (Vector3s) or does it discard the third coord?

Discussion in 'General Graphics' started by JRW_WSP, Mar 3, 2020.

  1. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    37
    Pretty much what the title says. I'm investigating Texture 2D Arrays and it would be very handy for my models (from 3ds Max via FBX import) to retain their W texture coordinate for use as an index value.

    Does this come over intact through Unity import processor or does it discard the W variable and mash it down to a UV Vector2??

    Anyone know?

    Cheers!
     
  2. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    37
    Oh well by all means someone correct me if I’m wrong but it looks like the FBX format itself stores UVs as only having 2 coordinates so I guess that’s the end of that plan.
     
  3. PacoChan

    PacoChan

    Joined:
    May 28, 2015
    Posts:
    44
    If I wanted to store some extra information, I would probably create another UV channel, or maybe store the data in the vertex colors if they are unused. Would that work for you?
     
  4. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    37
    Yeah that's the conclusion I've come to as well. Which should work fine - I just can't work out if I were to use vertex colors if the shader would end up interpolating and blending my textures or not. Which at the moment I don't want but maybe at some point I will. Anyway I need to do some tests!