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

Export Cinema 4D UV Map to Unity

Discussion in 'Asset Importing & Exporting' started by aled96, Sep 6, 2014.

  1. aled96

    aled96

    Joined:
    Mar 9, 2014
    Posts:
    39
    Hi, I follow a tutorial the following tutorial :

    (It is in italian)

    I want to export the 3d object to unity, but I don't know how can I export the UV Map to...

    I see the object black in unity, someone can tell me how can I create a texture or something else that can be opened in unity ??

    If someone knows how can I do, please tell me :D

    Thank you :)
     
  2. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Your model needs to have one UV Map (one UV tag) assigned to it, first and foremost. If there are more than one then Unity will select either the leftmost or rightmost as the first UV channel to assign your map to. I forgot the order - no matter what you should have only one, anyways except you're going to Lightmap manually.
    Then you need to have a material assigned to your object and this material needs to have a bitmap texture assignet in the color channel. Doesn't matter if it's the actual texture or not but there needs to be a bitmap assigned. You will change this later in unity anyways.
    Then - finally - export as OBJ or FBX.
     
    aled96 likes this.
  3. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    For your diffuse texture map, make sure the main colour is set to white (see attached).

    If you baked your texture map in C4D. The texture is likely in the Luminance channel of C4D. Move it to the colour channel before exporting to FBX.

    EDIT: Sorry Motionblur, posted same time.
     

    Attached Files:

    • c4d.jpg
      c4d.jpg
      File size:
      56.1 KB
      Views:
      1,253
    aled96 likes this.
  4. aled96

    aled96

    Joined:
    Mar 9, 2014
    Posts:
    39
  5. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Yes because you are changing the UV coordinates. Rather than UV map, the texture has been mapped via the Offset and Tile properties in the C4D attribute manager as shown in your image with Color. When you put the texture in the Luminance channel, these properties are at their defaults values as shown in your second image.
     
    the_motionblur and aled96 like this.
  6. aled96

    aled96

    Joined:
    Mar 9, 2014
    Posts:
    39
    How can I obtain the same effect of Luminance, in unity 3d ? How can I export it ?
     
  7. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    You see that "Offset U" and "Offset V" values in the lower right corner of your screenshot?
    This means that your color map is offset against your UV coordinates.

    Do this: go into UV Mode in Cinema and load your texture into memory. Then display your Texture in the UV Viewport and select your UV coordinates in the object manager. Now go into edit UV mode and manually move all the UV coordinates on your texture map so that they line up correctly.

    Unity cannot work with UV offsets in the default shaders and actually should not have to in a case like this.
    Rule of tumb: if your model does not have tiling textures and is painted uniquely usually your UV coordinates fill up the complete 0-1 UV space.
    Everything that tiles can go well beyond the 0-1space in any direction and overlap like crazy. ;)

    The 0 - 1 space is the grey rectangle in your UV editor. Imagine that the texture tiles beyond that infinitely.

    correction: unity can of course do offsets. Copy the offest values you see in your correct screenshot into the offset fields besides your textures in unity. This will have the same effect.
     
    artzfx and aled96 like this.
  8. aled96

    aled96

    Joined:
    Mar 9, 2014
    Posts:
    39
    Oh, right :) Now it works :D Thank you so much :)
     
  9. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Is there a way to preserve the Cinema 4D UV offsets in Unity?
     
  10. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    I'm not sure I understand your question completely.
    If you have offset your textures by a numerical amount in cinema you can enter the same amount in Unity as well.
    If you've moved your UV islands in the UV editor you just need to save the object.

    ... or what do you mean exactly?
     
  11. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I noticed in Cinema4D if I offset a texture's UV on a model than when I load the FBX in Unity, the UV Offsets don't transfer over. I have to manually redo the UV offsets for every model in Unity. With a complex scene with hundreds of objects, manually redoing the offsets in Unity can be a real pain.
     
  12. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Okay .. I see. Though I'd expect that to be expected behaviour.

    I'm not sure if that works since I can't try it myself right now but maybe give this a shot:
    Try right clicking on either the UV Tag or the material Tag and see if you can select "create UV map" (or something similar worded). This should create a new UV tag. Check if this has the Offset applied to it.

    Otherwise you either Need to write a script to apply it to the model by offsetting the actual UV space by the same amount. Or you just Need to make it a Habit of not tinkering witrh the Offset but with the actual UVs, instead.

    I don't have any other spontaneous ides at the moment, sorry.
     
  13. BIG-BUG

    BIG-BUG

    Joined:
    Mar 29, 2009
    Posts:
    457
    Can you elaborate on your workflow? What is the reason why you need to offset your textures?
    Maybe there is another solution to your problem...
     
  14. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    My workflow is I'm receiving a very complex architectural building model from one of my artists at my company, and they've already set all the textures with UV offsets within Cinema4D to get the model to look exactly how our team wants the model to look. Due to the complexity and number of textures on the model, having to redo the UV offsets, will be an incredible pain for me.

    @the_motionblur I'll try your recommendation and see how it goes.