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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Modo importing cubes "wrong"

Discussion in 'Asset Importing & Exporting' started by Qualdan, Feb 9, 2013.

  1. Qualdan

    Qualdan

    Joined:
    Aug 5, 2011
    Posts:
    27
    I'm trying my hand at modeling and I've studied Luxology Modo now for a while.

    But when I import a simple cube from Modo, it doesn't handle the textures the same as Unity's own cubes. Why is that? And how could I fix it?

    I've attached an image to illustrate the problem. On the image there are six cubes (in groups of two) to show how the texture tiling should look and how it does not.

    $Cubes.jpg
     
  2. Jmonroe

    Jmonroe

    Joined:
    Jul 7, 2012
    Posts:
    118
    I have not had issues with importing from Modo. I'm not a pro but I believe the standard Unity cube has a different UV map versus your imported Modo cube.
     
  3. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    155
    It sounds like in Modo you've changed the material/texture tiling, this isn't exported with your object however.
    If you were to do this via the objects UV map, then it would.

    Have you tried to change the tiling inside of unity via the unity material/texture?
    This should fix your issue, material options such as that are software specific, and eventhough all software's seem to use them, you can't export the information for tiling textures and instead have to reach the same setup via the new software or via scaling your UVMAP outside of the default box

    If that didn't help I can explain further, I do not use Modo but I believe I understand the issue correctly.
     
  4. Jmonroe

    Jmonroe

    Joined:
    Jul 7, 2012
    Posts:
    118
    Yes, Squall is probably right. now that i look again it appears to be a tiling / offset difference with the shader in unity versus modo... Probably not a different uv map.
     
  5. Qualdan

    Qualdan

    Joined:
    Aug 5, 2011
    Posts:
    27

    Yes, I've tried changing the tiling and the offset, but I can't seem to get it working for all the sides. I can get one side looking good, but others will still be off.

    And no, I didn't change any materials in Modo. What I did to get the problem: I started Modo, created a simple cube (didn't alter it in any way), saved it into my Unity project folder and placed it in the Unity view. So for me that is the default what I get from Modo.

    So here is an image what happens if I change the tiling simply to x1/y1. So changing the offset doesn't help much, since I'd like to be able to get similar result with Modo cube as I get with Unity cube. I really appreciate any help you can give.

    $Cubes2.jpg
     
  6. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    155
    Can you please try reattaching the image as it doesn't appear to have worked.

    I didn't mean you changed the modo material, what I mean was simply that your material settings, even if the default material, arent exported.

    If you aren't changing the tiling at all then it honestly sounds more like Modo applies a default material with a default texture, this built in texture then isn't exported, so when you apply the same thing in unity, the tiling is different. Otherwise I'd suggest simply UVMAPPING your object.
     
  7. bjarkijonasson

    bjarkijonasson

    Joined:
    Feb 14, 2013
    Posts:
    2
    The cube is uv mapped automatically in modo when you create it, however that uv map isn't exactly optimal. It's in the shape of a cross (I'd show you a screenshot but I don't have modo on my laptop)

    Unity also creates a uv map for the cubes you create but that uv map is a lot different than the one in modo, it's more optimized and designed to be used with a tileable texture.

    You can easily fix this by uv mapping the cube yourself in modo before you export.
     
  8. Qualdan

    Qualdan

    Joined:
    Aug 5, 2011
    Posts:
    27
    That's weird, since the image shows up for me just fine. And now it seems the forum system doesn't allow me to upload any image...

    The cube does have the default material from Modo, but I've replaced it with Unity made material. I think the culprit really is the Modo UV map.

    I tried to alter the Modo UV map, but with my limited skills, I only managed to get one side tiling properly (which in itself is fine, since I can work with that).
     
  9. Molt

    Molt

    Joined:
    Sep 6, 2011
    Posts:
    103
    Meant to reply to this before but didn't have time to test things- I'v just had a quick play and it is the UVs, and I know how you can fix it.

    When Modo creates a cube it does the 'cross' UV mapping which doesn't work too well for these tiled textures but does allow each face to be mapped with a different image, when Unity creates a cube it maps each of the faces with the entire UV map- all faces are identical.

    To reproduce the Unity UV mapping in Modo try the following-
    - Create a cube.
    - Select all edges
    - Under the UV tab select 'Unwrap Tool', as all edges are selected they're treated as splits in the UV map and so each face is a separate UV island.
    - Enable 'Snapping' on the top bar, and in the Snapping popup (F11) choose Grid. Set the Action Center to Selection.
    - Select 'Vertices' mode. With the Snapping and Action Center configured correctly we can now drag vertices round and they'll snap to grid.
    - Move each vertex for each polygon individually so that each face fills the entire 0,0-1,1 region of the UV map. The polygons will go red to warn they're overlapping (it can cause problems in both Modo and Unity- I suspect it'll absolutely ruin Unity's lightmapping, for example) but is actually what we're aiming for here.
    - Save the result

    If you have problems I have a quick Unity project I knocked up to test this which you can grab from http://doomcake.com/unity_forum/uv_map_test.zip - it's basically a Unity cube and a Modo cube (.lxo included in Assets) next to one another and both mapped with a tiling texture which works on both. Some of the Modo faces aren't oriented the same way- I wasn't that picky when I chose which vertex to drag to which corner- but it should get the idea across.
     
  10. Qualdan

    Qualdan

    Joined:
    Aug 5, 2011
    Posts:
    27

    Thank you for that. At first try I messed with the vertices (and ended with some really ugly textures), but after checking the project you made, I was able to fathom a solution for my problems.

    I'm one step forward again. I think I can handle things from now on; at least before the next problem. =)

    Thank you all for your help.