Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Is a 'Quad' really 4:3 aspect?

Discussion in 'General Graphics' started by San_Holo, Dec 11, 2014.

  1. San_Holo

    San_Holo

    Joined:
    Sep 26, 2014
    Posts:
    152
    Hi..

    I've got my main title logo done in photoshop and it's quite high resolution and I noticed in Unity when I applied the PNG file to my quad that I had to manipulate the quad's scale to match my image aspect ratio, so I thought the quad looked square to me, 4:3 aspect, so I re-designed my PNG logo to 1000x1000 pixels and then re-imported then scaled up my quad by a factor of ten and my logo is off again, stretched slightly top & bottom... so I don't want to scale my quad again or do i have to? please advise... I'm just trying to match my logo/image to be pixel perfect and in it's correct aspect ration, perhaps applying to this quad could be the problem, anyhew, thanks
     
  2. Flailer

    Flailer

    Joined:
    Apr 1, 2014
    Posts:
    66
    For a start... 4:3 is not square. Otherwise it would be called 1:1...

    Code (CSharp):
    1.  void Start ()
    2. {
    3.      int height = Camera.main.orthographicSize * 2.0;
    4.      int width = height * Screen.width / Screen.height;
    5.      transform.localScale = Vector3(width,  height,  1.0f);
    6. }
    This wee bit of code might help you understand the relationship between a 1:1 quad and the camera orthographic size. Presuming you are using an ortho camera for your logo or splash screen..
     
    Last edited: Dec 11, 2014
    San_Holo likes this.