hi, i did my first learning step with the blink node. so please bear with me ...
The idea is to unwrap via the UV data the RGB image. which kind of works .. its just very slow!!! and when i try to switch on the GPU support i get "error compiling kernel for gup" (Quadro4000). so something goes quite wrong. someone has an idea why is my code not "GPU-Blink conform" and why is it so slow? maybe its the same reason. i'm on linux with 8.0v3 and Quadro4000. any help would be much appreciated thanks thorsten NK script: set cut_paste_input [stack 0] version 8.0 v3 push $cut_paste_input Camera2 { translate {0 0 6.63399982} name Camera2 selected true xpos -580 ypos -256 addUserKnob {20 Projector} addUserKnob {22 makeProjectorButton l "Make Projector..." -STARTLINE T projector.makeProjectorNode()} } Dot { name Dot9 selected true xpos -556 ypos -165 } Dot { name Dot10 selected true xpos -482 ypos -165 } CheckerBoard2 { inputs 0 format "2048 2048 0 0 2048 2048 1 square_2K" boxsize 128 name CheckerBoard4 selected true xpos -437 ypos -446 } Reformat { type scale scale {1 0.5} name Reformat2 selected true xpos -437 ypos -374 } add_layer {UV UV.red UV.green} Expression { channel0 {UV.red -UV.green} expr0 x/width channel1 {-UV.red UV.green} expr1 y/height name Expression4 selected true xpos -437 ypos -327 } Sphere { rotate {0 {curve x1 90 x25 180 x51 270} 0} name Sphere2 selected true xpos -437 ypos -267 } Constant { inputs 0 channels rgb format "2048 2048 0 0 2048 2048 1 square_2K" name Constant3 selected true xpos -708 ypos -254 } Dot { name Dot14 selected true xpos -674 ypos -86 } Dot { name Dot15 selected true xpos -479 ypos -86 } ScanlineRender { inputs 3 name ScanlineRender1 selected true xpos -437 ypos -41 } PostageStamp { name PostageStamp5 tile_color 0xffff selected true xpos -437 ypos 36 postage_stamp true } Reformat { type scale scale 0.2 name Reformat1 selected true xpos -437 ypos 119 } Unpremult { name Unpremult4 selected true xpos -437 ypos 154 } Dot { name Dot24 selected true xpos -403 ypos 192 } set N5897690 [stack 0] Shuffle { in UV in2 rgba blue black alpha alpha2 black black white black red2 black green2 black name Shuffle8 selected true xpos -342 ypos 188 } Unpremult { name Unpremult3 selected true xpos -342 ypos 214 } push $N5897690 BlinkScript { inputs 2 ProgramGroup 1 KernelDescription "1 \"DepthBlurKernel\" iterate pixelWise d0fc5bd4763ceb7d4c2ea473cb313df91e9e37ed575e88a2f40bcbda012bd7a3 3 \"src\" Read Random \"uv\" Read Random \"dst\" Write Point 2 \"detail\" Int 1 6AMAAA== \"offset Range\" Float 2 F7fROBe30Tg=" kernelSource "\n//value taken from the second input.\nkernel DepthBlurKernel : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead,eAccessRandom, eEdgeClamped> src; //source image\n Image<eRead, eAccessRandom> uv; //uv image\n Image<eWrite> dst; //output image\n\nparam:\n //decimal places, default 1000 ->last 2 decimals are used\n int detail;\n float2 offsetRange;\nlocal:\n \n void define() \{\n //user parameter for decimals\n defineParam(detail, \"detail\", 1000); \n\n defineParam(offsetRange, \"offset Range\", float2(0.0001f, 0.0001f));\n \}\n\n //The init() function is run before any calls to process().\n void init() \{\n\n \}\n\n //The process function is run at every pixel to produce the output.\n void process(int2 pos) \{\n \n //kill random bad pixels\n dst(0) = 0;\n dst(1) = 0;\n dst(2) = 0;\n\nfloat dstX = float(int (pos.x*1.0 / src.bounds.width() *detail))/detail;\nfloat dstY = float(int (pos.y*1.0 / src.bounds.height() *detail))/detail;\n\n\n for (int x = 0; x <src.bounds.width(); x++) \{\n for (int y = 0; y <src.bounds.height(); y++)\{\n //getting UV value\n float uvFloatValueX = float (int (uv(x, y,0) * detail) )/ detail;\n float uvFloatValueY = float (int (uv(x, y,1) * detail) )/ detail;\t\n //checking for the match in the unWrapped image\n if ( ( (uvFloatValueX - offsetRange.x <= dstX) && (uvFloatValueX + offsetRange.x >= dstX) )\n &&\n ( (uvFloatValueY - offsetRange.y <= dstY) && (uvFloatValueY + offsetRange.y >= dstY) ) )\n \{\n //writing RGB value\n dst(0) = src(x,y,0);\n dst(1) = src(x,y,1);\n dst(2) = src(x,y,2);\n \} \n \} \n \} \n\}\t\n \n\};" useGPUIfAvailable false rebuild "" "DepthBlurKernel_offset Range" {0.001 0.001} name BlinkScript19 selected true xpos -437 ypos 298 } _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev