<< Furry_bunny by Fujiyama Renderer 0.3.6 戻る wine-3.6 (Ubuntu 3.6-1) install under Linux Lite. 2020/5 >>

Furry_Amabie by Fujiyama Renderer 0.3.6

アマビエ、
HDRは、サンフランシスコの教会。
furは、Building Acceleratorsに46分。
レンダリングは1分。
grid_amabie005.jpg
モデルだけ移動させたら、毛が抜けた。毛にも
SetProperty3 curve1 translate -1 0 0
が必要でした。一歩一歩、確認です。
毛の長さ0.12、CurveGeneratorProcedure2をmakeする。
grid_amabie006.jpg
Building Accelerators 4m 19s. Rendering time 43s.
毛の長さ0.04、色変更、CurveGeneratorProcedure3をmakeする。
grid_amabie4.jpg

#!/usr/bin/env python
# 1 amabie with 1 grid light Grace Cathedral, San Francisco
# Copyright (c) 2011-2019 Hiroshi Tsubokawa
import fujiyama
si = fujiyama.SceneInterface()

#plugins
#si.OpenPlugin('sss_shader', 'SSSShader')
si.OpenPlugin('constant_shader', 'ConstantShader')
si.OpenPlugin('plastic_shader', 'PlasticShader')
si.OpenPlugin('hair_shader', 'HairShader')
si.OpenPlugin('stanfordply_procedure', 'StanfordPlyProcedure')
si.OpenPlugin('wavefrontobj_procedure', 'WavefrontObjProcedure')
si.OpenPlugin('curve_generator2_procedure', 'CurveGeneratorProcedure2')

#Camera
si.NewCamera('cam1', 'PerspectiveCamera')
si.SetSampleProperty3('cam1', 'translate', 0, 1.5, 8, 0)

#Light
si.NewLight('light1', 'GridLight')
si.SetProperty1('light1', 'intensity', 2)
si.SetProperty3('light1', 'translate', 0, 10, 0)
si.SetProperty3('light1', 'rotate', 0, 0, 180)
scale = 7
si.SetProperty3('light1', 'scale', scale, scale, scale)

si.SetProperty1('light1', 'sample_count', 8)

#Texture
si.NewTexture('tex1', '../hdr/grace-new.hdr')

#Shader
si.NewShader('armadillo_shader', 'plastic_shader')
si.SetProperty3('armadillo_shader', 'diffuse', 1, 0, 0)
si.SetProperty3('armadillo_shader', 'reflect', 1, 0.1, 0.1)

si.NewShader('curve_shader', 'hair_shader')
si.SetProperty3('curve_shader', 'diffuse', 1, 1, 1)
si.SetProperty3('curve_shader', 'specular', 1, 1, 1)
si.SetProperty3('curve_shader', 'reflect', 0.5, 0.5, 0.5)
"""
si.NewShader('head_shader2', 'sss_shader')
si.SetProperty3('head_shader2', 'reflect', 0, 0, 0)
si.SetProperty1('head_shader2', 'enable_single_scattering', 1)
si.SetProperty1('head_shader2', 'enable_multiple_scattering', 0)
si.SetProperty1('head_shader2', 'single_scattering_samples', 1)
si.SetProperty1('head_shader2', 'multiple_scattering_samples', 1)
si.SetProperty3('head_shader2', 'scattering_coefficient', .07, .122, .19)
si.SetProperty3('head_shader2', 'absorption_coefficient', .00014, .00025, .00142)
si.SetProperty3('head_shader2', 'specular', .01, .01, .01)
"""

si.NewShader('floor_shader', 'plastic_shader')
si.SetProperty3('floor_shader', 'diffuse', .2, .25, .3)
si.SetProperty3('floor_shader', 'reflect', 0.95, 0.95, 0.95)

si.NewShader('dome_shader', 'constant_shader')
si.AssignTexture('dome_shader', 'texture', 'tex1')

#Curve
si.NewCurve('curve_data')

#Mesh
si.NewMesh('armadillo_mesh')
si.NewMesh('floor_mesh')
si.NewMesh('dome_mesh')

