当前位置: 首页 > news >正文

手机wap网站开发九游下载安装载

手机wap网站开发,九游下载安装载,网站建设北京海淀,建筑网校有哪些blender scripting 编写 一、查看ui按钮对应的代码二、查看或修改对象名称三、案例#xff1a;渲染多张图片并导出对应的相机参数 一、查看ui按钮对应的代码 二、查看或修改对象名称 三、案例#xff1a;渲染多张图片并导出对应的相机参数 注#xff1a;通过ui交互都设置好… blender scripting 编写 一、查看ui按钮对应的代码二、查看或修改对象名称三、案例渲染多张图片并导出对应的相机参数 一、查看ui按钮对应的代码 二、查看或修改对象名称 三、案例渲染多张图片并导出对应的相机参数 注通过ui交互都设置好如果ui能渲染该代码就能运行成功。 import bpy import math import os from mathutils import Vector, Matrix from math import radians import bmesh import datetime import time import numpy as np import os #from os import pathscenenumberbaseline_scene6_clean#basefolderos.path.join(os.path.expanduser(~), Documents, Zantis, scenenumber) scene bpy.data.scenes[Scene] #scene.camera.rotation_modeYZX def length():leg0.00p1[0.0,0.0]temp0ob bpy.context.object # active objectfor p in ob.data.splines.active.bezier_points:p2p1p1[p.co.x,p.co.y]if(temp0):temp1continuedistance math.sqrt( ((p1[0]-p2[0])**2)((p1[1]-p2[1])**2) )leglegdistancereturn legitem0 multiply40 camera bpy.data.objects[Camera] targetbpy.data.objects[mesh.001] my_obj[]#my_obj.append(019) #my_obj.append(021) #my_obj.append(029) #my_obj.append(030) #my_obj.append(031) #my_obj.append(032) #my_obj.append(033) #my_obj.append(034) my_obj.append(040) #my_obj.append(042)t1 time.time()#import bpy#for ob in bpy.context.selected_editable_objects:# ob.active_material_index 0# for i in range(len(ob.material_slots)): # bpy.ops.object.material_slot_remove({object: ob})for item in my_obj:#break# basefolderos.path.join(os.path.expanduser(~), Desktop, Urban_Enviroment_Texturing,Mesh_Texturing_Pipeline, Scenes, 005, images)basefolder os.path.join(E:\\, chromeDownload, mvs_test, scenes, 006, images)t2 time.time()for ob in bpy.context.selected_objects:ob.select_set(False)curvCurve.itempath bpy.data.objects[curv]camera.select_set(True)path.select_set(True)# bpy.context.view_layer.objects.active path # parent# bpy.ops.object.parent_set(typeFOLLOW) # follow path# camera.locationpath.matrix_world bpy.context.object.data.splines.active.bezier_points[0].co# target.locationpath.matrix_world bpy.context.object.data.splines.active.bezier_points[1].co# directarget.location-camera.locationframes(int)(length()*multiply) # bpy.data.scenes[Scene].frame_endframes# bpy.context.object.data.path_durationframesframe_is0framesframes1print(frames)count0for frame_is in range(scene.frame_start, scene.frame_end 1):# for frame_is in range(frames - 3):t3 time.time()scene.frame_currentframe_is#print(scene.frame_currents # sstr(scene.objects[Camera].matrix_world[0][3])_str(scene.objects[Camera].matrix_world[1][3])_str(scene.objects[Camera].matrix_world[2][3])_ # ssstr(direc[0])_str(direc[1])_str(direc[2]).jpgs str(scene.frame_current).zfill(5).jpgimage_filepathos.path.join(basefolder,s)#print(s)bpy.data.scenes[Scene].render.filepath image_filepath # bpy.ops.render.render(write_stillTrue)elapsedTime time.time() - t3print(Frame time passed {hours:d}:{minutes:d}:{seconds:d}.format(hoursint((elapsedTime / 60 ** 2) % (60 ** 2)), minutesint((elapsedTime / 60) % (60)),secondsint(elapsedTime % 60)))# print(path to create: , os.path.join(os.path.expanduser(~), Desktop, Data,Depth_data,scenenumber_item))if not os.path.exists(os.path.join(os.path.expanduser(~), basefolder)):os.mkdir(os.path.join(os.path.expanduser(~), basefolder))if not os.path.exists(os.path.join(os.path.expanduser(~), basefolder, RTm/)):os.mkdir(os.path.join(os.path.expanduser(~), basefolder, RTm/))# Set up rendering of depth map:bpy.context.scene.use_nodes Truetree bpy.context.scene.node_treelinks tree.links# clear default nodesfor n in tree.nodes:tree.nodes.remove(n)# create input render layer noderl tree.nodes.new(CompositorNodeRLayers)RGB2BW tree.nodes.new(typeCompositorNodeRGBToBW)links.new(rl.outputs[0], RGB2BW.inputs[0])map tree.nodes.new(typeCompositorNodeMapValue)# Size is chosen kind of arbitrarily, try out until youre satisfied with resulting depth map.map.size [0.05]map.use_min Truemap.min [0]map.use_max Truemap.max [1]links.new(rl.outputs[2], map.inputs[0])mix_multi tree.nodes.new(typeCompositorNodeMixRGB)# Size is chosen kind of arbitrarily, try out until youre satisfied with resulting depth map.mix_multi.blend_type MULTIPLYmix_multi.inputs[2].default_value[0] 0.5mix_multi.inputs[2].default_value[1] 0.5mix_multi.inputs[2].default_value[2] 0.5 # mix_multi.inputs[2].default [0.5 , 0.5, 0.5, 1.0]links.new(rl.outputs[3], mix_multi.inputs[1])mix_multi2 tree.nodes.new(typeCompositorNodeMixRGB)# Size is chosen kind of arbitrarily, try out until youre satisfied with resulting depth map.mix_multi2.blend_type ADDmix_multi2.inputs[2].default_value[0] 0.5mix_multi2.inputs[2].default_value[1] 0.5mix_multi2.inputs[2].default_value[2] 0.5links.new(mix_multi.outputs[0], mix_multi2.inputs[1])invert tree.nodes.new(typeCompositorNodeInvert)links.new(map.outputs[0], invert.inputs[1])# The viewer can come in handy for inspecting the results in the GUIdepthViewer tree.nodes.new(typeCompositorNodeViewer)links.new(invert.outputs[0], depthViewer.inputs[0])# Use alpha from input.links.new(rl.outputs[1], depthViewer.inputs[1])# Normal map# The viewer can come in handy for inspecting the results in the GUIdepthViewer2 tree.nodes.new(typeCompositorNodeViewer)links.new(rl.outputs[1], depthViewer2.inputs[1])links.new(mix_multi2.outputs[0], depthViewer2.inputs[0])# fileOutput tree.nodes.new(typeCompositorNodeOutputFile) # fileOutput.base_path os.path.join(os.path.expanduser(~), Desktop, Data,Depth_data,scenenumber_item, depth) ## fileOutput.file_slots[0].path str(scene.frame_current).zfill(5) # links.new(invert.outputs[0], fileOutput.inputs[0]) # # fileOutput2 tree.nodes.new(typeCompositorNodeOutputFile) # fileOutput2.base_path os.path.join(os.path.expanduser(~), Desktop, Data,Depth_data,scenenumber_item,normal) ## fileOutput2.file_slots[0].path str(scene.frame_current).zfill(5) # links.new(mix_multi2.outputs[0], fileOutput2.inputs[0]) # # fileOutput3 tree.nodes.new(typeCompositorNodeOutputFile) # fileOutput3.base_path os.path.join(os.path.expanduser(~), Desktop, Data,Depth_data,scenenumber_item,panoramas_BW) ## fileOutput3.file_slots[0].path str(scene.frame_current).zfill(5) # links.new(RGB2BW.outputs[0], fileOutput3.inputs[0])bpy.ops.render.render(write_stillTrue)location, rotation scene.objects[Camera].matrix_world.decompose()[0:2]R_world2bcam rotation.to_matrix().transposed()T_world2bcam -1*R_world2bcam locationCamera_RT_matrix Matrix((R_world2bcam[0][:] (T_world2bcam[0],),R_world2bcam[1][:] (T_world2bcam[1],),R_world2bcam[2][:] (T_world2bcam[2],),[0,0,0,1],))np.savetxt(os.path.join(os.path.expanduser(~), basefolder, RTm)/str(frame_is).zfill(6)_RTm.txt,np.array(Camera_RT_matrix))# breakscene.frame_current0path.select_set(False)bpy.ops.object.parent_clear(typeCLEAR)# camera.select_set(False) elapsedTime time.time() - t1 print(Total time passed {hours:d}:{minutes:d}:{seconds:d}.format(hoursint((elapsedTime / 60 ** 2) % (60 ** 2)), minutesint((elapsedTime / 60) % (60)),secondsint(elapsedTime % 60))) print(Finished)
http://www.w-s-a.com/news/704831/

