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.

Texture Import error width and height power of 2

Discussion in 'General Discussion' started by Ralph71, Sep 22, 2005.

  1. Ralph71

    Ralph71

    Joined:
    Sep 22, 2005
    Posts:
    2
    Hi there,

    I have a scrubs question (day 1 of the trial):
    When importing a 3DS file from a CD by Taschen (500 3D-Objects) I always (I tried 3 models) get the error that the textures have to be a power of 2 in width and height. -Why? Is that a restriction? Any workaround?

    Thanks

    Ralph
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You can scale up your texture in photoshop.

    This is because todays graphcs card do not have good support for non-power of two textures.

    Thus it is better to require that content is created in a format that is well supported.

    Specific issues with non-power of two textures
    * they are not supported on all graphics cards
    * they can not repeat
    * they can not have mipmaps
    * they make shaders more complex to write
     
  3. Ralph71

    Ralph71

    Joined:
    Sep 22, 2005
    Posts:
    2
    Hi,

    thanks for the fast response.

    1)
    I'm not sure, but the textures aren't quads, so what happens to the view of the object when scaling the texture? I suppose the wouldn't fit any more?

    2)
    The scaling is a lot of work. Do you think there is a batch processing possible? Have any scripts for batch this task? -By the way I only have fireworks.
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You could try making the texture the next power of two size.
    Then put the image in the top-left.
    And the lower part just remains white or whaver.

    Then you use the texture scale in the material to make the texture fit.
     
  5. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    If the models you're using are mapped correctly inside 3DS / 3DMax, you probably should just rescale the textures to a power-of-two. IIRC, 3DS stores the texture coordinates as fractions, so changing the texture size won't change how they map to the object.