STRUCTURE supports using your own 3D objects. Here we will discuss using your own objects. We are working on a video to describe this whole process, but for now, here is the main points to know.
STRUCTURE uses OBJ files. This is a text based 3D object description format. You can usually take any 3D object type from other applications and export as OBJ (also called Wavefront OBJ File)
While there is no file size limitation on what STRUCTURE will attempt to bring in, we recommend keeping the files below 1Mbyte. Larger than this and it just takes a lot longer to load off the SDCard.
If you are pulling a 3D object from something not intended for visual graphics, chances are it is missing something called a UV map, or a texture map. This is required for STRUCTURE as it indicates how to wrap incoming visual information around the object. STRUCTURE uses four things that need to be in the OBJ file that you write out:
STRUCTURE only supports triangular faces, or faces described with 3 vertices. While the OBJ file supports quadrilateral faces, NURBS, etc, the underlying GL system does not support them.
For free software to convert/create 3D objects, we recommend using Blender. Our tutorials and settings will be based on Blender as well. Also note, if you do not find a conversion in/out by default for a 3D object type you are trying to work with, there are a lot of plugins people write to work with Blender, so you may be able to find something that you can install (or activate) to do the conversion you need. (The underlying programming language for interfacing with Blender is Python).
If you need to align your objects so they come out facing you in STRUCTURE, in Blender, this diagram will help understand that. First, make sure your object is aligned as shown (Monkey face being the front)
Second, when you export to OBJ, it will ask you about how you want to translate the coordinates, you want to put:
Now your object will be aligned properly on import.
The last step in this process is getting the OBJ file into STRUCTURE. If you have a fresh SDCard that you are using with STRUCTURE, save a preset. This will trigger creating all the directories you need. OR, if you just want to create the directory yourself, at the root of the SDCard, create a directory called
In this directory, name your file with the .obj extension. Now, when you restart structure (it will ask to restart when you put your SDCard back in) you should see your object listed in the OBJ list.
Note: One thing we do is use a name like 0-stars.obj so it shows up first in the list.
IMAGE -> OBJECT Surface (texture mapping)
In computer graphics, UV coordinates are used to map an image to a surface. The entire image no matter the size is mapped to the coordinate (0,0) to (1,1). This is referred to being normalized.
In most 3D software, after you’ve created your UV map, you can normally write out a texture with the areas baked in so you can place your graphics assets in those areas and when the image is loaded into a texture and applied to your object, the graphics will be where they are expected.
Before you get frustrated with this, there really is an art to generating texture maps on complex shapes. There are a lot of videos out there to help you.
That said, we’ve created one example of and object installed in STRUCTURE with an example IMAGE that you can customize on the front SDCard and use your own mapping! We suggest using the file unmodified first just so you can make sure you get everything set up properly.
Download this image and place in the /image directory on the SDCard. The image has to be 720×480, 24-bit color and saved in the PNG format. We’ll call the file ‘CubeMap.png’
You can select the NODESET:
If you have firmware 1.1 or greater, you can select the EFX1 node, go to PARAMS and set “Initial Bypass State” to ON. This will turn off the EFX1 (in case you save it and want to start with it off. EFX can have the bypass turned on and off in ACTION or STATE settings).
SET 3D OBJECT INPUT
Go to the FILE selection for the 3D Node, and change the FILESET to FRAG. Make sure you have “input2ToShape” loaded. (This puts the IMG on the shape).
SET 3D OBJECT
Go to the FILE selection for the 3D Node, and change the FILESET to OBJ. You can select any of the following, all their texture UV maps are the same, just different number of triangles making up the sides:
SET 3D VERT SHADER
Make sure you have the ‘basic’ VERT shader loaded for the 3D object. This will prevent any moving of vertexes based on the CV5 setting (if you are using default modulators).
SET IMAGE TO TEXTURE MAP
If you had only one image on the SDCard, it will be loaded. If not, you’ll need to go to the IMG files and select it.
And that’s it! Your image should be on the cube and look like the video below!