e1 = eos.one_parameter_EoS(g, dg, d2g, r, dr, v) e2 = eos.canal_surface(g, dg, d2g, r, dr, v) ############################################################ lbu.clear_scene(meshes=True, lamps=True, cameras=False) lbu.set_scene(resolution_x=1400, resolution_y=960, resolution_percentage=100, alpha_mode='SKY', horizon_color=[1, 1, 1], light_samples=2, use_environment_light=False) lbu.add_point_light(name="lamp", energy=1, shadow_method='NOSHADOW', location=[-3.83856, -4.3118, 6.04704]) scene = bpy.context.scene cam = scene.camera cam.location = [14.6387, -19.52351, 0.52857] cam.rotation_euler = numpy.array([87.975, 0.62, 393.916]) * numpy.pi / 180.0 cam.data.lens_unit = "FOV" cam.data.angle = 6.1 * numpy.pi / 180.0 cam.data.shift_x = 0.018 cam.data.shift_y = 0.03 eos1 = myl.addTensorProductPatch(e1[:, :, 0], e1[:, :, 1], e1[:, :, 2], name="envelope_1",
lbu.clear_scene(meshes=True, lamps=True, cameras=False) lbu.set_scene(resolution_x=800, resolution_y=800, resolution_percentage=100, alpha_mode='SKY', horizon_color=[1, 1, 1], light_samples=16, use_environment_light=True, environment_energy=0.3, environment_color='PLAIN') ## Set Lighting lbu.add_point_light(name="lamp", energy=1.2, shadow_method='RAY_SHADOW', shadow_ray_samples=16, shadow_soft_size=2.0, location=[3.75, 1.65, 3.20]) ## Set Camera cam = scene.camera cam.location = [2.102, 1.798, 1.104] cam.rotation_euler = numpy.radians(numpy.array([66.7, 0.778, 132.2])) cam.data.angle = numpy.radians(37.72) ################################################# ################################################# bpy.ops.import_scene.obj(filepath=pthin + 'mesh/mesh.obj', axis_forward='Y', axis_up='Z') obj = bpy.data.objects['mesh']
resolution_percentage=100, alpha_mode='SKY', horizon_color=(1, 1, 1), light_samples=16, use_environment_light=True, environment_energy=0.3, environment_color='PLAIN') light_settings = scene.world.light_settings light_settings.use_ambient_occlusion = False #True light_settings.ao_factor = 0.5 light_settings.ao_blend_type = 'MULTIPLY' ## Set Lighting lamp = lbu.add_point_light(name="lamp", energy=1.2, shadow_method='RAY_SHADOW', shadow_ray_samples=16, shadow_soft_size=2.0, location=(2.66, 0.99, 2.49)) ## Set Camera cam = scene.camera cam.location = (2.102, 1.798, 1.104) cam.rotation_euler = numpy.radians((66.7, 0.778, 132.2)) #cam.rotation_euler = numpy.radians((66.7, 0.778, 127.3)) cam.data.angle = numpy.radians(37.72) ################################################################ ################################################################ # LOAD VERTICES verts = [] f = open(pthin + 'debug/verts.dat', 'r')
alpha_mode='TRANSPARENT', horizon_color=(1, 1, 1), light_samples=16, use_environment_light=True, environment_energy=0.3, environment_color='PLAIN') light_settings = scene.world.light_settings light_settings.use_ambient_occlusion = False #True light_settings.ao_factor = 0.5 light_settings.ao_blend_type = 'MULTIPLY' ## Set Lighting lamp = lbu.add_point_light( name="lamp", energy=1.2, shadow_method='RAY_SHADOW', #'NOSHADOW', shadow_ray_samples=16, shadow_soft_size=2.0, location=(2.66, 0.99, 3.34) #location=(-2.68, 1.65, 3.20) ) lamp.data.shadow_color = 0.3 * numpy.ones(3) ## Set Camera cam = scene.camera cam.location = (2.102, 1.798, 1.104) #cam.rotation_euler = numpy.radians((66.7, 0.778, 132.2)) cam.rotation_euler = numpy.radians((66.7, 0.778, 127.3)) cam.data.angle = numpy.radians(37.72) ################################################################ ################################################################ # LOAD VERTICES
lbu.clear_scene(meshes=True, lamps=True, cameras=False) lbu.set_scene(resolution_x=800, resolution_y=600, resolution_percentage=100, alpha_mode='SKY', horizon_color=[1, 1, 1], light_samples=16, use_environment_light=True, environment_energy=0.3, environment_color='PLAIN') ## Set Lighting lbu.add_point_light(name="lamp", energy=1, shadow_method='RAY_SHADOW', shadow_ray_samples=1, shadow_soft_size=0.01, location=[1.37, -1.89, 0.9]) ################################################# ################################################# bpy.ops.import_scene.obj( filepath='/d/bandrieu/GitHub/FFTsurf/test/demo_EoS_MAT/mesh_eos_optim.obj', axis_forward='Y', axis_up='Z') eds = bpy.data.objects['mesh_eos_optim'] lbe.set_smooth(eds) mat_eds = bpy.data.materials['mat1'] mat_eds.diffuse_color = (0.5, 1, 0.5) mat_eds.diffuse_intensity = 1
resolution_y=resy, resolution_percentage=100, alpha_mode='SKY', horizon_color=(1, 1, 1), light_samples=16, use_environment_light=True, environment_energy=0.3, environment_color='PLAIN') light_settings = scene.world.light_settings light_settings.use_ambient_occlusion = False #True light_settings.ao_factor = 0.5 light_settings.ao_blend_type = 'MULTIPLY' ## Set Lighting lamp = lbu.add_point_light(name="lamp", energy=1.0, shadow_method='NOSHADOW', location=(-2.68, 1.65, 3.20)) ## Set Camera cam = scene.camera cam.location = (2.102, 1.798, 1.104) cam.rotation_euler = numpy.radians((66.7, 0.778, 132.2)) cam.data.angle = numpy.radians(37.72) ################################################################ ################################################################ # COLOR PALETTE """ color_faces = numpy.loadtxt('/d/bandrieu/GitHub/These/memoire/figures/data/BRep/face_color.dat') color_faces = lco.cc_hsv(color_faces, fs=1.2, fv=1.0) ncolors = len(color_faces)
lbu.clear_scene(meshes=True, lamps=True, cameras=False) lbu.set_scene(resolution_x=800, resolution_y=600, resolution_percentage=100, alpha_mode='SKY', horizon_color=[1,1,1], light_samples=16, use_environment_light=True, environment_energy=0.2, environment_color='PLAIN') ## Set Lighting lamp = lbu.add_point_light(name="lamp", energy=1.5, shadow_method='RAY_SHADOW', shadow_ray_samples=16, shadow_soft_size=3.0, location=[3.73603, -0.89244, 5.9]) lamp.data.distance = 30 lamp.data.shadow_color = 0.6*numpy.ones(3) ## Set Camera cam = scene.camera cam.location = [4.40783, -5.13018, 4.29261] cam.rotation_euler = numpy.radians(numpy.array([55.137, 0.574, 44.611])) cam.data.lens = 35.0 ################################################# #########################################