Create beautiful visualisations of your structural models with blender and sketchfab — part 1: renders.
by Michael Demetriou
Exporting your model
First off, you have to export the mesh of your model in 3D from the structural software of your choice. We use SCIA engineer here at the office, so these are the instructions for that.
- Open your model
- Choose Structural Model from View > Set view parameters. This is required in order for SCIA to export solids and not linear elements.
- Choose Export > Graphic Format
- In the window that appears choose wrl as file type.
Converting the model in a format that Blender understands.
While Blender does have a
*.wrl importer, it unfortunately hangs when presented with a model exported from SCIA Engineer. Not to worry however, as another Free Software tool will help us to successfully get our model into Blender.
Go download Meshlab or just
apt install meshlab if you are on a debian based system. Import your
.wrl into meshlab and File > Export Mesh as
Getting your model into Blender
If you are unfamilliar with Blender it is a Free Software 3D modelling/rendering/animation suite with quite some capabilities.
Install Blender on your computer and fire it up. Remember that you have to right click to select things in blender. If you don't like this behaviour you can change it in File > User Preferences...
By now you should be seeing the default blender cube. Right click on it and press Del to delete it. Make sure to keep your mouse pointer still at that point (as moving it will dismiss the confirmation dialog box that appears) and click on Delete (or press Enter).
Using File > Import > Stl, import your
.stl file. It should appear inside your 3D View. It is possible that your model appears side up, or upside down. There are two ways to fix that. Make sure it is selected and do one of the following.
- Press R followed by the letter representing the axis you want to rotate around (i.e. X, Y or Z and followed by 90 or 180 depending on the orientation. Then press Enter to finalize the transformation.
- Press N to bring up the properties panel. You can also click on the + sign on the upper right of the 3D View. In the panel that appears, click on the Rotation spinner of the desired axis and enter the number in degrees.
You would also need to move your model so that it's Z zero is the same as Blender's Z zero. You can do that using the colored arrows at the origin of your model, or using the Location spinners as above.
Depending on your model, it might be good to add a ground plane. Choose Add > Mesh > Plane and on the left panel change Radius to something big. Move the plane as you wish using the colored arrows in the viewport.
Lighting your model.
The dotted circle you see is a blender light. To see its effects on your model, you need to switch to Material Viewport Shading from the viewport shading menu.
Your model should now look something like the screenshot above. I have selected the pre-existing lamp and on the right you can see the Light panel selected in the Properties editor. The Energy spinner controls its intensity.
If you would like to see shadows, change the light type to Sun. You can duplicate the existing light to add more lights, or use the Add > Lamp menu. Things are added where the 3D cursor () is so left click anywhere to position your cursor before adding.
TIP: If shadows aren't visible even after changing the lamp type to Sun change momentarily from Blender Render to Blender Game and increase the lamp Frustum Size.
When you are happy with the lighting, switch to the cycles rendering engine, by choosing Cycles Render from the render engine menu. You will lose the shadow and lighting effects but you can always switch back to Blender Render to preview them.
Making concrete look like concrete
Creating materials in blender or any other 3D graphics environment is a science of its own. In order to keep the size of this tutorial down, I will not delve into materials, but rather provide a ready made concrete material to use. Download concrete.blend and append the concrete material it contains to your document by choosing File > Append. Choose the downloaded
.blend file and then Materials > Concrete and click Append from Library.
Many thanks to seier for the texture.
With the model selected you open the material properties panel and choose Concrete from the list. You can now choose the Rendered viewport shading to check out the result. Be patient. Rendering can take some time. If you have a capable graphics card you can turn on GPU rendering from the user preferences and the Render properties panel, and significantly improve performance.
Time to set up our camera. Navigate your view to somewhere interesting and press Space. A search interface for blender commands will appear . Type Align and choose Align Camera To View from the results.
Now you need to open the Properties panel if it is not already open by pressing N and check Lock Camera to View . The camera border turns red and you can now move the camera with you just as you navigate your model. Compose your photo and uncheck Lock Camera to View to exit the camera adjustment mode.
Press F12 and wait for the tiles to fill up the screen. The default settings should be adequate but you can always bump up the quality at the expense of speed in the Render panel.
Save your image with F3 or by clicking Image > Save As Image
The second part of the tutorial will cover uploading to sketchfab and creating an interactive experience.
Written with StackEdit.