Just Association - Creative, Collaborative Interfaces.

How to export a Textured .obj file from Blender to Starlogo TNG

This is a tutorial which should explain how to export a shape with its texture, from Blender into Starlogo TNG, as a .obj file.
Blender is a free open source 3d modelling suite. Blender is brilliant and free, but its initial learning curve is very steep, so if like me you aren't a technical genius, make sure that you have spent time getting to know the interface and making some simple shapes before attempting this. This method has worked for me, but it does seem to be hit & miss, if you know a simpler way please let me know.

This tutorial is intended for people who are relatively comfortable creating textured shapes within Blender.
If you want to learn more about Blender, or download it for free and get started then go to
the official site http://www.blender.org or supporting site http://www.blendernation.com

For this example I am creating a new house shape, obviously you can use this tutorial to create any shape you want.

The Folder 'newhouse' is an example of a Starlogo TNG model folder.
This tutorial will instruct you how to create a folder similar to this with different content, which can then be imported to Starlogo TNG.

Newhouse, contains the following
default_icon.png = a 64 x 64 pixel thumbnail image for use within the program
newhouse_h2yes.png = the texture file, usually 256 x 256 pixels. Its name is arbitary.
newhouse.mtl = a type of text file, readable in simple text edit programs that tells Starlogo TNG which textures to attach to the shape and where. This is written by Blender.
newhouse.obj = the new 3d model.

In order to create our textured model we need to create a shape and texture it in Blender.

File/New Project

In the 3d window - Should be to the left hand side as you start up.
Create your shape - for a simple geometric shape, press space bar & navigate the sub menus to choose a shape.
e.g. 'Space Bar'/add//cone
The tab at the bottom of the window should be on 'object mode' if not press 'tab' to select object mode.
Make sure that you have only the object that you want to texture selected, zoom out using your scroll wheel.
If you are unsure as to what you have selected, press 'a' to select all, and 'a' again to deselect all.
Now right click on your object to select it.
Press 'Tab' to move into edit mode
Press the 'u' key & select 'unwrap' or 'unwrap smart projections'

In the image window, Should be to the right of the 3D window
Click the UV tab
Select uv's/scripts/save uv face layouts
It usually asks you to save your face layout as a tga file
Save the image file to the same folder.

Open image in Photoshop or Gimp & save it as a .png
& edit as you like and save it again as a .png
Go back to blender

In Image window
Click on image/reload or image/open
Browse to your new texture image, select the image & open it
This image should now be wrapped around the model
Press 'tab' to select object mode.

In the top pulldown menu Go to File/Export/waveform .obj
Export using the following options, triangulation & rotate x 90 is particularly important for Starlogo TNG

Creating thumbnail In Photoshop or Gimp
• Create a 64 x 64 pixel image to use as the thumbnail for your new model within the Starlogo TNG, it can be any image as long as it is in the same folder as your model and it is called default_icon.png

Your Folder
• This should give you the
• .obj model
• .mtl file
• default_icon.png (64 x 64 pixels)
• yourtexture_file.png (256 x 256 Pixels)

Implanting your new model
Copy this folder into one of the Starlogo TNG model folders e.g.
Appplications/starlogotng/models/ - whichever subcategory of models you want to place your custom model in.

My first Textured Starlogo TNG Model, next to a re-skinned Kenny.
"Sponsored by Coke, the real thing for The Next Generation !!! "

What could go wrong
• Make sure that before you export your model that you are in 'object' mode (tab between object & edit modes) and that the model (& nothing else you don't want) is selected.
• No need to use the textures & pipelines window to upload the texture
• Make sure that you aren't still using any of the files Starlogo needs to read, in the applications you created them with, e.g. Photoshop, or Blender.
• Make sure that your new model dosen't have a name that conflicts with other models within Starlogo TNG.