Procrastinators Revolt! Procrastinators Revolt!
Unfocused thoughts of a procrastinator
  • Home
  • SketchUp Extensions
    • Extension Warehouse
    • Vertex Tools
    • SUbD
  • Resources
    • GitHub Projects
    • BitBucket Projects
    • SketchUp
      • TT_Lib² Documentation
      • WebDialogs – The Lost Manual
      • State of SketchUp’s Observers
      • SKUI — A GUI Framework for SketchUp
    • Old Blog
    • Workshop
  • Gallery
  • Social
    • Flickr
    • Instagram
    • GitHub
    • YouTube
    • Twitter
    • LinkedIn
Procrastinators Revolt! Procrastinators Revolt!
  • Home
  • SketchUp Extensions
    • Extension Warehouse
    • Vertex Tools
    • SUbD
  • Resources
    • GitHub Projects
    • BitBucket Projects
    • SketchUp
      • TT_Lib² Documentation
      • WebDialogs – The Lost Manual
      • State of SketchUp’s Observers
      • SKUI — A GUI Framework for SketchUp
    • Old Blog
    • Workshop
  • Gallery
  • Social
    • Flickr
    • Instagram
    • GitHub
    • YouTube
    • Twitter
    • LinkedIn
Blog
Procrastinators Revolt! / SketchUp / Plugin / Export from SketchUp to Cities: Skylines / Comment Page 1
Apr 18

Export from SketchUp to Cities: Skylines

  • 18 April 2015
  • Thomas Thomassen
  • 51 Comments
  • Plugin, SketchUp
  • cities skylines, extension, gaming, modding, Plugin, SketchUp, unity

I recently started playing Cities: Skylines, Colossus’ recent city builder game. I was really impressed to how well it simply “just worked” – especially given how fresh it was. What also intrigued me was it’s reported good support for user modding.

Creating assets from existing game items is a really nice feature. The concept feels very familiar to the components system in SketchUp where you can create reusable items.

However, I wanted to create new content. The wiki page gives a brief overview over the asset requirements:

  • Must be exported to FBX.
  • Must have a flat hierarchy.
  • Must fit into the game’s 8x8m cells.
  • Must use meters for units.

