Creating Static Models with Google SketchUp
From Multiverse
Contents |
Best practices for creating models with Sketchup
There are several basic best practices that model makers can follow when using Sketchup to create models for export. A lot of them center around avoiding what would be considered sloppy or bad model development with more conventional tools such as 3DS Max and Maya.
Watch the face normals!
Many beginning modelers do not fully understand the concept of face normals. To them a face is a two sided "thing" like a piece of paper, visible from both sides. But to a game rendering engine, a face has two sides (front and back), and only the front side is rendered. So viewing a face from the back will show nothing at all. Fortunately for beginners (and unfortunately for model creation for export), Sketchup hides a lot of the face normal concept from the user. That makes Sketchup model creation far easier, but it also means it's easy to export models with incorrect face normals that lead to "inside out" models.
The best way to create a model with proper normals is to first create it without any texturing using the monochrome render method (View -> Rendering -> Monochrome). In this mode, the "front" of faces is drawn in white, and the "back" is drawn in blue, and it is easy to hilight and right-click on a face to reverse the face if it is incorrect. After you completely finish creating the model with proper normal facing, then you can texture it. Once it has been textured, reversing the facing also moves any texture to the other face.
Use appropriate texture sizes
In general, create textures based on the amount of detail required. If you have a large texture that looks blurry when viewed at normal size, then you can likely scale it down since it doesn't contain much detail. Also, if you are texturing a relatively small area, you can make a small texture. Remember that textures are automatically stretched (or compressed) to fit the area they cover. So a small texture that will cover a large area on a model will come out blurry, and a large texture scrunched to fit a small area will have a lot of detail the user can't see.
In general, do not allow any one dimension of a texture to exceed 1024 pixels, and only then if the texture actually has a lot of detail to it. Also, if a player in the game will never get close to a texture, there is no reason to have a lot of detail and higher resolution. On the other hand, if the user will get very close to the texture, then a higher resolution is in order, otherwise the texture will seem blurry when viewed up close.
Another way to save on texture size is to remember that textures can be tiled; that is, a single texture will be copied over and over on faces to which it is applied. For example, if you have a building that has ten stories which are each identical (same size, same windows, and so on), then you can create one texture that is a single floor, then repeat it ten times over the side of the building. The same concept applies to things like floor patterns (for example, rugs, dirt, concrete) and walls (wallpaper, painted walls).
In general, the only time when very large textures applied to very small areas are necessary is when you want to display very fine detail. For example a sign with a lot of text on it may need to be done at a high resolution so that it can be clearly viewed (and read) on a smaller polygon surface.
You can always resize a texture even after you have converted a model for use in Multiverse. For example if you find that you've taken that nice detailed 1024x1024 concrete pattern and reduced it to 256x256 and now it is too blurry, you can simply go into the Multiverse asset repository (Textures folder) and replace the smaller image with with a larger one. When rendered in Multiverse, whatever texture is given is automatically stretched (or compressed) to fit the space it was assigned to.
Combine textures into composites
When you create a model in Sketchup that uses multiple textures, each texture translates into a different material in the converted model. And each material translates into a separate mesh in the model, and each mesh is an additional rendering burden on the game engine. So that means a model with lots of textures translates into a model with a lot of rendering steps - which translates into more work for the game engine, and slower framerates. However a model with fewer textures translates into a model with fewer rendering steps, and thus a faster, less "jerky" game display.
An easy way to simplify a model is to combine several textures into a single composite image. For example, if you had four textures that were each 256x256 in size, you could combine them into one single texture that was 512x512, with the four original textures in the four quadrants of the new larger texture. Then, when you texture your model, just use this single composite texture for all four of the original textures, making sure you only use the appropriate part of the composite texture. Remember that when you apply a texture to a face, you are not automatically stretching the entire texture onto the face - only the section of the texture you choose to be drawn on the face.
NOTE: This technique will not work if you want to tile a texture, since the entire texture will be used for the tiling. It is not possible to specify a sub-area of a texture for tiling.
Watch the details!
Keeping the detail down on your models is important, as each face and component of your model translates into more details for the game engine to render. You can keep the detail level of your model down by both watching the level of geometry you use, but also by using textures to create the illusion of detail. For example, it is not necessary to model each shingle of a roof as a separate object. Instead the roof can be modeled as a single item with a repeating shingle texture on it.
Another way to save on details is to think about how finely detailed you need to make the model geometry. In a game environment for example, a cylinder with 12 to 16 sides will still look very "round", despite the fact it has a series of faces. In general, don't put in geometric detail unless it is absolutely necessary or the detail somehow makes a difference to the user. A round post that the player never gets close to might even be done as a 4 sided "cylinder", since the player may never actually be able to notice the difference from a distance.
Converting SketchUp models to Multiverse format
The Multiverse Conversion Tool enables you to directly open and convert Sketchup "KMZ" format files. KMZ files are actually just "zip" archives which contain model data, including the model's definition in Collada format.
In addition to the lack of collision volumes, most problems center around errors in converted models, inefficient or duplicated materials and textures, and excessive polygon counts from highly detailed models. It is important to note that many of these problems are not flaws in the conversion tool, but rather bad or sloppy modeling by the model developers who's content was taken from the 3d Warehouse.
General problems
Here is a list of problems that you may encounter when converting models from Sketchup KMZ format to Multiverse format. In general, many of these problems are a result of how the modeler creates the model, and not technical flaws in the tools or model conversion process. Sketchup offers the modeler no reason to pay attention to model normals for example - an issue that is important when the models are rendered in Multiverse, as it only renders faces visible (based on the face normal) to the viewer. This, along with the user getting little to no feedback on the complexity of their model can lead to models that are very sloppy by the standards of model development for 3D games. Models with excessive use of textures, inverted face normals, and high polygon counts are par for the course for 3D Warehouse models.
- Sketchup models do not contain collision volumes, and so none are generated by the conversion tool
- Texture name collisions occur where more than one model shares the same texture name for different textures
- Some models use multiple copies of the same texture, differing only in name
- Textures can be extremely large at times, with dimensions on the order of 4096 pixels on a side
- Some models contain extra "stuff" such as little profile people for scale or satellite ground images that must be manually removed in Sketchup before exporting
- Some models have reversed normals on faces, resulting in "inside out" models
- Though flipping reversed normals in Sketchup is easy, all such faces must be retextured as textures are then placed on the "wrong" side after flipping
- The default ambient and other lighting values in the materials generated are at times incorrect and lead to excessively bright models
- Some models have excessive numbers of materials and textures, including some with 80 or more uniquely named materials
- Some models are far too complex and have too many polygons to be used in Multiverse
Optimizing models
Here is a list of steps that you may need to take to fix or work around problems in some converted models.
- Manually generate collision volumes, either by hand-editing .physics files or by importing Sketchup models into Maya or 3ds Max.
- Append a unique prefix to texture names to avoid name collisions.
- Rescale large textures in Photoshop or other image editing software.
- Correct models with inverted normals in Sketchup, or set their materials to draw both faces (by manually editing the .material files). Editing the materials to draw both sides of a polygon will lead to incorrect model lighting and reduced rendering efficiency.
- Manually correct duplicate texture names by deleting files and editing material files.
- Identify overly complex models after conversion and hand optimize (if possible) in Sketchup or tools such as Maya or 3ds Max
- Hand edit to correct excessively bright or "off" lighting values in materials. (NOTE: This can be a time-consuming process for models with many materials.)
- Visually identify materials that have alpha masking for transparency and hand-edit them to turn this feature on for the material.
