1import os 2import blend_pproc_render 3 4""" SET THESE AS ARGUMENTS """ 5 6""" SET THESE AS ARGUMENTS """ 7 8# where to look for the meshes. Use multiple paths if there are more folders to look into 9meshes_prefixes = ["C:/Users/benatti/codes/synchrono/src/data/vehicle/sedan/", 'C:/Users/benatti/codes/synchrono/src/data/simpleRural/' ] 10# directory where the generated images are saved 11out_dir = os.path.dirname(os.path.realpath(__file__)) + '/rendered_images/' 12 13# paths where the post-process outputs (.dat, .chpf) are looked for. There might be multiple files in different directories 14# defining different bodies in the same timestep (cosimulation) but the prefixes must be the same 15# e.g. : path1/001.dat, path1/001.chpf, path2/001.dat will be processed together. 16# Please, in follow and lookat modes the tracked object must be in the first element of the list 17#datadir = os.path.dirname(os.path.realpath(__file__)) 18datadir = ['./', 'C:/Users/benatti/codes/blender/NADS/dat_files/'] 19 20# resolution: 'HIGH', 'MID', 'LOW': divide by 1,4,16 the default HD resolution of 3840x2160 21res = 'MID'#'LOW' 22 23# Camera options: 'Follow', 'Fixed', 'Lookat' 24camera_mode = "Fixed" # 'Fixed' 'Lookat' 25 26# If true, sky is added 27use_sky = True 28# camera position (unused in follow mode) 29camera_pos = (200,0,200) 30 31# Camera target data: some keys might be unused depending on the type 32target = dict([ 33 # ID of the body to target (lookat and follow modes). 34 ('bodyid' , 0), 35 # ID of the shape on the body to target (lookat and follow modes). The body might have many shapes 36 ('shapetypeid' , 5), 37 # name of the mesh on the body to target (lookat and follow modes). The body might have many vis meshes 38 ('name' , 'sedan_chassis_vis'), 39 # Point to look at. Used only by Fixed 40 ('position', (0,0,-10)), 41 # Distance, relative to the target, from which the camera is looking at. Only in Follow mode 42 ('distfrom', (-15.5,-5,1.5)) 43]) 44# point light origin 45light_loc=(10, 50, 50) 46# light intensity 47light_energy=53000 48# 'up' axis 49axis_up = 'Z' 50 51blend_pproc_render.bl_render(meshes_prefixes, out_dir, datadir, res, camera_mode, use_sky, camera_pos, target, axis_up, light_loc, light_energy) 52 53