Skip to content
Snippets Groups Projects
Commit e8616a03 authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Correct renderer doc

parent 4ca61d2d
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ Content
comparing
moving
database
tutorials
Indices and tables
......
Rendering
=========
.. automodule:: navipy.rendering
Sensors
=======
.. automodule:: navipy.sensors
"""
Navipy & blender
----------------
What is blender?
~~~~~~~~~~~~~~~~
Explain blender
Every agent comes with a battery of senses (biological agent) \
or sensors (technical agent). The senses of agents in navipy are limited
to:
Create a world
~~~~~~~~~~~~~~
Explain How to create env for navipy
* 4d vision (brighness + depth)
Using navipy in blender
~~~~~~~~~~~~~~~~~~~~~~~
Blender comes with its own python installation. Thus, we need to \
tell blender to use our virtualenv where the navigation toolbox \
is installed. To do we need to import the os module
The 4d vision sense is controlled by rendering module, either an \
online rendering or loaded from a database containing pre-rendered images.
.. literalinclude:: blender_run.py
:lines: 6 - 7
For example to use pre-rendered images from a database:
then activate the environment by using the following function:
.. literalinclude:: example/processing/apcv.py
:lines: 10-11
.. literalinclude:: blender_run.py
:lines: 13 - 18
Then the senses can be updated at a new position orientation:
here venv_path is the path to the virtual environment within which \
navipy has been installed.
.. literalinclude:: example/processing/apcv.py
:lines: 15
Now, blender can import all modules used by the navigation toolbox.
Renderer
--------
.. automodule:: navipy.sensors.renderer
How to run python code with blender:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> blender path/to/world.blend --background --python path/to/code.py
How to generate a database using blender
----------------------------------------
.. automodule:: navipy.rendering.bee_sampling
Custom sampling
---------------
.. automodule:: navipy.rendering.cyber_bee
Rendering classes
-----------------
.. autoclass:: navipy.sensors.bee_sampling.BeeSampling
:members:
.. autoclass:: navipy.sensors.renderer.Cyberbee
:members:
"""
......
"""
.. literalinclude:: example/rendering/blenddemo_cyberbee.py
:lines: 5
Navipy & blender
----------------
What is blender?
~~~~~~~~~~~~~~~~
Explain blender
With the toolbox at disposition we just need to configure the \
Cyberbee to render images at desired positions.
Create a world
~~~~~~~~~~~~~~
Explain How to create env for navipy
.. literalinclude:: example/rendering/blenddemo_cyberbee.py
:lines: 8-13
Using navipy in blender
~~~~~~~~~~~~~~~~~~~~~~~
Blender comes with its own python installation. Thus, we need to \
tell blender to use our virtualenv where the navigation toolbox \
is installed. To do we need to import the os module
To render a scene at a given positions we just have to do:
.. literalinclude:: blender_run.py
:lines: 6 - 7
.. literalinclude:: example/rendering/blenddemo_cyberbee.py
:lines: 14-22
then activate the environment by using the following function:
.. literalinclude:: blender_run.py
:lines: 13 - 18
here venv_path is the path to the virtual environment within which \
navipy has been installed.
Now, blender can import all modules used by the navigation toolbox.
How to run python code with blender:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> blender path/to/world.blend --background --python path/to/code.py
How to generate a database using blender
----------------------------------------
.. automodule:: navipy.sensors.bee_sampling
Custom sampling
---------------
.. autoclass:: navipy.sensors.renderer.BlenderRender
Rendering classes
-----------------
.. autoclass:: navipy.sensors.bee_sampling.BeeSampling
:members:
.. autoclass:: navipy.sensors.renderer.BlenderRender
:members:
"""
import warnings
try:
......@@ -35,6 +69,21 @@ class BlenderRender():
The Bee eye is a panoramic camera with equirectangular projection
The light rays attaining the eyes are filtered with a gaussian.
.. literalinclude:: example/rendering/blenddemo_cyberbee.py
:lines: 5
With the toolbox at disposition we just need to configure the \
Cyberbee to render images at desired positions.
.. literalinclude:: example/rendering/blenddemo_cyberbee.py
:lines: 8-13
To render a scene at a given positions we just have to do:
.. literalinclude:: example/rendering/blenddemo_cyberbee.py
:lines: 14-22
"""
def __init__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment