Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Prefabs vs Models & Materials vs Textures

Discussion in 'Editor & General Support' started by PixxyKilljoy, Oct 12, 2015.

  1. PixxyKilljoy

    PixxyKilljoy

    Joined:
    Oct 8, 2015
    Posts:
    24
    I'm still learning all about unity3d and modeling in general. I downloaded some free assets from the store to try and get the hang on things and did a bit of googling, but all it did is really confuse me more.

    What is the difference between materials and textures? All the free assets I downloaded, all the materials looked just like the textures. Like when I place the texture on the item, or the material, it looks identical.

    What is the difference between prefabs and models? I read that prefabs are suppose to be multiple objects, and a model is just a model, but from looking over the free assets I downloaded, some models consist of multiple objects put together, while most prefabs are single objects.

    So confusing to learn from scratch...o_O
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    A Material is the collection of settings / inputs that the shader needs to render the Mesh.
    A texture can be one of the inputs for the shader.
    If you get textures from the asset store you get in the most cases a material where the texture is already assigned to the diffuse color / Albedo slot.

    A prefab is gameobject or multiple gameobjects und one main gameobject that have been saved as a asset so that they can be reused easily.
    The models may behave if dragged into the scene similar to a gameobject but are the imported representation of a 3d model file.
     
  3. PixxyKilljoy

    PixxyKilljoy

    Joined:
    Oct 8, 2015
    Posts:
    24
    @fffMalzbier Hmm, okay I understand materials/textures a bit more.
     
    Last edited: Oct 14, 2015
  4. PixxyKilljoy

    PixxyKilljoy

    Joined:
    Oct 8, 2015
    Posts:
    24
    So for prefabs/models and all that... What should I make the things I make, when all I want is to make a ton of usable objects?
     
  5. OllyNicholson

    OllyNicholson

    Unity Technologies

    Joined:
    Jun 17, 2011
    Posts:
    142
    It depends on what they are used for. If you are making a playable character for example, you would need all the relevant scripts (e.g. player controller, animator, animations) as well as the model and materials, so making a prefab would be ideal. If you are just making a static prop or object then an FBX with embedded textures might be all you need. That said if you want to setup the material for use with Unity (e.g. Standard shader parameters) then you can only really store that info either in a scene (exported as a package for example) or a prefab with your model and textures in it. Here are some more links to help:

    http://docs.unity3d.com/Manual/Prefabs.html
    http://docs.unity3d.com/Manual/Materials.html
    http://docs.unity3d.com/Manual/Shaders.html
    https://unity3d.com/asset-store/sell-assets/submission-guidelines
     
    LagSik likes this.