#Procedure
si.NewProcedure('armadillo_proc', 'stanfordply_procedure')
si.AssignMesh('armadillo_proc', 'mesh', 'armadillo_mesh')
si.SetStringProperty('armadillo_proc', 'filepath', '../ply/amabied.ply')
si.SetStringProperty('armadillo_proc', 'io_mode', 'r')
si.RunProcedure('armadillo_proc')

si.NewProcedure('floor_proc', 'stanfordply_procedure')
si.AssignMesh('floor_proc', 'mesh', 'floor_mesh')
si.SetStringProperty('floor_proc', 'filepath', '../ply/floor.ply')
si.SetStringProperty('floor_proc', 'io_mode', 'r')
si.RunProcedure('floor_proc')

si.NewProcedure('dome_proc', 'stanfordply_procedure')
si.AssignMesh('dome_proc', 'mesh', 'dome_mesh')
si.SetStringProperty('dome_proc', 'filepath', '../ply/dome.ply')
si.SetStringProperty('dome_proc', 'io_mode', 'r')
si.RunProcedure('dome_proc')

si.NewProcedure('bunny_hair_gen', 'curve_generator2_procedure')
si.AssignMesh('bunny_hair_gen', 'mesh', 'armadillo_mesh')
si.AssignCurve('bunny_hair_gen', 'curve', 'curve_data')
#si.SetProperty1('bunny_hair_gen', 'is_hair', 2)
si.RunProcedure('bunny_hair_gen')

#ObjectInstance
si.NewObjectInstance('armadillo1', 'armadillo_mesh')
si.SetProperty3('armadillo1', 'rotate', -90, 0, 0)
si.SetProperty3('armadillo1', 'scale', 2.2, 2.2, 2.2)
si.SetProperty3('armadillo1', 'translate', 0.3, 0, 0)
#si.SetProperty3('armadillo1', 'scale', 4.5, 4.5, 4.5)
#si.SetProperty3('armadillo1', 'translate', 1, -0.1, 0)
#si.SetProperty3('armadillo1', 'rotate', 0, 120, 0)
si.AssignShader('armadillo1', 'DEFAULT_SHADING_GROUP', 'armadillo_shader')

si.NewObjectInstance('floor1', 'floor_mesh')
si.AssignShader('floor1', 'DEFAULT_SHADING_GROUP', 'floor_shader')

si.NewObjectInstance('dome1', 'dome_mesh')
si.SetProperty3('dome1', 'rotate', 0, -90, 0)
si.AssignShader('dome1', 'DEFAULT_SHADING_GROUP', 'dome_shader')

si.NewObjectInstance('curve1', 'curve_data')
si.SetProperty3('curve1', 'rotate', -90, 0, 0)
si.SetProperty3('curve1', 'scale', 2.2, 2.2, 2.2)
si.SetProperty3('curve1', 'translate', 0.3, 0, 0)
si.AssignShader('curve1', 'DEFAULT_SHADING_GROUP', 'curve_shader')
#ObjectGroup
si.NewObjectGroup('group1')
si.AddObjectToGroup('group1', 'armadillo1')
si.AddObjectToGroup('group1', 'curve1')
si.AssignObjectGroup('armadillo1', 'shadow_target', 'group1')
si.AssignObjectGroup('curve1', 'shadow_target', 'group1')
si.AssignObjectGroup('floor1', 'shadow_target', 'group1')

#FrameBuffer
si.NewFrameBuffer('fb1', 'rgba')

#Renderer
si.NewRenderer('ren1')
si.AssignCamera('ren1', 'cam1')
si.AssignFrameBuffer('ren1', 'fb1')
si.SetProperty2('ren1', 'resolution', 640, 480)
#si.SetProperty2('ren1', 'resolution', 160, 120)
#si.SetProperty2('ren1', 'pixelsamples', 12, 12)

#Rendering
si.RenderScene('ren1')

#Output
si.SaveFrameBuffer('fb1', '../grid_amabie3.fb')

#Run commands
si.Run()
#si.Print()
  • -
  • -

<< Furry_bunny by Fujiyama Renderer 0.3.6 戻る wine-3.6 (Ubuntu 3.6-1) install under Linux Lite. 2020/5 >>