Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

SketchUp to Unity Workflow

Discussion in 'External Tools' started by eneroth3, Nov 1, 2018.

  1. eneroth3

    eneroth3

    Joined:
    Oct 22, 2018
    Posts:
    40
    I've been using Unity for about two weeks now and have learned lots! I've looked into C# scripting, had a quick look on shaders, almost completed my own seamless portals and very much enjoy working in Unity.

    However, there is one thing that I think is a real pain, one thing that makes me leave my computer and go brush my hair or something rather than get on with my project: the SketchUp import workflow. I don't know if I miss something obvious, if there is a problem with the design of the Unity import, or a little of both.

    I've been using SketchUp for 10+ years, mostly for architectural modeling, and naturally want to use it for my level design (I intend to look into Blender for character design with animations and stuff). I want to do as much of the level design as possible in SketchUp with its superior tools for copying, moving, rotating etc, not just create individual pieces and assemble the scene in Unity. I still haven't found a way to rotate a GameObject around a custom axis, or use a vertex outside your selection as starting point when precisely moving it.

    When trying Unity's native SketchUp support, all textures were missing. I don't know if I missed some setting, and the only workaround I can find online is to first export a FBX from SketchUp, and import that instead in Unity. Already here the workflow gets one extra annoying step.

    My next problem is that it doesn't seem like I can link individual SketchUp components in Unity, only whole models. In SketchUp a component is virtually an embedded model, with its own local axes and all. The recommended workflow in SketchUp when creating multiple related objects, e.g. a furniture collection, is to have a master working file where you have all those objects as components. This way you can edit a shared sub-component, an have it update throughout all your objects. In my workflow with Unity it's natural for me to have one big SketchUp model, and let different groups or component represent different rooms or levels. Then I'd like to use just one of those components at a time in Unity. However, when dragging the component in from the Project View, the whole model comes in. If I purge what I don't want, the link is broken and updates made to that SketchUp component aren't reflected in Unity.

    I suppose I could get around this my making a script for SketchUp that exports my room or level components into separate files, that Unity can link to, but it's one more step making the workflow a bit more tedious. Also the Unity UI suggests you can link to individual groups or components, as you can see them in the project view and drag them into the hierarchy. I think what bugs me here is really how the Unity UI suggest something that it hen can't do.

    Another problem with importing these assemblies from SketchUp is that the local axes aren't preserved. Everything gets converted to global coordinates, with all transforms set to the origin. I would have expected this data to be kept in Unity, so I could place GameObjects like portals relative to the local coordinates of individual rooms. Honoring local axes would probably also be a requirement for mapping SketchUp ComponentDefinitions to presets, as multiple instances would need their shared content to be defined in local axes.

    If there is another way to easily get a level made in SketchUp into Unity, feel free to tell me. Otherwise I think this could be seen as a draft to a feature request.
     
  2. eneroth3

    eneroth3

    Joined:
    Oct 22, 2018
    Posts:
    40
    Some updates:

    I think I've found an acceptable workflow. It turned out there was a bug in my previous Unity version which caused the materials tab for model inspection not to function. Now that I've updated and this works it's become much easier to understand how the program is to be used.

    From my main über workign SketchUp model I export individual components (e.g. rooms or levels) to external SketchUp files, that I then reference in my Unity scene. It would be lovely if unity could keep a live link to an individual component definition within a SketchUp model, but this works to.

    While writing this I found the Select Nodes option, but that doesn't work the way I would find natural in a SketchUp context. It allows to selects groups or component instances, and presumably import them relative their current positions in the SketchUp model. To me it would be much more natural to link to a single definition used by such a group or component instance, given how a definition more or less is an embedded model in SketchUp. Properties of the individual instances, like their transforms, are irrelevant to me. In my working file I even just place them arbitrarily, and move them around as I go to form logical categories. Inside of them however I care a lot about positioning relative to the local axes.

    Unity's material import from SketchUp seems broken. The materials are referenced correctly on the imported meshes, but all textures are missing. However, I've been able to create my materials anew as unity materials in external files. In the model inspector I've remapped each material in the model to the corresponding external material. This allows me to apply the materials where I want them and do the UV mapping in SketchUp, but let them reference full Unity materials with all the settings SketchUp doesn't support.

    Is there a way to automatically set up this on demand remap for SketchUp models? I'd really like all materials to remap to the file by the same name as the material, in my materials folder?

    Also, it would be nice to know if the missing textures is a known issue. I can't find it mentioned in the documentations. Quite the opposite, the documentations claims Unity supports SU materials. Am I missing something here? Am I supposed to extract textures and or materials?
     
  3. Maximvs

    Maximvs

    Joined:
    Oct 10, 2016
    Posts:
    3
    Hi eneroth3,

    I'm not that familiar with SketchUp but i believe you can export .ifc 2x3 format from it right?

    If so, what if I told you that you could automatically convert your model to Unity and have UV's done at the same time.
    Also if properly done architectural model, you would have game object hierarchy by object type eg. Doors, Windows, Slabs etc...

    I recommend that you check Tridify Convert (https://www.tridify.com/convert/) and tell me what do you think about it.
     
  4. eneroth3

    eneroth3

    Joined:
    Oct 22, 2018
    Posts:
    40
    Hi Maximvs

    I think I've found a quite good workflow now, but this part of Unity has certainly been one of the least intuitive (I've found shaders and scripting much easier to pick up).

    I have a large working file in SketchUp containing all my levels. This allows for updating a reoccurring element once and have it updated everywhere. Each level is a component (kind of like an embedded model) that I then export to a standalone SketchUp file and reference in Unity. Personally I'd love if Unity could reference component definitions directly in the parent model, but this works for now.

    I've also found the issue with texture export. Unity assumes each SketchUp texture is associated with an external file. In SketchUp textures are embedded, and their associated path was often set when the material was first created, on a completely different computer with completely different files. When I started creating new materials from custom images within SketchUp, those were recognized by Unity as the external files were accessible in my asset folder. I think a lot could be done about making the SketchUp to Unity import more intuitive here. The best would be to just ignore the path and always use the embedded texture file from the SketchUp model.