Blender to AS3.0 exporter & modifier support: short how-to

Posted by on Apr 6, 2009 in 3D, Blender5 comments

The latest Blender to ActionScript exporter supports modifiers. A detailed desciptions of what these are can be found here on the Blender site.

If you have absolutely no idea about what a modifier is then this post will give you a very short introduction :)

With modifiers you can make changes and additions to existing meshes. The specific modifier that we are going to use here is called the “Array Modifier”.  According to the Blender documentation an Array Modifier “creates an array of copies of the base object, with each copy being offset from the previous one in a number of possible ways. “. Let’s open Blender and see for ourselves.

We will use the default cube without any changes. The modifier tab is located in the “Editing Buttons” window. To go to this window press F9:

ccessing the Modifiers tab

Accessing the Modifiers tab

The Modifiers tab can be found in the lower right corner of the buttons window. Clicking on the “Add Modifier” button will open a drop down menu that lists all modifier types. Pick “Array” from this list. The Modifier tab and the 3D view should look like this now:

The Array Modifier settings

The Array Modifier settings

The 3D view after setting the Array Modifier

The 3D view after setting the Array Modifier

The cube now has a duplicate that is put next to the original cube. The duplicate can’t be changed, only the original object is changeable.

The number of objects can be increased by entering a new value in the “Count” field. The space between the objects can be increased by changing the values underneath the “Relative Offset” button:

Changing the number of objects and object spacing

Changing the number of objects and object spacing

We can make this a bit more exciting by adding rotation. You can see that there is no explicit setting for this in the Modifiers panel. A special object called an “Empty” can be used for this purpose. To add an empty press the spacebar on the 3D view and choose “Add > Empty”. Press F7 to go to the Object buttons window and make sure the object is named “Empty”:

The Empty object name

The "Empty" object name

Now we need to tell the Array Modifier to use this object as the source object. Select the cube by right-clicking on it in the 3D view. Now press F9 to go back to the Editing buttons. In the Modifier panel click on the “Object Offset” button and enter “Empty” in the input box below this button:

Associating the Empty with the Array Modifier

Associating the Empty with the Array Modifier

Select the empty in the 3D view and press “r” to rotate. You can see that all objects rotate accordingly:

Rotating the Empty

Rotating the Empty

Now we’re all set to export our object. For more details about this check the exporter page. Take a look at this page to see the object live in action with Sandy 3.1. Download all the source files here.

Tags: , ,


» Comments RSS Feed
  1. [...] UPDATE: Added support for quads (Sandy only, thanks Makc) and modifiers (short how-to here). Created a zip file instead of rar [...]

  2. this post seems to end abruptly…

  3. @makc: this post doesn’t end here. The next steps are explained in the exporter page.

  4. Humm, your blog seems to be one of those pages where my IE7 swallow whole paragraphs due to CSS bug or something. E.g., all the text after “Rotating the Empty” disappears after I scroll the page. I am subscribed to two more blogs where this happens to all comments… I think I will finally change my browser.

  5. [...] then exported to ActionScript. It won’t apply it to the actual object in the Blender scene. Go here for a short [...]

Leave a comment