Good news for SketchUp Pro users – it includes a FBX exporter. Bad news for Make users – no FBX exporter for you. :(

Unfortunately there is bad news for the Pro users as well: even if you have no hierarchy in the SketchUp model an extra node is injected upon export and the game fails to load the mesh.

This sounded like a challenge! With good help from other modders I found out that SketchUp export FBX using the ASCII variant, which allowed me to easily see the model hierarchy.

Unwanted FBX Node

By manually patching the FBX file the model would load. But I wanted to automate the process, so I wrote a small SketchUp extension: https://github.com/thomthom/cities-skylines-sketchup-tools

It’s currently a beta tool, supporting only SketchUp Pro 2014 and newer.

SketchUp Extension

When you use the Export Asset functionality it will verify your SketchUp model first, such that you have a flat model hierarchy and only one material applied to all the faces. Backside materials are ignored – so make sure you keep track of the front and back side of your faces when you model. Once the model has been verified the FBX file is exported and the extension will attempt to patch it.

At the moment it doesn’t extract the diffuse texture, so you must do that yourself until I add the option for this.

The extension also takes care of configuring the FBX exporter correctly for the game:

FBX Exporter Settings

The two bottom ones are probably the most notable, making sure the axes are swapped and the units. The axis swap is described in the wiki, so no surprise there. But the units deviate from what I described earlier. In my testing I found that if I exported the model in meters the asset would be 100 times too small in the game. As it turned out, this is a Unity quirk where it’s default import scale is 0.01 because some modelling applications have a default up-scale of 100.

In order to avoid having to adjust the scaling in the game’s asset editor every time the export units from SketchUp needs to be in centimetres.

I made a little test using an old model of a building in Trondheim where I live. Previously I worked at an architectural office so have a nice collection of local builds. The only thing I had to adjust was converting the multi-map model into a single-map. Since the model was so simple I did this by hand using PhotoShop and remapped the model manually.

If you are working on more complex models you might want to install Dale Marten’s SketchUV extension which allows you to use third party UV mapping tools such as RoadKill. Check out his excellent tutorial videos on YouTube.

Asset Importer selecting L1 1x5 Shop04

Select Building Type

Select the exported FBX

Select the exported FBX

Imported SketchUp Model

Imported SketchUp Model

Additional assets added

Additional assets added

Clearly the texture needs improvement and I need to add the other maps. But this was just a simple proof of concept.

One thing I haven’t figured out yet is what the arrow in the Asset Editor signify. Is it the side of the asset where the roads will appear? What happens if you add roads outside of the assets building area?


Requirements:

  • SketchUp Pro 2014 or newer

Download:

  • GitHub
  • Extension Warehouse
  • SketchUcation Plugin Store (Coming)

Share this:

  • Facebook
  • Twitter
  • Reddit
  • LinkedIn
  • Bluesky
  • More
  • Pinterest
  • Print

Like this:

Like Loading...

Related Posts

51 Comments

Newer Comments »
  1. laingsam
    3 June 2015 at 16:28 ·

    So, without sketchup Pro, there is no way to change the exported units?
    So far, I’ve been successfully reading .skp files in 3DS max, and using that to save in .FBX format. My models have been appearing in the game (though with horrible low res textures), but I always have to rescale them larger in the asset editor, which does not change the size of the building’s foundation, and causes a few issues.

    Is there any good way for a poor Sketchup Make user to get models into Cities Skylines?

    Loading...
  2. Thomas Thomassen
    3 June 2015 at 18:56 ·

    Without Pro there is no way to export to FBX.
    There are however users who have exported to COLLADA and used Blender as an extra step: https://forum.paradoxplaza.com/forum/index.php?threads/modeling-with-sketchup.837565/

    Loading...
  3. Gattaca
    16 June 2015 at 18:13 ·

    Thom Thom… I’ve been reading some of your stuff and using your plugins for years now… and now you’ve done this – you are a genius, you’ve essentially created a Cities: Skylines exporter for SketchUp and I thank you! Going to try it now :)

    Loading...
  4. angel
    9 July 2015 at 16:26 ·

    Need Help!
    I have both the google sketchup pro and the make version and I try to export a building I got from 3d warehouse to cities skylines. It’s a real world building called IDS Center in Minneapolis, MN and I scaled it to 1.83 to make the building bigger and taller. When I press the cities skylines tool export button it says “Cannot import assest. All instances must be exploded”. I even made a simple small box to see if it works and that message still pops up. WHAT AM I DOING WORNG?

    Loading...
  5. Thomas Thomassen
    18 July 2015 at 13:47 ·

    What version? You say “Google” SketchUp, but the last Google release was the first su8 – after that Trimble bought SketchUp. The extension only works with SU2014 and newer. What version do you have? And what OS?
    The message you describe is one that appear if you have groups or components in your model. To export to the game you cannot have any geometry grouped or in components. If you do you have to explode them all.
    If you have further problems I recommend you pist the model in the SketchUp forums: http://forums.sketchup.com

    Loading...
  6. Drift_91
    25 September 2015 at 23:03 ·

    @Angel
    All you have to do is select everything, then right click and hit “explode”.

    Unfortunately once I figured that out I ran into another problem about “Only one material can be used”. Still trying to figure out how to change materials.

    Loading...
  7. karlo
    9 October 2015 at 19:49 ·

    Can you make a tutorial video on how to do this step by step? I tried everything you said above and it doesn’t work

    Loading...
  8. Thomas Thomassen
    19 October 2015 at 11:46 ·

    @karlo – can you elaborate on what doesn’t work?

    Loading...
  9. nicholas acosta
    21 November 2015 at 00:48 ·

    im getting a message that says “only one material can be used”

    Loading...
  10. nicholas acosta
    21 November 2015 at 00:54 ·

    sorry for the vague question. What does that mean exactly i see in your model you seem to have more than one material

    Loading...
  11. Thomas Thomassen
    23 November 2015 at 14:15 ·

    That model in the post actually have just one material. The texture has all the parts of the building embedded into and only part of the texture is mapped to each face in the model. I’ll see if I can dig up the texture and post it as an example.

    Loading...
  12. breeze
    8 December 2015 at 04:34 ·

    Can I also make versions?

    Loading...
  13. Robert Wip
    2 January 2016 at 15:27 ·

    Thomas, where do i have to place the extension files i downloaded ?…
    Simply in the sketschup directory ore someware else. The readme file that comes with it dosend say ware, that way i ask.

    Loading...
  14. Robert Wip
    2 January 2016 at 15:34 ·

    I’am from Holland so excuse me for my bad english ;-)

    Loading...
  15. Thomas Thomassen
    2 January 2016 at 18:27 ·

    You can install via the Extension Warehouse, or use Preferences > Extensions > Install Extension.

    For more details; http://www.thomthom.net/thoughts/2012/01/installing-plugins-for-google-sketchup/

    Loading...
  16. Thomas Thomassen
    2 January 2016 at 18:28 ·

    breeze: Can you elaborate what you mean?

    Loading...
  17. Molekh
    9 January 2016 at 17:18 ·

    I select all and then hit “explode” but when I press “import asset” it still says me that all instances must be exploded. I don’t know what to do, any help would be really appreciated.

    Loading...
  18. Molekh
    9 January 2016 at 17:19 ·

    and I meant *export asset, not import.

    Loading...
  19. Thomas Thomassen
    9 January 2016 at 17:38 ·

    @Molekh, Can you share the model over at the SketchUp forums? Then we can have a look at it and determine what the problem is. http://forums.sketchup.com/c/extensions

    Loading...
  20. Molekh
    9 January 2016 at 18:00 ·

    @Thomas, it’s actually several models. I wanted to reproduce Stockholm in Cities Skyline, and I found some really nice buildings in 3dwarehouse. Here: https://3dwarehouse.sketchup.com/search.html?q=stockholm&backendClass=entity I’ve only tried with the Parliament, the Globe Arena and the Royal Swedish Opera before commenting here, but got the same error with all of them.

    Loading...
  21. Thomas Thomassen
    9 January 2016 at 18:05 ·

    I’m about to catch a flight and will be off the grid for a few days. If you post a thread in the forums I can catch up with you there – someone might even be able to help you before I get back online again.

    Loading...
  22. Molekh
    9 January 2016 at 18:06 ·

    I will try then! Thank you, you’ve been kind

    Loading...
  23. Gemo
    2 April 2016 at 13:37 ·

    “Unexpected number of Model objects”. Sketchup Pro 2016. when trying to export the asset. And the asset is only a cube ( I’m testing ).

    Loading...
  24. Thomas Thomassen
    3 April 2016 at 16:51 ·

    Gemo: I’m guessing you have multiple instance in your model? Make sure you explode everything.

    Loading...
  25. AArmesto
    11 April 2016 at 20:45 ·

    Hello, every time I try to export a model (even a simple cube) it fails: “Unsupported file extension ()”

    Loading...
  26. Thomas Thomassen
    11 April 2016 at 21:23 ·

    What format are you exporting to? If you export to FBX then that is only supported in SketchUp Pro. If you are using make, try the Collada format instead.

    Loading...
  27. AArmesto
    13 April 2016 at 16:44 ·

    SketchUp Pro 16, but I tried it in SU15 and it worked. Version issues, I suppose. Thanks anyway, great extension!

    Loading...
  28. Zachary
    17 April 2016 at 19:54 ·

    Please help me thom! It wont let me export my station with multiple materials, which means it shows up as completely gray!!! It says that there can only be one material. If this is true, then how do people even get colored models with this tool?

    Loading...
  29. Zachary
    17 April 2016 at 19:56 ·

    and how do you get such detailed textures?

    Loading...
  30. Thomas Thomassen
    17 April 2016 at 21:26 ·

    Yes – there can be only one material. You have to create a single texture containing all the part, then map these part on to the various faces in the model.
    The texture in the article is taken from photos I took of the building in my town.

    Loading...
  31. martin
    14 May 2016 at 18:04 ·

    im having a problem, i have made a model, and the plugin works, but when i place a photo/texture on the model it says ‘only one material can be used’ please help ;-)

    Loading...
  32. Thomas Thomassen
    17 May 2016 at 16:18 ·

    @martin: The default material counts as one material. So if you apply a material on part of the mesh you must apply it to everything. Normally you need a UV unwrapping tool for this.

    Loading...
  33. Joihannes
    11 June 2016 at 16:39 ·

    I’m using SketchUpMake 2016 and I can export it as fbx without Pro

    Loading...
  34. Thomas Thomassen
    14 June 2016 at 14:51 ·

    @Joihannes – I’m guessing your Make is in trial mode?

    Loading...
  35. Armesto (AArmesto)
    29 April 2017 at 21:12 ·

    Can we get this great plugin updated for SU 16 and 17? Is a shame it only works on 15… I hope it could be possible soon!

    Loading...
  36. Thomas Thomassen
    30 April 2017 at 11:09 ·

    @Armestio: it should be working fine with any version of SU since SU2014.

    Loading...
  37. Armesto (AArmesto)
    3 May 2017 at 13:16 ·

    In SU16 I get “Failed to export asset. Unsupported file extension ()”

    Loading...
  38. David Blanchet
    18 June 2017 at 15:33 ·

    thanks for a great plugin Thomas i was beating my head against a wall til i found this, gotta jump into photoshop to figure out my texture map, which i jsut happen to be familiar with while making textures for a FPS map maker back in the day.

    If we didn’t want to use one material, is there an in between program we can use to uv unwrap it? like a blender or 3d max, i keep hearing people toss those names around in other tutorials but its to make the other skins? The diffuse and the other one?

    Loading...
  39. Thomas Thomassen
    18 June 2017 at 15:56 ·

    Hi David.
    Since I first wrote this a new SketchUp extension have become available that makes UV unwrapping in SketchUp much easier: Wrap-R (http://wrap-r.com/)

    Loading...
  40. David Blanchet
    18 June 2017 at 18:39 ·

    Awesome, i have been doing some reading and following links for the last 24 hours and found out a lot more about the different UV maps cities needs etc. Ive been fooling around in photoshop creating the texture maps by hand and applying them to the model in sketchup, which is time consuming to say the least, but between your extension and a couple forum post here and there, (this one is pretty good about explaining the texture side, defuse, normal, specular, etc – https://steamcommunity.com/sharedfiles/filedetails/?id=500036497) i got my first model into the game!

    Loading...
  41. Thomas Thomassen
    18 June 2017 at 18:56 ·

    Cool! I’d love to see some screenshots of the SU model and the game model at some point.

    Loading...
  42. Duncan
    15 September 2018 at 19:33 ·

    Usung SU18 Pro, extension gives error that says unsupported file extension

    Loading...
  43. Thomas Thomassen
    20 September 2018 at 12:43 ·

    @Duncan, what file format are you to export to?
    (Or are you trying to install the extension?)

    Loading...
  44. SiemvanHeck
    27 January 2019 at 13:30 ·

    when i export it says all items must be exploded
    what does this mean

    Loading...
  45. Siem animates
    27 January 2019 at 13:33 ·

    whne i try to export it says all instances must be exploded
    what do i need to do to make it work

    Loading...
  46. Thomas Thomassen
    8 March 2019 at 02:44 ·

    In order for the game to load it you cannot have groups or components. If you do, then you need to right click and choose Explode.

    Loading...
  47. MB
    7 April 2019 at 20:46 ·

    I am glad to see a plugin which helps to get models from SU to C:S without several detours through other programs. Thanks a lot for your efforts.

    As an “old Goole Earth building modeller” I have a large collection of buildings created for Google Earch sitting idle on my SSD. I could put them into use now.

    The problem is: I still have SketchUp Pro 8, which is not supported. I will try the manual way (as described above) first, but wonder how much effort it would be to create a SU8 compatible version – and if it is possible at all. (Maybe some important feature is missing there? What would you think?)
    I have once done a bit of ruby programming for SketchUp, but have long forgotten most of it.

    The reason I ask is simple: If I already spend my time converting the models for fun and for the community I don’t want to spend 300USD for a new Pro version (per year). Also, the models were created with SU8 and I am familar with this version.

    Cheers, MB.

    Loading...
  48. Thomas Thomassen
    8 April 2019 at 10:05 ·

    Hi MB

    I’m afraid that there’s been so many changes since SU8 that I’m not able to make this extension compatible with that. You could download SketchUp 2017 Make which is the last free desktop version of SketchUp. (https://www.sketchup.com/download/make) It supports extensions and should work with this. Though it doesn’t have FBX, it should be possible to use DAE as an alternative.

    -Thom

    Loading...
  49. xonespeed
    19 February 2021 at 15:25 ·

    I had been attempt to make an asset, but hit the “can only use one texture” error… my model DO have ONLY one big 1024×2048 diffuse texture… Not sure what’s the issue >,> https://i.imgur.com/AtohYjy.jpg

    Loading...
  50. xonespeed
    19 February 2021 at 15:31 ·

    Er… sort of found a weird solution. I see that you mention “The default material counts as one material”, so I went to group everything as one group – then apply my diffuse texture over the group – which won’t affect all the textures I already painted but will fill up any faces that are “default”‘. Then explode the group and try to export again – this seems to fixed the problem.

    Loading...
Newer Comments »

Leave a ReplyCancel reply

Recent Posts

  • The Great Motorcycle Road Trip of 2024 10 December 2024
  • 2024 summer motorcycle trip around Dovre 9 December 2024
  • Motorcycle trip from Trondheim, Norway to Lund, Sweden and back via Denmark, May 2024 25 September 2024
  • Ergonomics of unit tests 31 December 2023
  • Extension Sources 1.0 Released 9 July 2022

RSS Feed

RSS Atom

Categories

  • Boardgames (1)
  • Laser Cutting (3)
  • Motorcycle (3)
  • Ramblings (1)
  • SketchUp (34)
    • Plugin (12)
    • Ruby API (15)
  • Software (3)
  • Software Development (1)
  • Tutorial (3)
  • Uncategorized (1)
  • Usability (2)
  • V-Ray (1)

Blogroll

  • Official SketchUp Blog
  • SketchUp [Plugins] Blog
  • SketchUp API Blog
Copyright © 2004–2024 Thomas Thomassen, All Rights Reserved.
  • Contact
  • About
 

Loading Comments...
 

    %d