3D RAD HOME PAGE


Exporting 3d models from Google SketchUp to 3D Rad

If you make the models for your 3D Rad projects yourself with Google SketchUp, then you have full control on texture size, face count and backfaces.

All these elements, when your models are rendered in real-time by 3D Rad, can affect performance and make the difference between a perfectly smooth frame-rate and a choppy, unacceptable rendering.

TEXTURES


Texture size is by far the most important factor affecting frame-rate.

If the amount of texture data in the scene at a given time is bigger than the video memory available in the video card, you get a poor frame-rate, otherwise rendering can be very smooth.

The amount of data used by a texture in memory is proportional to the number of pixels in the image. This means that even a small .jpg file can use a huge amount of video memory, if its size, in pixels, is big.

Bigger textures, also, require more processing when loaded (when your 3D Rad project is launched as a compiled application, or when it is loaded into the 3D Rad editor).

Worth noting is that, in 3D Rad, textures that are used multiple times on different SkinMesh objects DO NOT increase the amount of texture data in memory. That is, 3D Rad re-uses texture data in memory where possible. This means that you can have a scene filled with textured objects and still get an excellent frame-rate, as long as you managed to re-use the same texture multiple times for your models.

FACE COUNT


Even when textures are optimized, you can still get a poor frame-rate if the number of faces in your models is too big.

Recent video cards tend to be affected very little by the number of faces to render, but optimizing facecount for your models is still important.

Facecount is extremely relevant for the models you export as shadow casters.

It is also very important for the models you export as static RigidBody objects.

BACKFACES


In Google SketchUp all faces have a backface. This is no good for real-time rendering, in general, because faces that are never visible (like the interior of certain objects) are still processed, thus wasting rendering resources.

The 3D Rad Exporter plug-in for Google SketchUp never exports backfaces for RigidBody objects and shadow casters.

However, it allows you to export either with or without backfaces for SkinMesh objects.

Exporting with backfaces is usually more popular because you never get 'holes' in your real-time rendered model.

Still, exporting without backfaces is preferred because it actually halves the number of faces to render.

So, if you make your own models in Google SketchUp, try to work keeping in mind that backfaces will be ignored in your 3D Rad project.

This is mandatory if you are making a model to be exported as a RigidBody because only the front-face of your model will be used for collision detection. Anything hitting from the other side will simply go through your model.

DEALING WITH MODELS MADE BY OTHERS (3D WAREHOUSE)


The Google 3D Warehouse library is a fantastic source of free contents you can use for your 3D Rad projects. However, while some are very well designed, most models have not been designed with performance in mind.

For example, building models using textures derived from photos tend to fill-up your video memory very quickly, causing horrible frame-rates in 3D Rad.

One way to tackle this is reducing the size of the .jpg images, or remove them altogether, before exporting the model to 3D Rad. You will be amazed by how many surfaces in certain models can be replaced with a solid color without sacrificing quality!

Another way is splitting a large model into parts exported as separate SkinMesh objects. 3D Rad will then automatically skip processing those SkinMeshes that are completely out of the screen, or beyond the 'clip-distance' defined in the current camera object, thus improving frame-rate substantially in most cases.

This splitting-based technique can be improved further by writing a script which dynamically shows/hides the SkinMeshes based on other conditions, like being behind another object in the scene and so on.

NOTE: some models from the 3D Warehouse may include hidden geometry which you may not need but is actually exported to 3D Rad. To see all hidden geometry before exporting, in Google SketchUp, select Edit -> Unhide -> All.

MODEL'S NATURAL CENTER AND ORIENTATION


The world origin in Google SketchUp will be the so called 'natural model's center' for the models exported to 3D Rad.

This is a very important concept frequently mentioned in 3D Rad tutorials and in the documentation.

In 3D Rad the 'front-side' of a model is another important reference. In Google SketchUp the front side is the green world axis. It means that, for example, before exporting a car you should make sure that its front is facing the same direction as the green axis.

NOTE: if you can't see the world axes, in Google SketchUp, make sure the View -> Axes option is checked.

EXPORTING LARGE MODELS


A large model can take a long time to be exported as a 3D Rad object.

For large models with grouped geometry in particular, the plug-in can spend a lot of time analyzing the model, before exporting the faces.

You can minimize or eliminate completely the 'analyzing model' phase by exploding the model before exporting it.

You explode a model in Google SketchUp as follows:

1. press [Ctrl]+[A] to select all the elements in the scene
2. select Edit -> X Entities (X in model) -> Explode

You may have to repeat 1. and 2. multiple times in order to completely explode a model.

If you need to export a very large model (e.g. a city with many buildings), we strongly recommend to split the model into parts, creating different .skp files. You can then export each part individually.

Each part, either a RigidBody or a SkinMesh, can then be added to a 3D Rad project, and the original large model can be 're-assembled' by making sure that all SkinMesh/RigidBody parts are placed at the same location.

TRANSPARENT SURFACE ISSUES


Models with transparent surfaces will usually render properly in 3D Rad if the surface is un-textured.

Textured surfaces will be rendered properly only if the transparency is achieved, in Google SketchUp by using the alpha information in the texture (.tga or .png file formats), rather than the transparency setting in the material.

Transparent surfaces may also cause objects behind them to become invisible, in 3D Rad.

One way to fix this is enabling the 'Depth sorting' option on the Skinmesh property dialog.

Another way is exporting the transparent surface as an individual Skinmesh and then check the 'No Z-Buffer' option on the Skinmesh property dialog.




Well, that's all for now. Happy exporting!