Sketchup


 

Importing Sketchup models

Getting a Model into Moviestorm Download and install SketchUp

The PC version of Moviestorm supports Sketchup 6; if you are using a later version, you will need to save your model in the Sketchup 6 format. The Mac version of Moviestorm supports up to Sketchup 8.

 

Tips

When setting up SketchUp consider setting its measurements to “metres” as one Moviestorm floor tile is one metre. For SketchUp 7, you can easily choose a template upon each startup. For version 6, you must edit the settings.

As of 12/08, the “Recent Files” browse function of the SketchUp Importer doesn’t work, causing additional steps each and every time you import a model.
A workaround would be to create a SketchUp Models folder right inside the Moviestorm Directory. Fire up SketchUp, go to Window>Preferences>Files and, for Models, browse to your newly created folder. When you open or save a model, SketchUp will now default to this location and when using the Importer’s browser, you’ll only need to go up a couple of levels.

1  Create your Addon’s folder

In your Moviestorm directory, open the Addon folder. In this folder, create a new folder with the name of your Addon. This Addon can have multiple items in it. You do not, for organisation’s sake, need to have a separate Addon for each item.

2  Build or get a SketchUp model

Within SketchUp, you can access the official help files to get you started. Additionally, even a casual Internet search will bring up tons of user made tutorials. You can grab a Google Warehouse model by going to File>3D Warehouse>Get Models. Be aware that the Google 3D Warehouse’s Terms of Service states that the creator of a Warehouse model owns that model and that you are not allowed to distribute groups of models in one package (content pack or addon).

See SketchUp Importer, below, for performance issues for SketchUp models, the Importer, and Moviestorm.

3  Save your model

For SketchUp 7, once you hit Save, locate the Save as type pull down menu and choose Sketchup 6.

Read on or watch davidwww’s Importing a SketchUp Model video tutorial can walk you through the remaining main points. It’s based on an old version of MS, so, if you have any problems, come on back.

4  Import your model

Start Moviestorm and load up the Modder’s Workshop. First (and very important), along the top, under Current Addon, choose the Addon that this model will be placed in. Next, click the Import button in the top left corner and choose Import SketchUp Model. Browse to the location of your model and, under Moviestorm name, give it a unique name (ex. Television_AB_01). You could now hit Convert and get a working model or see the SketchUp Importer page for a full description of the selectable options.

5  Publish your Addon

Login as a Publisher and, making sure to untick Requires a License, publish this model’s Addon in the Master Browser. Restart the Modder’s Workshop - The ModShop must now be restarted in order for your model to appear in the prop list of the Master Browser.

6  Apply settings to your prop

When a prop is scalable, can be walked on, or can stack on top of other props, it’s because of the settings applied to it.

a)  In the list of props locate your prop and, above the Textures and Templates folders, left-click on its name. This menu doesn’t have a name at the moment, so, we’ll call it the “Descriptor” as that is the name of the file that it writes once you save it (DESCRIPTOR). Some of its options do not function (???).

b)  Choose your settings, the most common of which is Scalable and choose or create at least one tag for categorization.

7  Save the Descriptor

Scroll down to the bottom right (you might have to expand the window) and hit Save. There will not be a dialogue box but, yes, it did save. Your model is now ready to use in Moviestorm. Shutdown the Modshop, restart Moviestorm, load up a movie, and locate it in props list.

Note: The textures applied to the model are the ones from Sketchup. They are used as the Diffuse texture and your model is lacking Specular, Normal, and/or Emissive textures. Because of this, your model will seem cartoonish and lacking in detail compared to the Moviestorm assets.

 

To learn how to create these detail enhancing textures, go to Textures. To apply these textures to your model, continue on.

Back to top

Applying new or additional textures to a Sketchup model

This section assumes that you’ve gone to Textures, created your new textures, and saved them in the appropriate location.

1  Find your prop

Once the Modder’s Workshop has been restarted, go to the Master Browser and open the Props folder. Browse through, locate, and click the “+” next to your prop.

The Textures folder only lists the textures that are in your prop’s folder. You cannot interact with those files. The Templates folder will have the template that the SketchUp Importer created for this prop. A Template is basically a blueprint which tells Moviestorm how to show a model and what characteristics its textures have. You can make variations of a single model by creating new Templates. Then, when you customize an item in Moviestorm, you’ll be able to pick from the different variations. Click the template.

2  Add textures to the materials

When dealing with models, Materials are all of the surfaces of a model that shared the same texture when the model was imported.

Two surfaces can be on opposite sides of a model, however, if they were both given the same texture in the modelling program, when selecting a Material and applying a texture, it will be applied to both of the surfaces.

Right now the materials only have Diffuse textures. You need to designate which textures are used, which ones the materials “point to”. Note: Steps A and B will be expanded as the Textures category is expanded.

a)  Scoll down and in the list of Materials, click the first one. It is now the “active” material and any textures (and their settings) you designate will be applied to it. In the space below, that has Ambient, Diffuse, Specular, and Emissive buttons, the textures applied to this material are listed.

The only way to tell which surface this material is, is to have, for .png or .jpg images, a browser window open to your Moviestorm directory Addon\YOUR_ADDON\Data\Props\YOUR_PROP\Textures, or for .dds, and image editor browsed to that same location. So, if the first Material’s Diffuse texture is “Textures\texture00.png” you can look at your browser, see texture00, and then locate where it is on the model.

You can have one of each type of textures applied to a material and the steps are the same for Diffuse, Specular, Normal Map, and Emissive.

b)  Click the “Browse” button to the right of the Diffuse texture type. This opens the Modshop file manager. Its default is the Textures folder of the prop that you’re currently in. If you have a texture in that folder and you choose it, it will be applied to the material. However, if you browse up to use a texture outside of your prop’s Textures folder, the material will turn light grey when you apply the texture. This is a Modshop bug. The file path for the texture is incorrectly written and the Modshop cannot locate it. To fix this, simply click in and scroll to the left of the file path and delete everything to the left of “Data” and hit “enter”. If the texture remains light grey, check to make sure that there are no spaces in the file path.

Sometimes the Modshop will add them and the toughest to spot are the ones hiding after a ” _ “. Repeat this step for the Specular, Normal Map, and Emissive (if needed).

c)  Apply settings (shininess, invisible to camera, etc.), as needed, for the textures on this material.

d)  Repeat all of these steps for each of the materials that your model contains.

e)  Scroll down to the bottom right (you may have to expand the window) and hit save.

3  Publish your Addon

Login as a Publisher and, making sure to untick “Requires a License”, publish this model’s Addon in the Master Browser.

 

Once again, your model is ready for use in Moviestorm.

Back to top

SketchUp Importer

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) for PC only. Or up to SketchUp 8 files for the Mac version. For this article, the 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.

 

Performance

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, sometimes 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 will not 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 scene props. 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.

 

Options 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”.

 

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.

Back to top

Free 14 day trial - Click to download now!

Modding Tutorials 

Basic Modding

Tutorial 1 - Importing images

Intermediate Modding

Tutorial 2 - Importing Sketchup

Advanced Modding 1

Tutorial 3 - Scene props
Tutorial 4 - Gestures
Tutorial 5 - Held props

Advanced Modding 2

Tutorial 6 - Costumes
Tutorial 7 - Accessories
Tutorial 8 - Animations

Modding Assets

To complete the advanced modding tutorials you will need to download the skeleton files for your chosen 3D package, plus a suitable cal3D exporter.

3DS Max 2008

HalfLife

FBX Format

Collada (DAE)

Blender

Milkshape

Cal3D exporter for 3DS Max 2008