Blender Real-time Exporter (simple version)

Sometimes, working with tools like Processing or Grasshopper I’ve felt the lack of maneuverability of blender meshes modeling. I therefore decided to develop a small script for export my mesh refreshing it in real-time. This will make it possible to read information from different software programs interactively with the ability to store files prefix.vertices and prefix.faces, containing respectively the vertices and faces of the mesh.
Is also possible to simultaneously export multiple objects with the ability to apply the modifiers before exporting. The export deals only with the mesh, so there are not applied the transformations like translation / rotation / scale of the object.

 

 

Following is a brief description of the syntax adopted for export .vertices file:

n_vertices
vertex_01_x vertex_01_y vertex_01_z
vertex_02_x vertex_02_y vertex_02_z
vertex_03_x vertex_03_y vertex_03_z
vertex_04_x vertex_04_y vertex_04_z
vertex_05_x vertex_05_y vertex_05_z
...

and .faces file:

n_faces
face_01_vertex_01_ID face_01_vertex_02_ID face_01_vertex_03_ID face_01_vertex_04_ID
face_02_vertex_01_ID face_02_vertex_02_ID face_02_vertex_03_ID face_02_vertex_04_ID
face_03_vertex_01_ID face_03_vertex_02_ID face_03_vertex_03_ID face_03_vertex_04_ID
face_04_vertex_01_ID face_04_vertex_02_ID face_04_vertex_03_ID face_04_vertex_04_ID
...

In the future, the intention would be to expand export opportunities allowing you to export files with different formats and reporting information about the vertex-colors.

Installation of Blender Real-time Exporter:
Download realtime_mesh_exporter.py and open it with blender text editor, press Alt-P for run the script and in Object Data menu it will appear the new panel: Real-time Mesh Exporter.

You can also try the exporter with my simple Processing sketch BlenderToProcessing.pde. I don’t use libraries like toxiclibs or hemesh, but only Processing function beginShape(). So with particular quad faces it gives some errors of visualization.

Happy Blending

About these ads

6 commenti a “Blender Real-time Exporter (simple version)”

  1. Hello. I am wondering if you can help me. I have installed your scripts as you show in your video but I can not see the blender object in the processing window when the script is running.
    Any help please?

    Thank you

    Marco

  2. hi Marco!
    try to check if the files have been written correctly, opening with your text editor. Then check if the processing path is set for the same directory. Which version of blender / processing do tou use?

  3. which files do you mean for me to check? And I am using Blender 2.6 and processing 2.0.
    thank you

    • Well, the script was deprecated, this is a newer version that I tested with blender 2.65:
      http://alessandrozompa.altervista.org/download/simple_realtime_mesh_exporter_v265.py

      After running the script, in blender intarface you will find the exporter panel inside the “Object Data” menu. Here set the path where you want to save your mesh informations. It is important that you use the same path for both blender and processing. It is a good choice to store information from blender directly inside processing sketch.
      I also updated the .pde file for a small fix. Now it looks directly for files “myMesh.vertices” and “myMesh.faces” inside the sketch folder. (obviously you must use the right name)

  4. it works! :D
    I think it was the updated script version for blender. But thanks a lot! Its great.

Lascia un Commento

Fill in your details below or click an icon to log in:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Connessione a %s...

Iscriviti

Ricevi al tuo indirizzo email tutti i nuovi post del sito.

%d bloggers like this: