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
0
Question by tomeromero · Dec 02, 2010 at 11:47 PM · javascriptgameobjecttexturegraphics

simple texture question

Hi.. I am planning to make a 2d Platform Game.

But first i have to ask you something about textures.

Lets say that i want to put a cube in my scene. And i want to put a texture on my cube. Like the image below..

alt text

Its a cube and a texture applied on the cube.

Well if i want to do the same thing like the image above what i have to.. I mean in the photoshop ?

Possible answer

Just do the picture on the photoshop exactly as the image above, add it to unity, create a material, add the texture(image) in the material and add it to the cube.

Is this ok to do it...??

And if i do this i will have the same result ass the picrure??

Thank you

Comment
Add comment
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

1 Reply

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

Answer by pyro · Dec 03, 2010 at 12:47 AM

2D Textures are usually square textures (256x256, 512x512, 1024x1024) created in photoshop. You can create a bunch of 2D graphics and squeeze them on one 1024x1024 texture usually referred to as a sprite sheet.

In order to show a 2D texture on a 3D object, the 3D object needs to be UV Mapped, this is done in a 3D modeling application.

In your example, a cube, depending on how you UV map your cube, it will affect the look of the texture on the cube. In some cases where each face is mapped to the same UV coordinates, you can drop a texture on it and it will show up on each face like how you are thinking.

However, if you're doing 2D you should forget about using cubes and focus on one face of the cube (aka a plane). In particular your plane should only consist of 4 vertices (a quad), then you would UV map that plane to a particular spot on your 2D texture sprite sheet. Make sure the 3D quad objected is rotated so that its always facing the camera and you have yourself a basic billboard sprite.

If you don't feel like doing all of that work though you could always look into SpriteManager (SM2) which will make the process of creating sprite sheets and mapping them easier as well as greatly simplifying sprite animation.

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

No one has followed this question yet.

Related Questions

Can someone help me fix my Javascript for Flickering Light? 6 Answers

background picture in my game 1 Answer

Setting Scroll View Width GUILayout 1 Answer

Procedurally combine (merge) two Texture2D 2 Answers

How to tell if 2 blocks are next to each other in a 2d game? 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