Recoloring in sketchup - ParkitectNexus/ParkitectNexusClient GitHub Wiki

Introduction

Many people use Sketchup for their modeling, unfortunately Sketchup doesn't support UV mapping. At least not in the form that Parkitect needs. But don't cry, Kenney wrote a Sketchup plugin to fix this issue quite easily.

Requirements

Setup

Download the repository and extract it somewhere on your pc where it can be saved for a longer time. In the folder you'll find 3 files: 256palette.tga, colorMaterials.rb and modTemplate.skp. The colorMaterials.rb is the Sketchup plugin, install it in Sketchup. This is copied from the sketchup documentation:

Windows - the default location is:
SketchUp 2015: C:\Users\YOUR USERNAME\AppData\Roaming\SketchUp\SketchUp 2015\SketchUp\Plugins
SketchUp 2014: C:\Users\YOUR USERNAME\AppData\Roaming\SketchUp\SketchUp 2014\SketchUp\Plugins
SketchUp 2013: C:\Program Files\SketchUp\SketchUp ####\Plugins.
SketchUp 8 and older: C:\Program Files\Google\Google SketchUp #\Plugins.

Mac OS X - the default location is:
Version 2013 and newer: Open a new Finder window, press and hold the Option key on your keyboard, the click Go in the menu bar > Library > Application Support > SketchUp # > SketchUp > Plugins

Version 8 and older: [YOUR USER NAME]/Library/Application Support/Google SketchUp #/SketchUp/plugins

After installing, open the colorMaterials.rb with a texteditor, on line 5 you'll find the paletteLocation variable, change it to the full path to 256palette.tga in your downloaded repo. Like: $paletteLocation = "C:/Users/luukh/Projects/SketchupUVMapper/256palette.tga" and save the file. Use forward slashes

Now make a copy of modTemplate.skp, as this is your base file for every Parkitect model, so you want to keep this clean. Open your copied file with Sketchup, if the plugin is installed correctly you'll now find a new action in the menubar at tools > Parkitect recoloring. If this is not here, check if your plugin is installed on the right location.

Modeling

When you use the template there is a flat panel in the center of your project, this is 1m. When you're done and import your model in Parkitect, this square will be exactly 1 tile.

panel

Now create the model you want to make, let's start with an easy cube.

cube

Recoloring

Make sure you have read the recolorable objects documentation, you need to know what the red, green, blue and indigo do and what numbers they have, color 1, 2, 3 and 4.

In sketchup open the paint bucket and go to Materials > In Model (see image). Here you'll see those 4 colors. Choose red, color 1, apply this color on every face of your model you want to. Repeat for the other colors if you need more.

in model colors

When you're done with coloring, click tools > Parkitect Recoloring. The plugin will now replace the chosen colors with a proper uv map. When it's done it will show you this dialog:

final sketchup

Saving

Export your model as .obj, file > export > 3d model, choose the .obj extension.

Now import this .obj in unity!

final