Based on a document by Julian Gold that is available as an OpenOffice document here and as a PDF file here.
for Moviestorm Release version 1.1.2
As an Official Moviestorm tool, you must have a Modder’s License to access the SketchUp Importer. Currently, it only works with models saved as SketchUp 6 files (an option available in version 7) and is for PC only. A Mac version is stated to be released at a later date. Until then, Mac users can use nbconv and the steps listed in Modshop Beginners Guide - 5. Importing Other Models.
For this article, Julian’s document has been altered from a “How to use” to a “Details of”. The actual steps of importing a model can be seen in Modshop Beginners Guide - 4. Importing Sketchup Models.
- A simple-looking SketchUp file can produce a lot of geometry. Moviestorm has an internal limit of 10,000 vertices per (sub)object. The converter will split subobjects down if they exceed this, but remember that lots of vertices means a reduction of performance.
- SketchUp files can harbour textures, and they can be big. One model I converted had several over 1024 x 1024 in size. That’s a serious chunk of VRAM. The current version of the exporter simply coughs these out – they won’t be resized or quantised or anything. So again you can cripple performance, or worse, if you happen to be running a graphics system with small amounts of graphics memory, or that only supports power-of-two textures (and the textures spat out can be of arbitrary size), you may get results describable as “not good”.
- Talking of textures, SketchUp does some very nice perspective correction on textures that – alas – the CAL3D format that Moviestorm uses - cannot support. What this means is that if the creator of a model textured an object by taking an image that is not mapped “top down” onto the geometry then the export will contain some distortion in the texture (a warping, proportional to how far away from top-down the projection actually is). Top-down textures will be just fine, however.
- It’s best used on small single objects rather than scenes or large objects. If you try to convert a scene, results may or may not be pleasant. Given the points above, you might end up with lots of geometry and textures and Moviestorm will express its – generally harsh - opinion on such offerings.
- The converter is only intended for props – dumb objects to decorate your scene with. As of yet there is no skeleton export (partly because there’s no real concept of skeleton in SketchUp, at least not without imposing some serious discipline on how objects are created). You won’t be able to animate the objects, neither will you be able to use chairs to sit down on (that requires a skeleton) or lights to light up, for example.
- Don’t expect the Moviestorm object to look identical to the one in SketchUp. Texturing has already been mentioned. Edges are another point of difference – SketchUp draws black silhouette edges on objects, for instance. If you really crave this effect, consider turning on cel shading in Moviestorm. Also, SketchUp has flat lighting whereas Moviestorm has nice Gouraud shading; material colours will not be identical, and transparencies will not be exactly the same.
- In general you might need to play with export settings to get good results. There are a number of switchable / tweakable controls that affect the quality of the output. Have fun with them.
- There is no option for exporting SketchUp’s “images” - 2D decals applied to the model. Currently the code that exports these is switched off because the results are, frankly, bonkers, and there is no technical support on the matter – no-one does it. However, there is a work-around: go into SketchUp, select the image, right-click and select “explode” from the context menu. This converts the decal into a textured face which will export correctly. (You may need to reverse the face depending on how the image was rotated, this can also be done from the context menu).
- When converting, it can take some time depending on the amount of geometry that comes out. The exporter performs a number of operations on the model, such as merging together all sub-objects with a common material, splitting sub-objects that have too many vertices, executing the vertex welding if so required, then finally spitting out all the data into your Add-On. Later versions of the importer may come with a progress bar and batch support. For now, it’s an hourglass. When the conversion finishes, you’ll get a confirmation dialog (or for that matter an error dialog) telling you more than you could possibly want to know. There is also a log file written into the export directory that you can peruse at your leisure. If it’s been successful, then there is one more thing you have to do – and this is sucky, but we’ll be addressing it soon – restart Moviestorm and go back to the Modder’s Workshop.
Scale - Some SketchUp models in circulation have been constructed with bizarre proportions, so a figure that ought to be 1.5m tall actually comes in at 150m (or whatever). You may need to rescale the model to an appropriate size; so type a number > 0 in the “Scale” box to grow or shrink the converted model accordingly.
Omit back faces - SketchUp allows you to have a back material on a polygon. Now this is fine and dandy, but if you had (say) a cube, you’d never see the material, and Moviestorm would be processing redundant geometry. There’s also an issue with so-called z-fighting – the front and back faces may interfere with each other because they’re in the same place, and you can get ugly results from some angles. So: you can elect to omit the back faces in SketchUp. However, if you do this, and have a model that has a window and an interior wall, that is intended to be seen, then you’ll be able to see right through the far wall when looking through the window. In that case, you’ll have to make the model double-sided within Moviestorm by ticking “Generate two-sided geometry”. Have a play, see what works best.
Weld vertices - By default, the output of the importer is a lot of triangles. By welding together vertices that are very close together (or identical) we can significantly reduce the amount of geometry piped to Moviestorm. This option is ticked by default, and you might want to untick it only in pathological cases where you had a very good reason for doing so (ie you wanted to do something cunning with vertices later).
Generate materials files (CRFs) - Moviestorm holds all its material data in the template file. However the Cal3D format usually has a bunch of separate material files (.CRF), so if you were wanting to do something with Cal tools rather than Moviestorm, tick the “Generate materials files” box.
If you want to create extra templates later, it might be useful to have the materials files; Moviestorm only uses them while creating templates.
Remap Alpha - One thing you may notice is that a window that is transparent in SketchUp looks opaque in Moviestorm. There’s not a 1-to-1 correspondence, though it may be the case this is very graphics card dependent. However, I’ve written a mapping function that quadratically interpolates alpha so that results are comparable in the two systems. If this fails to give good results you can always go in and tweak the values by hand in the template file yourself.
Export edges - This is a blunt instrument of an option. The edge highlights that SketchUp puts in look great, and are one of the big visual differences between its own and Moviestorm’s rendering systems. The good news is that SketchUp models contain a list of edges that can be exported. The bad news is that it can often include all the edges you didn’t want as well. You could go into SketchUp and hide the edges you don’t want to export in this case. The results are reasonable (though as stated before there is no rendering of silhouette edge within Moviestorm using the standard shader so again results will differ). Or you could untick this box (actually the default state) and live without these details.