How to generate a database using blender
----------------------------------------
.. literalinclude:: examples/blenddemo_beesampling.py
   :lines: 7, 8

First we configure the rendering module

.. literalinclude:: examples/blenddemo_beesampling.py
   :lines: 11, 12

With the toolbox at disposition we just need to configure the \
BeeSampling to render images on a regular 3D grid.

.. literalinclude:: examples/blenddemo_beesampling.py
   :lines: 13,16-23

If we want to use the distance to objects, we need to tell the \
BeeSampling what is the maximum distance to objects in the environment.\
 Otherwise the distance can go until infinity, and since the image are \
compressed in the database, all distances to object will be equal to \
zero:

.. literalinclude:: examples/blenddemo_beesampling.py
   :lines: 27-28

Finally we can generate the database.

.. literalinclude:: examples/blenddemo_beesampling.py
   :dedent: 4
   :lines: 31-32

(:download:`Source code <examples/blenddemo_beesampling.py>`)
(:download:`Blender world <../../../navipy/resources/forest_world.blend>`)