Search Unity

Adding textures to .obj files

Discussion in 'Getting Started' started by Ranger_DeVill, Oct 2, 2020.

  1. Ranger_DeVill

    Ranger_DeVill

    Joined:
    Mar 20, 2020
    Posts:
    1
    Hello everyone,

    I have a problem with viewing a 3D object which has been given a texture. I would like to clarify that I'm a complete noob when it comes to Unity and adding textures in general, but I was hoping that someone more experienced could help me with that.

    So..... here it goes.

    I want to create an Android app which displays a 3D object and the user has an option to rotate it and scale it. The idea behind the app is to have a dark background and display a white room (walls + floor) with blue edges in places where planes intersect. Something like the attached image "test.jpg", but ... you know. Actually white :p (thumbnail below).

    test.jpg


    I've decided that I would do that by having a 3D object and putting a white texture on it, which would be a white square with colored edges.

    What I did so far was:

    Start a new unity project with a 2D template.

    Set up the camera's color to dark and have it as the app's background color.

    Create a 3D object in CATIA and save it in Blender as an .obj file.

    Import the .obj in Unity and place an instance of it on the canvas.

    Create a new material with a legacy-diffuse shader.

    Create a texture (thumbnail below)

    texture 3.jpg

    Select the texture as a target for the shader.


    My problem is that the image is ..... ugly (thumbnail below).

    test2.jpg

    It's all dark blue and muddy and .... well.... it's a uniform color. I don't know why that is. I've tried changing the texture's resolution because I've thought that maybe it's too big for the object or something but no change. I've also added a cube which has the same material applied. It's definitely better in that I can see the blue edges, but it's still muddy and grey. That 'greyness' is not related to the camera color, because I can change it to white and the texture is still dark. I've also thought about adding lighting as maybe that's the case but still no cigar.

    Could someone help me with this?

    I'd really appreciate it.


    Cheers,

    Rafał
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Okay. Did you properly UV unwrap the models in blender?