0
$\begingroup$

I wonder, how can I render a 3D shape by positioning the camera on X number of equidistant (or almost equidistant) points on a regular dodecahedron in Python and using Blender's API? What I want to do is similar to the picture shown below as done in a paper we have in a computer vision conference:

enter image description here

The code used for our previous project was written by my co-author and is in C++. However, for my new project I cannot use the C++ code he wrote for our previous work and my knowledge is limited in computer graphics. More specifically, I need help to write code for the following procedure:

Suppose a mesh like this is loaded into Blender. I first want to compute the camera distance to the centroid of the mesh. The centroid should be computed as the average of the mesh faces' centers, weighted by their area. How can I do that in Python? Then I want to compute X number of, equidistant, points on a dodecahedron so that I can position the camera using them and render the shape. X could be any even valid number for a regular dodecahedron (e.g. 20).

$\endgroup$
  • $\begingroup$ May be better suited to Blender artists jobs forum $\endgroup$ – batFINGER Feb 8 '18 at 6:40
  • $\begingroup$ 1) create the dodeahedron in blender 2) import or create your model 3) the script should just be about accessing the dodecahedron vertices and position to them for every frame (insert a keyframe for each vertex) and rotate the camera toward (look_at()) the model. What do you think? - btw: blender.stackexchange.com/questions/48/… $\endgroup$ – Bruno Feb 8 '18 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.