像素相关


struct dd

(
 fn i =
 (
delete $VoxelBox*
 try(GT_script_path_work (getSourceFileName()))catch()

rbmp = render outputsize:[32,32] channels:#(#zdepth) vfb:off
-- rbmp = render outputsize: [60 , 60 ] channels:#(#zdepth) vfb:off

z_d = getchannelasmask rbmp #zdepth

-- 解析他的通道
-- z_d = getchannelasmask rbmp #zdepth

progressstart "Rendering Voxels..."
---- 开始进行结算。

for y = 1 to rbmp.height do

(

 progressupdate (100.0 * y / rbmp.height)

 pixel_line = getpixels rbmp [0,y-1] rbmp.width -- 坐标00 点开始

 z_line = getpixels z_d [0,y-1] rbmp.width  -- 收取 ap 的

 for x = 1 to rbmp.width do

 (

  b = box width:10 length:10 height:(z_line[x].value/2)

  b.pos = [x*10,-y*10,0]

  b.wirecolor = pixel_line[x] --- 主要是用色

  b.name = uniquename "VoxelBox"

 )--end x loop

)--end y loop

progressend ()
) ---enf fn

)
 pp = dd()
pp.i()

你可能感兴趣的:(像素相关)