<< Primitive group in Fujiyama Renderer 戻る Furry_Amabie by Fujiyama Renderer 0.3.6 >>

Furry_bunny by Fujiyama Renderer 0.3.6

解像度160*120で何度もレンダリングしました。
8年前、5万6千円で購入したノートpc、Linux Fedora 32を入れて、fujiyama Renderer 0.3.6で、stay home, うさぎモデルfurry_bunny、52分41秒かかりました。HDR素材は@cgphysical_i
さんサイトを利用しました。
DomeLightのintensityを2.0にしました。
ありがとうございます。
furrey_bunny


#!/usr/bin/env python
# 1 furry_bunny with 32 point lights
# NOTE curvegen generates different curve color
# since noise functions have been changed since v0.0.5.
# The sample image was rendered by v0.0.2.
# Copyright (c) 2011-2019 Hiroshi Tsubokawa

# NOTE How to make bunny.crv
# $ ply2mesh bunny.ply bunny.mesh
# $ curvegen bunny.mesh bunny.crv

import fujiyama
si = fujiyama.SceneInterface()

#plugins
si.OpenPlugin('plastic_shader', 'PlasticShader')
si.OpenPlugin('constant_shader', 'ConstantShader')
si.OpenPlugin('hair_shader', 'HairShader')
si.OpenPlugin('curve_generator_procedure', 'CurveGeneratorProcedure')
si.OpenPlugin('stanfordply_procedure', 'StanfordPlyProcedure')

#Camera
si.NewCamera('cam1', 'PerspectiveCamera')
si.SetProperty3('cam1', 'translate', 1.6, 0.8, 1.8)
si.SetProperty3('cam1', 'rotate', -8.04946697553, 45, 0)

rot = 180

#Light
si.NewLight('light1', 'DomeLight')
si.SetProperty3('light1', 'rotate', 0, rot, 0)
#si.SetProperty1('light1', 'intensity', 0.0004)
si.SetProperty1('light1', 'intensity', 2.0)
si.SetProperty1('light1', 'sample_count', 256)

#Texture
si.NewTexture('tex1', '../hdr/HDR_tatami.hdr')
#si.NewTexture('tex1', '../hdr/hdrfree068.hdr')
si.AssignTexture('light1', 'environment_map', 'tex1');

#Shader
si.NewShader('curve_shader', 'hair_shader')
si.SetProperty3('curve_shader', 'diffuse', 1, 0, 0)
si.SetProperty3('curve_shader', 'specular', 1, 0.0, 0.0)
si.SetProperty3('curve_shader', 'reflect', 1, 0, 0)

si.NewShader('bunny_shader', 'plastic_shader')
#si.SetProperty3('bunny_shader', 'diffuse', 0.8, 0.5, 0.3)
si.SetProperty3('bunny_shader', 'diffuse', 1, 0, 0)
si.SetProperty3('bunny_shader', 'reflect', 1, 0.1, 0.1)

si.NewShader('floor_shader', 'plastic_shader')
si.SetProperty3('floor_shader', 'diffuse', 0.6, 0.65, 0.8)
si.SetProperty3('floor_shader', 'reflect', 0.4, 0.4, 0.4)

si.NewShader('dome_shader', 'constant_shader')

#Curve
si.NewCurve('curve_data')

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

#Procedure
si.NewProcedure('bunny_proc', 'stanfordply_procedure')
si.AssignMesh('bunny_proc', 'mesh', 'bunny_mesh')
si.SetStringProperty('bunny_proc', 'filepath', '../ply/bunny.ply')
si.SetStringProperty('bunny_proc', 'io_mode', 'r')
si.RunProcedure('bunny_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('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('bunny_hair_gen', 'curve_generator_procedure')
si.AssignMesh('bunny_hair_gen', 'mesh', 'bunny_mesh')
si.AssignCurve('bunny_hair_gen', 'curve', 'curve_data')
si.RunProcedure('bunny_hair_gen')

#ObjectInstance
si.NewObjectInstance('bunny1', 'bunny_mesh')
si.AssignShader('bunny1', 'DEFAULT_SHADING_GROUP', 'bunny_shader')

si.NewObjectInstance('floor1', 'floor_mesh')
si.SetProperty3('floor1', 'translate', 3, 0, 3)
si.AssignShader('floor1', 'DEFAULT_SHADING_GROUP', 'floor_shader')

si.NewObjectInstance('dome1', 'dome_mesh')
si.SetProperty3('dome1', 'scale', 0.5, 0.5, 0.5)
si.SetProperty3('dome1', 'rotate', 0, rot, 0)
si.AssignShader('dome1', 'DEFAULT_SHADING_GROUP', 'dome_shader')
si.AssignTexture('dome_shader', 'texture', 'tex1')

si.NewObjectInstance('curve1', 'curve_data')
si.AssignShader('curve1', 'DEFAULT_SHADING_GROUP', 'curve_shader')

#ObjectGroup
si.NewObjectGroup('group1')
si.AddObjectToGroup('group1', 'bunny1')
si.AddObjectToGroup('group1', 'curve1')
si.AssignObjectGroup('bunny1', 'shadow_target', 'group1')
si.AssignObjectGroup('curve1', 'shadow_target', 'group1')
si.AssignObjectGroup('floor1', 'shadow_target', 'group1')

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

si.ShowPropertyList('HairShader')
si.ShowPropertyList('CurveGeneratorProcedure')


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

#Rendering
si.RenderScene('ren1')

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

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

<< Primitive group in Fujiyama Renderer 戻る Furry_Amabie by Fujiyama Renderer 0.3.6 >>