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 Rgalaxy · Dec 03, 2013 at 05:43 PM · 2dobjectimage

[Closed]2D image as an object

is that possible to add 2D PNG image into the game? i try to do it, but i must add it to material, and attach it to any 3dobject or Plane if i want it to appear, but what i want is

i draw a tree on this image, save it as PNG, and i want it appear on Unity3d as a tree alone, without white background.. is that possible? because i watch on youtube, this man just add tree without white background but i dont know how to do it.. [this is the link][1]

see when he add this wooden fench, tree, and snowman, anybody could teach me how to do it? [1]: http://www.youtube.com/watch?v=9Vl166fVe8E

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

3 Replies

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

Answer by TonyLi · Dec 03, 2013 at 06:30 PM

Make the background transparent, not white, in your paint program. Then use a transparent shader in Unity.

Comment
Add comment · Show 6 · 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
avatar image robertbu · Dec 03, 2013 at 06:47 PM 0
Share

To Expand on @TonyLi's answer, you need to use an import setting in Unity that has an alpha channel. Only a fraction of the shaders support transparency. Start with Unlit/Transparent for the material you create.

avatar image Rgalaxy · Dec 03, 2013 at 07:10 PM 0
Share

emm, yeah i make it with photoshop and blank background, only a tree image, no background and save it as PNG file.,, and how do i use transparent shader in Unity @TonyLi

@robertbu ermmm, i'm quite dont understand how to do that, u mean i should use import option, and not just drag it to my project overview?

avatar image TonyLi · Dec 03, 2013 at 07:29 PM 0
Share

Here's one way:

  1. Drag the image into your project.

  2. Add a Quad to your scene.

  3. Drag the image onto the Quad.

  4. Select the Quad and change the material's shader to Unlit/Transparent.

You didn't specify whether this is for a 2D or 3D game, for a billboard, or what. You could also use a GUITexture, depending on your needs. And if it's 3D you might need to add a script to make it always face the camera, maybe something like this.

avatar image robertbu · Dec 03, 2013 at 07:38 PM 0
Share
  1. Drag the image into your progject

  2. Select your texture and in the inspector set Texture Type to "Advanced," turn off "Generate $$anonymous$$ip $$anonymous$$aps" and Set Format to RGBA 32 bit. Other setting will work, but this is a place to start.

  3. Create a new material and select Unlit/Transparent for the shader.

  4. Add your texture to the material.

  5. Drag and drop your material onto your Quad or Plane.

avatar image Rgalaxy · Dec 03, 2013 at 07:49 PM 0
Share

THAN$$anonymous$$S for @robertbu and @TonyLi

THAN$$anonymous$$S SO $$anonymous$$UCH !! it works so great :) Thanks a lot again !!

Show more comments
avatar image
0

Answer by JSierraAKAMC · Dec 03, 2013 at 06:45 PM

If you are using Microsoft Paint, it will not work. Instead, use GIMP or Paint.NET. Then, you can set the background to be transparent, as it is not available in Microsoft Paint.

Comment
Add comment · Show 1 · 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
avatar image Rgalaxy · Dec 03, 2013 at 07:11 PM 0
Share

yeah, i use photoshop and delete the background, so there is no background and i save the image as PNG, then after that, what should i do?

avatar image
0

Answer by ovi786 · May 05, 2014 at 05:06 AM

If you are using photoshop .Make the image background transparent and then Save the image as photoshop format and then attach it to your unity quad object.

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

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Adjust overlay position for different resolutions 0 Answers

How to load a BMP file in binary? 2 Answers

Adjust Image to Plane? 1 Answer

2d backgrounds - filling all screen sizes 1 Answer

How do I move my 2D object using arrow keys ? 4 Answers


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