Hints, tips and tutorials for 3D modelling & content creation
|
KatsBits
Creating 3D models, meshes &
game content
3D modelling & meshing, level editing and textures makingHints, tips and tutorials for 3D modelling & content creation [back]Importing Google SketchUp files into Blender 3DContentsExporting from SketchUp, importing into Blender 3D
Advanced user information
SketchUp and what needs to be done ^This tutorial will walk-through the process of exporting a model from Google SketchUp and its import in Blender 3D. As the tutorial discusses the process from the point of view of having a pre-existing object ready to export from SketchUp a basic understanding of how to use both Google SketchUp and Blender 3D is necessary. Make sure to be using at least Google SketchUp v6 as it currently includes the ability to export files out to the format required for the process of converting SketchUp files to Blender 3D. A full install of the Python API may also be required - follow the tutorial below first, if it doesn't work download and install Python then try again; the SketchUp to Blender conversion process may require files that are only available with a full installation of Python. The ability to see and use 'zip' files is also required; Windows XP and Vista have native support for simple zip management, else install WinZip or other 'zip' program capable of archiving files and data (7zip, winRAR, etc.). Prepping a scene in SketchUp ^SketchUp exports scenes so any models you can see in the view-point will be exported out of the application. Make sure the scene is 'clean' and/or only contains what needs to be exported; it may be necessary to delete objects and/or re-save files so they contain just what's needed (this tutorial does not cover how to use SketchUp in that capacity). Although models can be textured in SketchUp, be aware that material/texture data may not import correctly into Blender as a result of this process and/or may need to be rebuilt in Blender. So, at the very least a mesh object needs to be in the scene. Exporting models from SketchUp ^With the model built nothing else is required at this point except to simply export the scene and contained models from the "File" menu; "File >> Export >> 3D Model..."; the mesh is automatically 'tessellated' - converted from the quadratic polygons SketchUp uses to 'game ready' triangular polygons. In the "Export Model" window that opens, do the following;
Once the file is exported a screen will appear titled "Collada Export Results", this simply lists some parameters and data relative to the exported 3D file. Changing the *.kmz file exported from SketchUp into a zip archive file ^If everything above was done correctly, at this point there should be a *.kmz saved to a location on the computers hard drive. This file now needs to be 'prepped' for use. To do this do the following;
Extracting the contents of the zip file ^Inspect the resulting zip file. If all has gone well, the kmz file, now renamed as a 'zip', can be opened and inspected in WinZip, other 'zip' archive application or Windows Explorer. Inside it should contain the following or similar (shown below);
The contents can then either be extracted directly from the WinZip (other archive application etc.), from Windows Explorer using Explorer's ability to do this itself, or using the 'plug-in' features usually added when WinZip or other archive programs are installed. So for example, extracting the files using the WinZip Explorer plug-in, select the file, right click and choose the following;
Or using Windows Vista or XP's own ability to open compressed archive files by doing one of the following;
Doing this should then produce a new folder called "models" and a set of files - "doc.kml" and "textures.txt" - in the location where the contents of the zip file were extracted. Double click on the "models" folder to reveal the *.dae 'collada' file that's needed for this process. Importing the *.dae 'Collada' SketchUp file into Blender 3D ^Because the *.dae Collada format is a known and relatively common cross-platform file, it can be imported directly into Blender using the included Collada 1.4 import script. To do this go to the File menu and select the following menu choice; "File >> Import >> COLLADA 1.4 (dae)". The import script interface will initialise showing something similar to the image below. In the "Import file" text box is a file path, click the button to the right of that box and browse to the location where the *.dae file was extracted, which should still be inside the "\models\" folder. Once the file is found, select it and click the "Import dae" button top right This will open the file into the dae/Collada import script interface, once there, click the "Import and Close" button at the bottom of the screen, a message, "Import Successful", will appear after the script has run and imported the mesh. On clicking that pop up message the screen will close to reveal the imported dae mesh in the 3D view-port.
With the mesh now in Blender, additional work can be done... Advanced User informationBasic clean up of the imported model in Blender ^Before the imported mesh is going to be usable some scene and mesh prepping in Blender is usually required. SketchUp model size and Blender scene scale ^As mentioned above on initial import from SketchUp the mesh will be extremely large on, this is due to Google SketchUp using a larger system of scale than Blenders - it's equivalent to the scale used for idtech or Unreal content creation - so in order to see the mesh fully in the 3D view-port the view settings needs to be changed. In perspective mode it's likely that the image below is what will be seen, a large part of the mesh will have disappeared; it is in fact 'clipped' from view, it's there but not visible. Open up the "View Properties" panel from the 3D view-ports 'header' (the menu bar along the bottom of the 3D view itself) - click the "View" then "View Properties" - "View >> View Properties..." - a panel will appear on screen (shown bottom right below). The important parameters to look at in the "View Properties" panel are;
The main parameter to change initially is "Clip End: 500". The reason the model appears the way it does on-screen is because the 'depth' of the camera used to view a scene when moving around is set to a very low value, 500 'units' in this instance, relative to the imported model; that needs to be changed by increasing the 'depth' or "Clip End" value; although by default it's 500.00 units, it will initially max. out at 10000.00 units. To do this, either click in the "Clip End" field and type "10000.00", or, click, hold and drag to the right to increase the value until it hits the default maximum value of 10000.00 units. If the mesh still appears 'clipped' and partially drawn, it means the "Clip End" value needs to be increased further. To do that "Spacing: 1.0" needs to be increased to use a higher value - Clip End is relative to the Spacing value. As with the adjustments above, either click and type in a value or click, hold and drag; "10" should be sufficient. If the model is excessively large, increase both the "Spacing" and "Clip End" values until the complete model is visible. Doing additional work on the mesh, converting triangles to quads ^SketchUp models are exported as 'game optimised meshes'. That means the number of polygons used to make objects is at an absolute minimum; only polygons that are actually needed are used. This presents a problem if further work is required on a mesh after it's imported in to Blender, primarily because triangles are difficult to manage from a construction point of view. What this means is that the imported tessellated mesh needs converting in 'quads' (faces composed of 2 triangles instead of 1). Before doing this though note that the imported Collada/dae data may contain more than one version of the object that's needed; a 'faced' mesh (a mesh that contains, faces, edges and vertexes) as well as a version composed of only edges and vertexes; this latter mesh needs to be put to one side, as it's of no use, by moving it to a different layer, or it needs to be deleted completely. Select the object and press "M" to open the layers pop up, then select a layer to move the object to by clicking one of the small layer buttons. Click "OK" to move the selected object to the selected layer. This may need to be done for one or more objects until all that's left is the filled version (the one with faces). Blender has a much improved algorithm for converting triangles to polygons that will make a best guess as to which triangles will combine together to create a quad, so, there will be very little extra work needed here except the selection of all face contained in the mesh or a chosen (and more controlled) few for conversion. Press "A" to select all faces (this may need to be pressed twice, once to clear any previous odd selections and then again to re-select everything), or "Shift+RMB" on a number of faces to select a specific area or group. Once done either choose the menu option from the 3D view-port header of "Mesh >> Faces >> Convert Triangles to Quads" or press "Alt+J". Blender will then merge triangles into quads. The mesh is now ready for further limited editing. Further editing of the mesh ^If extended editing is required then the mesh is going to need more extensive 'prepping'; because of the way polygons flow (or don't, as is actually the case) around the mesh it makes any level of extensive editing difficult because cuts, extrudes and 'loops' can't flow around the mesh optimally due to the fact that faces are formed relative to the minimal number of (corner) vertices present in the mesh; they either shape or form poorly or are terminated awkwardly, which then exasperates the problem of editing further. This is especially notable on buildings and/or objects with angular shapes. Doing this now does mean that extra 'cuts' will be required so as to 'square up' the polygons (edges and vertices will be at approximate right angles to each other), but it saves a lot of time, effort and extra work to do it now rather than either trying to do it after additional editing has been carried out, or, as a result of trying to 'fix' issues that arise in the middle of a session editing a face and finding it won't do what's needed because of the way its shaped or aligned. The creation of a 'tidy' mesh is going to be done by splitting edges; this places an extra vertex at the mid point of an edge (the edge is 'split' at the mid point) which can then be moved into alignment with other vertices. To do this select an edge (or the top and bottom vertex of an edge) and in the edit button window (the section at the bottom of Blender with all the buttons) find the "Mesh Tools" panel and then press the "Subdivide" button (or use the shortcut of "W" then "1"). The newly created vertex can then be selected and moved (if required) to form approximate right angles with other vertices on the mesh. Do this for every edge until the end result is a 'squared' mesh as shown below. Further editing can now be done without run the risk of creating a messy mesh and more work.
ConclusionBecause Google SketchUp is a (currently) freely available 3D application its feature limited due to it's target use, namely the creation of content for Google Earth; Google SketchUp was never meant to be used as a fully fledged 3D application like Blender 3D or 3DS Max because that was never its designed or intended purpose - SketchUp is an architectural building and visualisation tool and whilst that's not a limiting factor per-say, it's not possible to do a number of things in SketchUp that are often required when creating content for games. So being able to import SketchUp content into Blender 3D (or any 3D application that supports the dae/Collada format) means that SketchUp users can now produce limited 'game ready' content, it also mean that in doing so it should be expected that additional learning is going to be required because of the use of additional tool-sets - how to mesh edit, UVW map, apply materials and textures as well as correctly prepping content for game export and so on; there is currently no getting around this. In light of that, if there is a desire to produce a significant amount of custom content for whatever game or interactive media that allows UGC then SketchUp users may be better off learning to use Blender 3D from the get-go or other application that allows a wider export capability than SketchUp can provide. |