How to use special user objects like the Apple (Food) ? 

Can you explain how I can import some 3D objects in Framsticks :
I see the example of the Apple (Food)
When I look at his genotype (f0) : I see :m:Vtyle : food...
Can you explain this, and how to use my personal 3D objects.
I see there are some AC files in the directory : can we use other 3D
formats, and how to use them.
If not, can you tell me which software can produce AC files.

Thanks !

Szymon Ulatowski's picture

The way the world is displayed depends on the specific "visual style" script, see for example 3dobj/standard.style. You will find two kinds of functions there - for building and updating visual elements. They are named after model- or element-specific visual style (defined by the Vstyle property) and by the element type (model, part, joint, neuro).

For example, food_part_build() loads the apple object, while food_part_update() scales the apple depending on the current energy level.

This presentation can help in grasping basics of writing scripts (also visualization scripts): http://www.framsticks.com/files/common/script/sz_scripting.pdf and then the best way to learn is by experimenting with existing scripts; some may already contain the required functionality and you might reach your goal by copy&paste or minor tweaks.

AC files are originally created by the AC3D application, but you can also use 3DS from 3D Studio or Blender (only the basic object properties are supported), or you could convert blender models or any other models to the AC format.