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.
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.
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:
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.
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)
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?
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/
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 :)
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?
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
@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.
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
@karlo – can you elaborate on what doesn’t work?
im getting a message that says “only one material can be used”
sorry for the vague question. What does that mean exactly i see in your model you seem to have more than one material
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.
Can I also make versions?
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.
I’am from Holland so excuse me for my bad english ;-)
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/
breeze: Can you elaborate what you mean?
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.
and I meant *export asset, not import.
@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
@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.
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.
I will try then! Thank you, you’ve been kind
“Unexpected number of Model objects”. Sketchup Pro 2016. when trying to export the asset. And the asset is only a cube ( I’m testing ).
Gemo: I’m guessing you have multiple instance in your model? Make sure you explode everything.
Hello, every time I try to export a model (even a simple cube) it fails: “Unsupported file extension ()”
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.
SketchUp Pro 16, but I tried it in SU15 and it worked. Version issues, I suppose. Thanks anyway, great extension!
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?
and how do you get such detailed textures?
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.
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 ;-)
@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.
I’m using SketchUpMake 2016 and I can export it as fbx without Pro
@Joihannes – I’m guessing your Make is in trial mode?
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!
@Armestio: it should be working fine with any version of SU since SU2014.
In SU16 I get “Failed to export asset. Unsupported file extension ()”
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?
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/)
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!
Cool! I’d love to see some screenshots of the SU model and the game model at some point.
Usung SU18 Pro, extension gives error that says unsupported file extension
@Duncan, what file format are you to export to?
(Or are you trying to install the extension?)
when i export it says all items must be exploded
what does this mean
whne i try to export it says all instances must be exploded
what do i need to do to make it work
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.
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.
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
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
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.