Skip to main content

Getting from SketchUp to Unity with shadows and lighting

The following short (and silent - for now) videos present a full overview of getting a model from SketchUp into Unity3D. It uses the demo-version of the LightUp plug-in for SketchUp, which is fully functional (for a while). This works with the free and the Pro versions of Unity and SketchUp, on Windows and OSX.

The model in SketchUp and lighting it with LightUp

LightUp 4 SketchUp (1) Inside SketchUp from Stefan Boeykens on Vimeo.
This video describes how to lighten a SketchUp model with the LightUp plugin. I'm using the demo version of LightUp (v1.1) inside SketchUp 8 Pro for OSX.

Transferring the SketchUp model into Unity using FBX format

LightUp 4 SketchUp (2) Export FBX for Unity from Stefan Boeykens on Vimeo.
To get a SketchUp model, baked with Lightup, into Unity3D, you can use the integrated FBX exporter. This also works in the free version of SketchUp, which does not support FBX.

The integrated FBX exporter includes the baked lightmap and the secondary UV coordinates that are required in Unity, to have the two textures correctly mapped.

You should also install the Lightup support scripts in an "Editor" folder that you can create in your assets folder of your Unity project, as this will automatically assign the Lightmap shaders and load the lightmap textures.

Updating the SketchUp model and reloading it in Unity

LightUp 4 SketchUp (3) Modify and Update from Stefan Boeykens on Vimeo.
Even after we placed the SketchUp model inside Unity, we can continue working on it. After the scene was prepared in Unity with a default 3d person controller, we modified the geometry inside SketchUp, recalled LightUp and exported the model over the existing one, inside the Unity project Assets folder, to replace it.
Unity then reloads the whole scene, leaving all interaction in place.


Popular posts from this blog

Improve usage of BIM during early design phases

When I was collecting ideas for a book chapter on BIM (that seemed to never have emerged after that), I collected 10 ideas, which I believe still reflect good recommendations to improve the usage of BIM during the early design phases. These ideas are related to BIM software, but you can apply them in any flavor, as long as you can model with Building Elements, Spaces and have control over representation. Introduction This article gives an overview of several recommendations and tips, to better apply BIM applications and BIM methodologies, in the context of the early design phases. Many of these tips are applicable in any BIM application and they are based on experience gathered from teaching, researching and using BIM software. Sometimes they could help software developers to improve the workflow of their particular BIM implementation. Tip 1 : Gradually increase the amount of information In the early design phases, the architect makes assumptions and lays out the main design in

Getting BIM data into Unity (Part 9 - using IfcConvert)

This is part 9 of a series of posts about getting BIM data into Unity. In this post, we’ll discuss the IfcConvert utility from the IfcOpenShell Open Source IFC Library to preprocess an IFC model for integration with Unity. This is (finally?) again a coding post, with some scripts which are shared to build upon. Conversion of IFC into Unity-friendly formats The strategy with this approach is that you preprocess the IFC-file into more manageable formats for Unity integration. Most Web-platforms do some sort of pre-processing anyway, so what you see in your browsers is almost never an IFC-file, but an optimised Mesh-based geometric representation. However, it wouldn’t be BIM-related if we’d limit ourselves to the geometry, so we will parse the model information as well, albeit using another, pre-processed file. IFC to Wavefront OBJ I used a test IFC-model and used the IfcConvert-utility converted it into OBJ en XML formats. The default way to use it is very simple:

Getting BIM data into Unity (Part 8 - Strategies to tackle IFC)

This is part 8 of a series of posts about getting BIM data into Unity. In this post, we’ll discuss IFC as a transfer format towards Unity. As with the previous post, this is not a coding post, although hints and examples are provided. Open BIM and IFC Everybody who ever met me or heard me present on a conference or BIM-lecture will not be surprised to hear that I’m a strong believer in the Industry Foundation Classes (IFC), an open standard, with already two versions published as an ISO standard, being IFC2x2 and IFC4 (but surprisingly not IFC2x3 which is widely used). In the ideal world, this would be the format to use to transfer BIM data into another environment, such as Unity. So what are our options? Looking in the Unity Asset Store Assimp is a library which supports multiple formats, including IFC.   I did a few attempts, but alas without any success. It is possib