Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 Krahazik · Aug 26, 2017 at 07:10 PM · materialstexturing

How do I apply a texture to an object?

The manual is useless as all it sais is apply texture to material. Thats it? Never mind that there are several places within the material editor to apply an image and so far, none of them have resulte din texture being applied to object using the material.

I have an object with a perfectly smooth untextured surface that has a color. Nothing I do changes that. I can effect how reflective it is or not, translucency, emission etc, but no texture.

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
6

Answer by Eno-Khaon · Aug 26, 2017 at 07:50 PM

This is a fairly normal predicament to run into, so don't worry. Many people have been unclear on this in the beginning.


First, just to make it clear what's happening, you don't directly apply the Texture to anything. You apply the Texture to the Material (for example, generally under the "Albedo" section of the Standard Shader, which you'll see upon creating a new Material), then you apply that Material to your 3D object.


That may sound a little unintuitive at first, but to understand why it's done this way, let's take a quick look at what happens behind the scenes:

In order for the computer to draw the 3D object, it's sending information to the video card and basically saying "Hey, draw this!" Well, the video card has to make sense of it first. That's what the Shader is for. The Shader tells the video card "When you're drawing something, draw it like this" and gives a huge number of instructions to the video card saying how to draw it.

Finally, this is where the Material comes into play. The material is there to take the Shader, which says *how* to draw something, and and the Texture, the thing to be drawn, and combine them. This way, you can reuse the Shaders without needing a different version for every Texture used with them.


So, in a nutshell, a Material will do what you're looking to do. You add your Texture to the Material, then put the Material on the 3D object to display it using the Shader.

Further, in your case, the Material already has a Shader applied to it when it's created, so you only need to add the Texture at that point.

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 Glurth · Aug 26, 2017 at 08:14 PM 0
Share

great answer! One thing I would rephrase/expand on:

The shader defines how to COLOR each pixel of your 3d object. It is a process/function/routine/algorithim (not data). The $$anonymous$$aterial defines some of the shader function parameter's data, which is passed on to the shader. This includes the texture, along with things like reflectivity and stuff.
(During rendering, the data that defines the 3d shape/position/orientation of the object is also passed to the shader.)

Each material specifies what shader it uses to render; changing the shader used by the material, will/may also change the material's options you see in the editor.

You probably don't need to mess with what shader is being used, for your situation (you CAN program your own shaders): but it's important to understand how they fit in the pipeline.

avatar image
1

Answer by Glurth · Aug 26, 2017 at 07:52 PM

(Assuming you are using the "standard shader" for your material) Click the dot-in-a-circle-button next to "Albedo" to select the texture image. alt text

This should set the texture of the material. I used to the builtin "background" image in this example. Here is what the material preview looks like after selecting it:

alt text


materialimage.png (9.4 kB)
materialimagesample.png (16.7 kB)
Comment
Add comment · Show 4 · 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 Krahazik · Aug 26, 2017 at 09:37 PM 1
Share

I see the texture in the material preview when applied to Albedo, but it is not reflected in the scene edit or game preview windows?

avatar image Glurth Krahazik · Aug 26, 2017 at 11:09 PM 0
Share

If you DO see it in the texture preview window, that implies the reason you don't see the texture in the scene, has to do with the way your scene is configured. What happens if you create a default-new scene, add a cube, and apply the material to the cube? If that fails, try again, but with a brand new project; it might due to some project-wide graphics or lighting setting.

avatar image Krahazik Glurth · Aug 26, 2017 at 11:36 PM 0
Share

Sure enough, the texture from the material is being displayed on the cube in the new test scene.

However when I place the hallway section I am working with into the scene, none of the objects making up the hallway show the texture, but the test cube still shows the texture from any of the materials applied to it.

Show more comments
avatar image
0

Answer by kami1339 · Feb 08, 2019 at 12:23 PM

If you try add a video to object! 1-add comopenent >video>replace your video 2-create>RenderTexture 3-your object >videoplayer>render mode>change to render texture. 4-your object >videoplayer>target texture> replace your render texture(you made in step2) 5-your object >shader>place your render texture(you made in step2) in Albedo 6-your object >shader>place your render texture(you made in step2) in Emission color. 7- tick &choose emission .

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

73 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 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 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 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

Fresnel shader and mixed textures 0 Answers

Texturing Basics - Adding detail to materials while condensing your UV map 0 Answers

Texture not applied on model... 0 Answers

Using multiple materials on a object 2 Answers

Multiple Tiling Textures in the Same Material 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