1Blender_py & chrono usage 2============================================= 3 4These scripts allow to use blender to render the POVRAY output of a chrono simulation. 5 6## Tool description 7#### Structure 8This tools is composed of 3 Python scripts 91. reader.py : this script interprets the POVRAY output generated by Chrono simulation and outputs a list of lists of data 102. blend_pproc_render.py : this is the main script, that based on the information provided by _reader.py_ builds a scene and creates images 112. blender_postprocess_launcher.py: this is the sctipts that has to be launched and, ideally, the only one the user should edit. After setting the renderin options, it calls the bl_render functio from blend_pproc_render.py 12 13#### Requirements 14 15This tool only requires blender-py (bpy). If you already have Blender, use its Pytohn interpreter. 16If not, you can install blender-py with [pip](https://pypi.org/project/bpy/) . 17In addition, numpy is required. 18 19## Usage 20#### Setup 21Set the options in _blender_postprocess_launcher.py_ : 221. meshes_prefixes : list of strings. Paths to meshes folders. 232. out_dir : where to output the generated images. 242. datadir : where the .dat files generated by chrono are 253. res : images resolution: 'LOW', 'MID', 'HIGH' Images in HIGH defnition take a while to generate. 264. camera_mode : 'Follow' 'Fixed' 'Lookat'. 275. use_sky : if True, uses a Blender default sky 286. camera_pos : position of the camera. Not used in 'Follow' mode. 297. targ_bodyid / targ_shapetypeid / targ_name / in 'Follow' and 'Lookat' mode the target os found using these information. The tatget is a shape on a body. targ_bodyid is the ID of the body, targ_shapetypeid is the type of shape (5 for meshes), targ_name is the name if the target mesh (used only if targ_shapetypeid=5) 308. camera_dist : only used in 'Follow' mode. The distance, in the body local frame, of the camera from the target. 318. light_loc / light_energy location and intensity of the light energy. 32 33#### Launch 34Once the variables in _blender_postprocess_launcher.py_ are set, just launch it remembering to use the Pytohn interpreter that has blender-py installed. 35 36## Limitations and future features 37#### Current Limitiations 381. The code does not leverage multiprocessing (HD render are time consuming) 392. No default terrain 403. NO support for granular and FSI 414. Textures cannot be added to meshes 42 43#### Coming soon 44(1) will be addressed very soon, and (2) and (3) will follow shortly. 45 46