Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by imnickb · Dec 16, 2011 at 03:36 PM · 2dimagescaleplanepixel

How should I size a plane to put images on?

I'm adding a background to a scene and I have a photo I'd like to use for the background. The image is 800 pixels by 600 pixels and I can easily crop that if need be. To get the image into Unity, I created a plane and applied the image as a texture to the plane. I see some stretching and resolution issues and I'm wondering the best way to make sure the plane is the exact size as the image.

From what I understand, Unity scale is in units and there is no standard such as 1 unit = 1 meter or anything like that. It seems that a unit should represent what ever scale I'd like it to represent. Is there any settings where I decide how many pixels there should be per unit ?

Also, I've read the information about textures needing to be a power of two which makes me wonder about how exactly I can use an image where in my case, the width is 75 percent the length of the height. I guess this would be a case where I use the "Non Power of 2" option in the advanced texture type in the import settings?

As you can probably tell, I'm quite new to this and any help would be appreciated. Thanks!

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image imnickb · Dec 16, 2011 at 03:40 PM 0
Share

I just had a quick thought... I realize that to texture a 3D object, it must be uv unwrapped in the modeling application so that the correct texture size can be created. I'n my case, I'm working in the opposite direction; I need to start with the image and create a plane to perfectly fit the image. Any ideas on the best way to do this would be greatly appreciated. Thanks!

avatar image flamy · Dec 16, 2011 at 04:06 PM 0
Share

my suggestion would be to make the image itslef to be some powerof 2 and import. there are actually 2 ways one is abruptly convert the image to the size u want, which may not work in most cases, and the other is to keep tht 800x600 image and add alpha to the remaining area to get a 1024 x1024 image!! and adjust the texture offset and texture scale of the material to get the 800x600 image ( basically changing the uvs)

for the plane i actually would take a 1x1 plane and would set the scale to (800 , 600 , 0), that would be easy to handle!

avatar image imnickb · Dec 16, 2011 at 04:32 PM 0
Share

I don't think the first option will work, as the display the image will be shown on is 960 pixels x 640 pixels and ideally I'd like to crop the image to those dimensions if possible. I think your second idea might work by adding an alpha channel to the rest of the image to make it 1024 by 1024 and then adjusting that to fit.

I'm not sure the 1x1 plane will work, as that will create a 1 unit x 1 unit plane and scaling it to 800 x 600 would make it 800 x 600 units, not 800 x 600 pixels. Also, I've read that scaling in unity is not ideal and it's better to scale your objects before importing and not in the editor, as that is an unneeded performance hit.

avatar image flamy · Dec 16, 2011 at 04:57 PM 0
Share

im having a whole iphone game with more than 200 objects(everythig is 1x1 plane that is scaled!!) i dont find a difference in my profiler! and 800x600 units or pixel it doesnt matter really does it( i mean when the camera is orthographic and set to a size that is supported for iphone devices)!, this way i run the same game on 3gs and 4g (retina) w/o any change..

anyway it was jus a suggestion, everything depends on how u want to go finally!

avatar image Lo0NuhtiK · Dec 16, 2011 at 06:17 PM 0
Share

I didn't see anything about scaling being an unnecessary performance hit, I could be wrong on that, but what I read about the scaling had thing's to do with the physics engine. Scaling during runtime might be performance related, but I don't see why it'd bother anything scaling it in the scene editor.

"From what I understand, Unity scale is in units and there is no standard such as 1 unit = 1 meter or anything like that."

The physics stuff had to do with the scale of the objects because Unity DOES use a standard unit which IS unit=1 meter ; so, for example, a car that is 500 units long x 300 units tall is going to act retarded. ... That's what I got out of the scaling stuff I read, anyway.
Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by imnickb · May 10, 2012 at 01:44 PM

In case anybody is interested, I ended up creating the plane in Blender. There's an option in blender to "Import images as planes." That gives you a plane textured with your image that you can then import in Unity.

http://blenderartists.org/forum/showthread.php?239832-Creating-a-texture-before-a-model&p=2008176&highlight=#post2008176

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

doubt with pixels per unit 1 Answer

Adjust Image to Plane? 1 Answer

Unity3D - Plane Scale To Pixel 0 Answers

Adjust overlay position for different resolutions 0 Answers

How to keep any object at the specifield seen size when change the screen resolutions. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges