Search Unity

Problem with UV Map - 3ds Max to Unity

Discussion in 'General Graphics' started by jricardomiguel, Aug 9, 2017.

  1. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    Hi,

    I mapped a wall in 3ds Max (following some tutorials), but when I import the UV Map to Unity and create a material it gets out of range. Can someone tell me why?





    Is the same wall, with the same dimensions...

    Thanks.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I think this is because you have a UVmap above the unwrap in the modifier stack. The UVmap is probably planer which is applying the entire texture, 0 to 1, sheet to the wall instead of keeping the unwrap coordinates in place.
    Remove the UVmap and you should be good to go.
     
  3. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    I make a video to explain all process.



    What am I doing wrong?
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Everything starting with the texture baking. That isn't needed. The map applied after the Unwrap was just fine.
    Why progress with the bake texture process?

    To make it even more simple - you can export the model with simple UV box mapping if the texture looks fine to you. No need to even unwrap if box mapping looks good enough.
     
  5. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    Since what minute am I doing wrong?

    I need to unwrap because I want to go to Photoshop and edit the maos to add some dirty brushes, etc.

    I'm going crazy with this, I've been in this for 3 days. :/
     
    Last edited: Aug 11, 2017
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I don't know why the model is not keeping the UVs. I never bake textures out of Max like that - so that might be the problem.
    And why are you changing the material ID to matID2? If you keep it on matID1 does it still mess up?

    What happens when you export the model separately - all by itself? does the texture still mess up?

    If you are still experiencing problems - try this.
    Unwrap the model like you already did.
    Generate a UV template in the unwrap dialogue.
    Go into photoshop.
    Apply the texture in photoshop to the UV template.
    Apply your dirt brushes in a couple new layers.
    Flatten the texture - or keep is as a psd.

    Import into Unity - the model with only edit poly and uvunwrap, on Material ID 1, no uvmap or bake texture.
    Import into Unity the texture from photoshop.
    Apply the texture to the shader.
     
  7. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    You're doing your UVs on map channel 2. Unity uses the UVs from map channel 1 (UV Set UV0 in Unity) for the main texture, and will basically ignore or completely overwrite the second UV map channel (UV Set UV1 in Unity) for light mapping, though the standard shader can use UV1 for detail textures as well if you're not using light mapping.
     
  8. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    I will try with UV1 channel.

    But I have a doubt... I put in channel 2 because when I scale the UV unwrap in UV editor I lost the scale of texture in model... You can see this on the video. How can I fix this?
     
  9. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Use UV map channel 1.
     
  10. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    I used UV map channel 1, you can see in the video... But when I choose UV map channel 1 in UV map and UVW Unwrap, after rescale the wall in UV Editor the texture changes again the scale... This is the problem..

    What workflow you use for this case? I only want to apply the textures in 3ds Max, make a render to texture to open in Photoshop and import to Unity.

    PS: if I make a UVW Unwrap, render only the UVW Template and apply the textures in Photoshop, works... In 3ds Max and Unity. But the problem is that I want to texture the model in 3ds Max and no in Photoshop... It's possible?
     
    Last edited: Aug 12, 2017
  11. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    If you do the same process you're currently doing, but copy your map channel 2 back to map channel 1 after you've done your bake it'll work properly in Unity.
     
    theANMATOR2b likes this.
  12. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    Ok, I finally solved the problem. I leave here the tutorial that I followed for who in the future had the same doubt.

     
    Last edited: Aug 12, 2017
  13. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    Mates, very thanks for your help!

    I have only more doubt! When I reimport the UVW Map for new material, the quality in viewport is low, but when I render the image its fine, like you can see in the printscreen:



    How can I put the quality in the scene better? Thanks.
     
  14. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    1. Right click on the viewport display settings - realistic, shaded, wireframe etc etc. Go to materials and select realistic materials with maps.
    2. Right click on the + symbol in the top left part of the viewport, select configure, select the display performance tab, change the viewport images and texture display resolution. Default is 512 - to keep power of 2 you should go up to 1024 or 2048 or higher. Viewport fps might drop depending on your system.
     
    jricardomiguel likes this.
  15. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    Thanks my friend.

    And what program you use for make Normal Maps, Ambient Occlusion, Height Maps, etc? For example, for this texture how can I generate this maps?

     
  16. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I'm a little old school. I generate normal maps with the Photoshop plug-in Nvidia normal map tool. Either that or 3D Max on characters to bake highpoly down to lowpoly.

    Crazy bump and xnormal are popular - though I've only used crazy bump once.

    As an animator I don't do much environmental work, most of my work is related to characters and animations.
     
    jricardomiguel likes this.
  17. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Crazy Bump was one of the first "generate normal maps from a photo" programs out there, but it's relatively expensive and there are a ton of free alternatives that are just as good.

    And by "just as good" I mean not all that good. Generally speaking you shouldn't be generating normal maps from a photo, but you can get something that's okay with it.

    For the texture you have above, it's basically large marble slab tiles, which the normal map for that should basically be perfectly flat with some edging around the black lines between. AO would be the same. Crazy Bump or the alternatives are going to create a bumpy mess with that texture.
     
    jricardomiguel and theANMATOR2b like this.
  18. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    Hi mates, one more question. Where can I make normal, bump, ambient occlusion, etc maps from this texture?


    I created this in 3ds max like you know, and now I need to generate normal maps, bump maps, etc like this:







    Where can I create maps like this?
     
    Last edited: Aug 15, 2017
  19. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Anywhere. Max can generate these maps in the render elements (same as texture baking the diffuse) Photoshop changing the diffuse texture via blending options or other options, Crazybump or xNormal? or other tools.
     
  20. jricardomiguel

    jricardomiguel

    Joined:
    Feb 10, 2017
    Posts:
    27
    But when I render normal maps or bump maps in 3ds max or Substance Painter makes a square with solid color (rose for normal and grey for bump). Why?

    Look for this example of one column:

     
    Last edited: Aug 17, 2017
  21. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Because your meshes are flat.

    The way you make normal maps like your example is you build a high polygon mesh with all of the details you want as the reference.

    For your purposes you may not need any normal map. As I said most of your surfaces appear to be flat tiles. However you can search online on your own for how to author normal maps.

    You're looking for short cuts, which something like CrazyBump would work as, but the real answer is the way you make these textures is by doing the work to author them manually. If you don't want to do that try getting textures packs that already have all of the necessary textures that Unity needs.
     
    Last edited: Aug 17, 2017
    theANMATOR2b likes this.
  22. atcjavad

    atcjavad

    Joined:
    Jan 8, 2018
    Posts:
    14
    Hey guys
    I lost couple of weeks because of this problem , I hope to guide me to solve it
    I dont know about 3Ds max , But my friend made a 3D MAX project with Vray ,
    When i made a FBX export from a simple Max project , I could see all of Textures in unity without any problem ,But When i made a export from complicated project that was created by Vray , I didnt have Texture in it , but i saw all of textures in Modle name.pfm , but it could not assign these textures to Shapes .

    I checked all of ways , but i couldnt be successed .
    THX in advance