相关文章:

  • 商务网站建设论文答辩pptseo技术博客
  • 怎样才能有自己的网站桂林搭建公司
  • 哪个网站做视频赚钱万科
  • 莆系医疗网站建设wp如何做网站地图
  • 网站建设应急处置方案团购网站 备案问题
  • 网站建设 岗位职责浙江中天建设集团有限公司网站
  • 西海岸建设局网站用wordpress建站学什么
  • 网站静态和动态学校网站建设流程步骤
  • 做群头像的网站在线怎么做俄语网站
  • 西安网站定制开发国内cms推荐
  • windows网站建设教程视频教程wordpress默认用户头像
  • 做网站需要什么软件wordpress会员邮件通知
  • 技术支持网站合肥网站搭建
  • 无为网站设计免费制作企业网站平台
  • 社交网站第一步怎么做房屋装修效果图用什么软件
  • 企业网站 批量备案合肥 网站建设
  • 如何提高网站索引量室内设计师之路网站
  • ps怎么做响应式网站布局图现在做网站都是怎么做的
  • 导购 网站模板网站主题选择
  • 毕业设计医院网站设计怎么做郑州铭功路网站建设
  • 网站根域名是什么php做商城网站步骤
  • 建设网站的那个公司好网站建设万首先金手指12
  • 广东民航机场建设有限公司网站网站开发后端用什么
  • 做风帆网站需要多少钱越野车网站模板
  • 如何做网站平台销售用狗做头像的网站
  • 宝安电子厂做网站美食网页设计的制作过程
  • 网站logo提交学网站开发技术
  • 跨境电商平台网站建设广州西安官网seo推广
  • 我和你99谁做的网站小程序制作第三方平台
  • 建设银行网站用户名鹤岗网站seo