Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set cut_paste_input [stack 0]
- version 8.0 v1
- push $cut_paste_input
- Group {
- name mat_lava
- tile_color 0xff3200ff
- selected true
- xpos 7938
- ypos 4791
- addUserKnob {20 mat_lava}
- addUserKnob {41 color T Constant4.color}
- addUserKnob {41 color_1 l color T Constant5.color}
- addUserKnob {41 lavaLevel T NoOp1.lavaLevel}
- addUserKnob {41 level_smooth T NoOp1.level_smooth}
- addUserKnob {20 TAGS}
- addUserKnob {1 Asset_name}
- addUserKnob {1 Asset_type}
- addUserKnob {1 Class}
- Class BD_Etalo
- addUserKnob {1 Backdrop_type}
- addUserKnob {1 Color}
- addUserKnob {1 EXR_version}
- addUserKnob {1 Misc}
- Misc RecompositionTree
- addUserKnob {1 Exit}
- }
- Input {
- inputs 0
- name pointWorld
- xpos 400
- ypos 278
- }
- Dot {
- name Dot1
- xpos 434
- ypos 402
- }
- set N49271450 [stack 0]
- Group {
- name WPosToNoise1
- tile_color 0x308fffff
- xpos 620
- ypos 518
- addUserKnob {20 WPosToNoise}
- addUserKnob {6 red +STARTLINE}
- addUserKnob {6 green -STARTLINE}
- green true
- addUserKnob {6 blue -STARTLINE}
- blue true
- addUserKnob {6 rgb_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {41 noiseType T PToN_exp.noiseType}
- addUserKnob {41 octaves l Octaves -STARTLINE T PToN_exp.octaves}
- addUserKnob {41 Worley3D_Seed l "Seed (Worley)" -STARTLINE T BlinkScript1.Worley3D_Seed}
- addUserKnob {41 uniform_scale l "uniform scale" T Axis1.uniform_scale}
- addUserKnob {41 lacunarity l Lacunarity T PToN_exp.lacunarity}
- addUserKnob {41 gain l Gain T PToN_exp.gain}
- addUserKnob {41 Worley3D_Displacement l Displacement t "Worley Only" T BlinkScript1.Worley3D_Displacement}
- addUserKnob {6 invert l Invert +STARTLINE}
- addUserKnob {26 ""}
- addUserKnob {20 transform l "Transform 3D" n 1}
- addUserKnob {41 translate T Axis1.translate}
- addUserKnob {41 rotate T Axis1.rotate}
- addUserKnob {41 scaling l scale T Axis1.scaling}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {20 HelpTab l Help}
- addUserKnob {26 Help l "" +STARTLINE T "\nNoise: \nCe node permet de mapper (en environnement) toute votre scene avec un noise 3D parametrable. \nIl vous suffit pour ca de lui donner a manger une passe de position Max/Vray. \n\nTout les parametres n'ont pas d'utilite pour tout les noises \n(Exemple: Lacunarity n'a aucune utilite pour le Worley)\n\n\nTranform:\nVous pouvez animer votre Noise en utilisant les options de translate. \n\nOptionnellement, vous pouvez brancher des Axis animes, provenant ou non de softs externes.\n (Attention a bien convertir vos axis en axis Max)"}
- addUserKnob {20 About}
- addUserKnob {26 About_1 l "" +STARTLINE T "WPosToNoise 1.0 by Noss : bruno.ortolland@gmail.com\n\nWorley blinkscript by Ivan Busquets"}
- }
- Input {
- inputs 0
- name pointPosition
- xpos 70
- ypos -466
- }
- Grade {
- add {{parent.Axis1.world_matrix.3} {parent.Axis1.world_matrix.7} {parent.Axis1.world_matrix.11} 0}
- black_clamp false
- name Grade1
- xpos 70
- ypos -394
- }
- ColorMatrix {
- matrix {
- {{parent.Axis1.world_matrix.0} {parent.Axis1.world_matrix.1} {parent.Axis1.world_matrix.2}}
- {{parent.Axis1.world_matrix.4} {parent.Axis1.world_matrix.5} {parent.Axis1.world_matrix.6}}
- {{parent.Axis1.world_matrix.8} {parent.Axis1.world_matrix.9} {parent.Axis1.world_matrix.10}}
- }
- name ColorMatrix1
- xpos 70
- ypos -346
- }
- Dot {
- name Dot4
- xpos 104
- ypos -198
- }
- set N49272210 [stack 0]
- Dot {
- name Dot6
- xpos 324
- ypos -198
- }
- set N49272580 [stack 0]
- Dot {
- name Dot5
- xpos 544
- ypos -198
- }
- ColorMatrix {
- matrix {
- {-4.371138829e-008 0 1}
- {0 1 0}
- {-1 0 -4.371138829e-008}
- }
- name ColorMatrix3
- xpos 510
- ypos -154
- }
- Dot {
- name Dot3
- xpos 544
- ypos -128
- }
- set N49272fd0 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript3
- xpos 620
- ypos -64
- }
- push $N49272fd0
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 0.7071067691 -0.7071067691}
- {0 0.7071067691 0.7071067691}
- }
- name ColorMatrix6
- xpos 510
- ypos -58
- }
- Expression {
- channel0 rgb
- expr0 "\[value PToN_exp.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp2
- xpos 510
- ypos -34
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves {{parent.PToN_exp1.octaves}}
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- lacunarity {{parent.PToN_exp1.lacunarity}}
- addUserKnob {7 gain l Gain R 0.1 1}
- gain {{parent.PToN_exp1.gain}}
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- }
- Grade {
- black 0.5
- name Grade4
- xpos 510
- ypos -8
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch3
- xpos 510
- ypos 62
- }
- Expression {
- expr0 0
- expr1 0
- expr2 b
- name Expression2
- xpos 510
- ypos 88
- }
- Grade {
- white {{parent.blue}}
- name Grade5
- xpos 510
- ypos 114
- }
- push 0
- push $N49272580
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 -4.371138829e-008 -1}
- {0 1 -4.371138829e-008}
- }
- name ColorMatrix2
- xpos 290
- ypos -154
- }
- Dot {
- name Dot2
- xpos 324
- ypos -126
- }
- set N49274b50 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript2
- xpos 400
- ypos -64
- }
- push $N49274b50
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 0.7071067691 -0.7071067691}
- {0 0.7071067691 0.7071067691}
- }
- name ColorMatrix5
- xpos 290
- ypos -58
- }
- Expression {
- channel0 rgb
- expr0 "\[value PToN_exp.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp1
- xpos 290
- ypos -34
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves {{parent.PToN_exp.octaves}}
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- lacunarity {{parent.PToN_exp.lacunarity}}
- addUserKnob {7 gain l Gain R 0.1 1}
- gain {{parent.PToN_exp.gain}}
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- }
- Grade {
- black 0.5
- name Grade3
- xpos 290
- ypos -8
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch2
- xpos 290
- ypos 62
- }
- Expression {
- expr0 0
- expr1 g
- expr2 0
- name Expression1
- xpos 290
- ypos 88
- }
- Grade {
- white {{parent.green}}
- name Grade6
- xpos 290
- ypos 114
- }
- push $N49272210
- Dot {
- name Dot1
- xpos 104
- ypos -126
- }
- set N49276360 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript1
- xpos 180
- ypos -64
- }
- push $N49276360
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 0.7071067691 -0.7071067691}
- {0 0.7071067691 0.7071067691}
- }
- name ColorMatrix4
- xpos 70
- ypos -58
- }
- Expression {
- channel0 rgb
- expr0 "\[value this.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp
- xpos 70
- ypos -36
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves 5
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- addUserKnob {7 gain l Gain R 0.1 1}
- gain 1
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- noiseType turbulence
- }
- Grade {
- black 0.5
- name Grade2
- xpos 70
- ypos -10
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch1
- xpos 70
- ypos 62
- }
- Expression {
- expr0 r
- expr1 0
- expr2 0
- name Expression3
- xpos 70
- ypos 88
- }
- Grade {
- white {{parent.red}}
- name Grade7
- xpos 70
- ypos 114
- }
- Shuffle {
- out alpha
- name Shuffle1
- xpos 70
- ypos 158
- }
- Merge2 {
- inputs 3+1
- operation plus
- Achannels {rgba.red rgba.green rgba.blue -rgba.alpha}
- name Merge1
- xpos 70
- ypos 204
- }
- Invert {
- channels rgb
- mix {{parent.invert}}
- name Invert1
- xpos 70
- ypos 230
- }
- set N49500510 [stack 0]
- Output {
- name Output1
- xpos 70
- ypos 328
- }
- Input {
- inputs 0
- name Transform_3D
- xpos 180
- ypos -466
- number 1
- }
- Axis2 {
- translate {0 0 {parent.parent.WPosToNoisedfsq.Axis1.translate.z}}
- uniform_scale 0.53
- name Axis1
- xpos 190
- ypos -414
- }
- push $N49500510
- Viewer {
- input_process false
- name Viewer1
- xpos -260
- ypos 350
- }
- end_group
- push $N49271450
- Dot {
- name Dot2
- xpos 874
- ypos 402
- }
- ShuffleCopy {
- inputs 2
- in rgb
- red red
- green green
- out forward
- name ShuffleCopy1
- xpos 840
- ypos 518
- }
- Shuffle {
- red blue
- green blue
- alpha blue
- name Shuffle3
- xpos 840
- ypos 668
- }
- NoOp {
- name NoOp1
- xpos 840
- ypos 716
- addUserKnob {20 User}
- addUserKnob {7 lavaLevel R 0 20}
- lavaLevel 13
- addUserKnob {7 level_smooth R 0.1 5}
- level_smooth 0.45
- }
- IDistort {
- uv forward
- uv_scale 40
- name IDistort5
- xpos 840
- ypos 758
- }
- Grade {
- channels rgba
- blackpoint {{NoOp1.lavaLevel+NoOp1.level_smooth*3}}
- whitepoint {{NoOp1.lavaLevel-+NoOp1.level_smooth}}
- gamma 0.3
- black_clamp false
- name Grade30
- xpos 840
- ypos 878
- }
- set N49502400 [stack 0]
- Grade {
- whitepoint 1.31
- black_clamp false
- name Grade3
- xpos 840
- ypos 1120
- }
- set N49502770 [stack 0]
- ColorLookup {
- lut {master {curve C 0 s0.01999999955 1 s0.01999999955}
- red {}
- green {}
- blue {}
- alpha {}}
- name ColorLookup4
- xpos 730
- ypos 1216
- }
- set N49502ae0 [stack 0]
- Dot {
- name Dot7
- xpos 654
- ypos 1386
- }
- push $N49502770
- Grade {
- whitepoint 1.2
- black_clamp false
- name Grade6
- xpos 840
- ypos 1166
- }
- ColorCorrect {
- channels rgba
- shadows.gain 0
- midtones.gain 1.52
- highlights.gain 0
- lookup {shadow {curve 1 s0 x0.4975876808 0 s0}
- midtone {1-shadow-highlight}
- highlight {}}
- name ColorCorrect1
- xpos 840
- ypos 1214
- }
- Shuffle {
- alpha blue
- name Shuffle1
- xpos 840
- ypos 1262
- }
- set N495038a0 [stack 0]
- Grade {
- multiply 1.4
- gamma 0.001
- black_clamp false
- name Grade9
- xpos 510
- ypos 1310
- }
- Constant {
- inputs 0
- channels rgb
- color {1 0.4240113497 0.01708430052 0}
- name Constant4
- xpos 620
- ypos 951
- }
- Constant {
- inputs 0
- channels rgb
- color {1 0.4240113497 0.01708430052 0}
- name Constant5
- xpos 510
- ypos 951
- }
- push $N49502400
- Grade {
- channels rgba
- blackpoint 1
- whitepoint 2.8
- name Grade5
- xpos 620
- ypos 878
- }
- push $N49271450
- Dot {
- name Dot3
- xpos 214
- ypos 402
- }
- Group {
- name WPosToNoise
- tile_color 0x308fffff
- xpos 180
- ypos 518
- addUserKnob {20 WPosToNoise}
- addUserKnob {6 red +STARTLINE}
- red true
- addUserKnob {6 green -STARTLINE}
- green true
- addUserKnob {6 blue -STARTLINE}
- blue true
- addUserKnob {6 rgb_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {41 noiseType T PToN_exp.noiseType}
- addUserKnob {41 octaves l Octaves -STARTLINE T PToN_exp.octaves}
- addUserKnob {41 Worley3D_Seed l "Seed (Worley)" -STARTLINE T BlinkScript1.Worley3D_Seed}
- addUserKnob {41 uniform_scale l "uniform scale" T Axis1.uniform_scale}
- addUserKnob {41 lacunarity l Lacunarity T PToN_exp.lacunarity}
- addUserKnob {41 gain l Gain T PToN_exp.gain}
- addUserKnob {41 Worley3D_Displacement l Displacement t "Worley Only" T BlinkScript1.Worley3D_Displacement}
- addUserKnob {6 invert l Invert +STARTLINE}
- addUserKnob {26 ""}
- addUserKnob {20 transform l "Transform 3D" n 1}
- addUserKnob {41 translate T Axis1.translate}
- addUserKnob {41 rotate T Axis1.rotate}
- addUserKnob {41 scaling l scale T Axis1.scaling}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {20 HelpTab l Help}
- addUserKnob {26 Help l "" +STARTLINE T "\nNoise: \nCe node permet de mapper (en environnement) toute votre scene avec un noise 3D parametrable. \nIl vous suffit pour ca de lui donner a manger une passe de position Max/Vray. \n\nTout les parametres n'ont pas d'utilite pour tout les noises \n(Exemple: Lacunarity n'a aucune utilite pour le Worley)\n\n\nTranform:\nVous pouvez animer votre Noise en utilisant les options de translate. \n\nOptionnellement, vous pouvez brancher des Axis animes, provenant ou non de softs externes.\n (Attention a bien convertir vos axis en axis Max)"}
- addUserKnob {20 About}
- addUserKnob {26 About_1 l "" +STARTLINE T "WPosToNoise 1.0 by Noss : bruno.ortolland@gmail.com\n\nWorley blinkscript by Ivan Busquets"}
- }
- Input {
- inputs 0
- name pointPosition
- xpos 70
- ypos -466
- }
- Grade {
- add {{parent.Axis1.world_matrix.3} {parent.Axis1.world_matrix.7} {parent.Axis1.world_matrix.11} 0}
- black_clamp false
- name Grade1
- xpos 70
- ypos -394
- }
- ColorMatrix {
- matrix {
- {{parent.Axis1.world_matrix.0} {parent.Axis1.world_matrix.1} {parent.Axis1.world_matrix.2}}
- {{parent.Axis1.world_matrix.4} {parent.Axis1.world_matrix.5} {parent.Axis1.world_matrix.6}}
- {{parent.Axis1.world_matrix.8} {parent.Axis1.world_matrix.9} {parent.Axis1.world_matrix.10}}
- }
- name ColorMatrix1
- xpos 70
- ypos -346
- }
- Dot {
- name Dot4
- xpos 104
- ypos -198
- }
- set N49505790 [stack 0]
- Dot {
- name Dot6
- xpos 324
- ypos -198
- }
- set N49505b00 [stack 0]
- Dot {
- name Dot5
- xpos 544
- ypos -198
- }
- ColorMatrix {
- matrix {
- {-4.371138829e-008 0 1}
- {0 1 0}
- {-1 0 -4.371138829e-008}
- }
- name ColorMatrix3
- xpos 510
- ypos -154
- }
- Dot {
- name Dot3
- xpos 544
- ypos -128
- }
- set N49506550 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript3
- xpos 620
- ypos -64
- }
- push $N49506550
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 0.7071067691 -0.7071067691}
- {0 0.7071067691 0.7071067691}
- }
- name ColorMatrix6
- xpos 510
- ypos -58
- }
- Expression {
- channel0 rgb
- expr0 "\[value PToN_exp.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp2
- xpos 510
- ypos -34
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves {{parent.PToN_exp1.octaves}}
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- lacunarity {{parent.PToN_exp1.lacunarity}}
- addUserKnob {7 gain l Gain R 0.1 1}
- gain {{parent.PToN_exp1.gain}}
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- }
- Grade {
- black 0.5
- name Grade4
- xpos 510
- ypos -8
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch3
- xpos 510
- ypos 62
- }
- Expression {
- expr0 0
- expr1 0
- expr2 b
- name Expression2
- xpos 510
- ypos 88
- }
- Grade {
- white {{parent.blue}}
- name Grade5
- xpos 510
- ypos 114
- }
- push 0
- push $N49505b00
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 -4.371138829e-008 -1}
- {0 1 -4.371138829e-008}
- }
- name ColorMatrix2
- xpos 290
- ypos -154
- }
- Dot {
- name Dot2
- xpos 324
- ypos -126
- }
- set N4946b880 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript2
- xpos 400
- ypos -64
- }
- push $N4946b880
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 0.7071067691 -0.7071067691}
- {0 0.7071067691 0.7071067691}
- }
- name ColorMatrix5
- xpos 290
- ypos -58
- }
- Expression {
- channel0 rgb
- expr0 "\[value PToN_exp.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp1
- xpos 290
- ypos -34
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves {{parent.PToN_exp.octaves}}
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- lacunarity {{parent.PToN_exp.lacunarity}}
- addUserKnob {7 gain l Gain R 0.1 1}
- gain {{parent.PToN_exp.gain}}
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- }
- Grade {
- black 0.5
- name Grade3
- xpos 290
- ypos -8
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch2
- xpos 290
- ypos 62
- }
- Expression {
- expr0 0
- expr1 g
- expr2 0
- name Expression1
- xpos 290
- ypos 88
- }
- Grade {
- white {{parent.green}}
- name Grade6
- xpos 290
- ypos 114
- }
- push $N49505790
- Dot {
- name Dot1
- xpos 104
- ypos -126
- }
- set N4946d090 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript1
- xpos 180
- ypos -64
- }
- push $N4946d090
- ColorMatrix {
- matrix {
- {1 0 0}
- {0 0.7071067691 -0.7071067691}
- {0 0.7071067691 0.7071067691}
- }
- name ColorMatrix4
- xpos 70
- ypos -58
- }
- Expression {
- channel0 rgb
- expr0 "\[value this.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp
- xpos 70
- ypos -36
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves 5
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- addUserKnob {7 gain l Gain R 0.1 1}
- gain 1
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- }
- Grade {
- black 0.5
- name Grade2
- xpos 70
- ypos -10
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch1
- xpos 70
- ypos 62
- }
- Expression {
- expr0 r
- expr1 0
- expr2 0
- name Expression3
- xpos 70
- ypos 88
- }
- Grade {
- white {{parent.red}}
- name Grade7
- xpos 70
- ypos 114
- }
- Shuffle {
- out alpha
- name Shuffle1
- xpos 70
- ypos 158
- }
- Merge2 {
- inputs 3+1
- operation plus
- Achannels {rgba.red rgba.green rgba.blue -rgba.alpha}
- name Merge1
- xpos 70
- ypos 204
- }
- Invert {
- channels rgb
- mix {{parent.invert}}
- name Invert1
- xpos 70
- ypos 230
- }
- Output {
- name Output1
- xpos 70
- ypos 328
- }
- Input {
- inputs 0
- name Transform_3D
- xpos 180
- ypos -466
- number 1
- }
- Axis2 {
- translate {0 {curve x1 0 x100 -0.025} 0}
- uniform_scale {{parent.parent.WPosToNoisedfsq.Axis1.uniform_scale}}
- name Axis1
- xpos 190
- ypos -414
- }
- end_group
- push $N49271450
- Group {
- name WPosToNoisedfsq
- tile_color 0x308fffff
- xpos 400
- ypos 446
- addUserKnob {20 WPosToNoise}
- addUserKnob {41 noiseType T PToN_exp.noiseType}
- addUserKnob {41 octaves l Octaves -STARTLINE T PToN_exp.octaves}
- addUserKnob {41 Worley3D_Seed l "Seed (Worley)" -STARTLINE T BlinkScript1.Worley3D_Seed}
- addUserKnob {41 uniform_scale l "uniform scale" T Axis1.uniform_scale}
- addUserKnob {41 lacunarity l Lacunarity T PToN_exp.lacunarity}
- addUserKnob {41 gain l Gain T PToN_exp.gain}
- addUserKnob {41 Worley3D_Displacement l Displacement t "Worley Only" T BlinkScript1.Worley3D_Displacement}
- addUserKnob {6 invert l Invert +STARTLINE}
- addUserKnob {26 ""}
- addUserKnob {20 transform l "Transform 3D" n 1}
- addUserKnob {41 translate T Axis1.translate}
- addUserKnob {41 rotate T Axis1.rotate}
- addUserKnob {41 scaling l scale T Axis1.scaling}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {20 HelpTab l Help}
- addUserKnob {26 Help l "" +STARTLINE T "\nNoise: \nCe node permet de mapper (en environnement) toute votre scene avec un noise 3D parametrable. \nIl vous suffit pour ca de lui donner a manger une passe de position Max/Vray. \n\nTout les parametres n'ont pas d'utilite pour tout les noises \n(Exemple: Lacunarity n'a aucune utilite pour le Worley)\n\n\nTranform:\nVous pouvez animer votre Noise en utilisant les options de translate. \n\nOptionnellement, vous pouvez brancher des Axis animes, provenant ou non de softs externes.\n (Attention a bien convertir vos axis en axis Max)"}
- addUserKnob {20 About}
- addUserKnob {26 About_1 l "" +STARTLINE T "WPosToNoise 1.0 by Noss : bruno.ortolland@gmail.com\n\nWorley blinkscript by Ivan Busquets"}
- }
- Input {
- inputs 0
- name pointPosition
- xpos -8
- ypos -250
- }
- Grade {
- add {{parent.Axis1.world_matrix.3} {parent.Axis1.world_matrix.7} {parent.Axis1.world_matrix.11} 0}
- black_clamp false
- name Grade1
- xpos -8
- ypos -178
- }
- ColorMatrix {
- matrix {
- {{parent.Axis1.world_matrix.0} {parent.Axis1.world_matrix.1} {parent.Axis1.world_matrix.2}}
- {{parent.Axis1.world_matrix.4} {parent.Axis1.world_matrix.5} {parent.Axis1.world_matrix.6}}
- {{parent.Axis1.world_matrix.8} {parent.Axis1.world_matrix.9} {parent.Axis1.world_matrix.10}}
- }
- name ColorMatrix1
- xpos -8
- ypos -130
- }
- set N49470420 [stack 0]
- Dot {
- name Dot1
- xpos 26
- ypos -30
- }
- set N49470790 [stack 0]
- BlinkScript {
- ProgramGroup 1
- KernelDescription "1 \"Worley3D\" iterate pixelWise 45291152b7d71735741f26b17f4d23bdf56ad567aabfa36c1b2c3f23a430c4b8 2 \"worldP\" Read Point \"dst\" Write Point 8 \"Offset\" Float 3 AAAAAAAAAAAAAAAAAAAAAA== \"Frequency\" Float 1 AABAQA== \"Seed\" Int 1 AAAAAA== \"Displacement\" Float 1 AAAAAA== \"Distance\" Bool 1 AQ== \"Invert\" Bool 1 AQ== \"Cell size\" Float 1 AAAAAA== \"Cell softness\" Float 1 AACAPw=="
- kernelSource "// worley3D.blink\n// Create noise based on world position pass\n\n#define X_NOISE_GEN 1619\n#define Y_NOISE_GEN 31337\n#define Z_NOISE_GEN 6971\n#define SEED_NOISE_GEN 1013\n#define SQRT_3 1.73205081\n\ninline int IntValueNoise3D (int x, int y, int z, int seed)\n\{\n // All constants are primes and must remain prime in order for this noise\n // function to work correctly.\n int n = (\n X_NOISE_GEN * x\n + Y_NOISE_GEN * y\n + Z_NOISE_GEN * z\n + SEED_NOISE_GEN * seed)\n & 0x7fffffff;\n n = (n >> 13) ^ n;\n return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;\n\}\n\ninline float ValueNoise3D (int x, int y, int z, int seed)\n\{\n return 1.0 - ((float)IntValueNoise3D (x, y, z, seed) / 1073741824.0);\n\}\n\nkernel Worley3D : ImageComputationKernel<ePixelWise>\n\{\n Image<eRead, eAccessPoint, eEdgeClamped> worldP; //the input image\n Image<eWrite, eAccessPoint> dst;\n\n param:\n float3 offset;\n float frequency;\n int seed;\n float displacement;\n bool distance;\n bool invert;\n float cell_size;\n float cell_softness;\n //int type;\n\n void define() \{\n defineParam(distance, \"Distance\", true);\n defineParam(offset, \"Offset\", float3(0.0f, 0.0f, 0.0f));\n defineParam(frequency, \"Frequency\", 3.0f);\n defineParam(displacement, \"Displacement\", 0.0f);\n defineParam(seed, \"Seed\", 0);\n defineParam(cell_size, \"Cell size\", 0.0f);\n defineParam(cell_softness, \"Cell softness\", 1.0f);\n defineParam(invert, \"Invert\", true);\n //defineParam(type, \"Type\", 0);\n \}\n\n void init() \{\n \}\n\n void process( int2 pos ) \{\n float value = 0.0;\n if ( worldP.kComps > 2 ) \{\n const float wx = worldP(0);\n const float wy = worldP(1);\n const float wz = worldP(2);\n\n float x = (wx - offset.x) * frequency;\n float y = (wy - offset.y) * frequency;\n float z = (wz - offset.z) * frequency;\n int xInt = (int)x; //(x > 0.0? (int)x: (int)x - 1);\n int yInt = (int)y; //(y > 0.0? (int)y: (int)y - 1);\n int zInt = (int)z; //(z > 0.0? (int)z: (int)z - 1);\n\n float minDist = 2147483647.0;\n float xF1 = 0;\n float yF1 = 0;\n float zF1 = 0;\n float xF2 = 0;\n float yF2 = 0;\n float zF2 = 0;\n\n float dist;\n\n for (int yCur = yInt - 2; yCur <= yInt + 2; yCur++) \{\n for (int xCur = xInt - 2; xCur <= xInt + 2; xCur++) \{\n for (int zCur = zInt - 2; zCur <= zInt + 2; zCur++) \{\n // Calculate the position and distance to the seed point inside of\n // this unit cube.\n float xPos = xCur + ValueNoise3D(xCur, yCur, zCur, seed );\n float yPos = yCur + ValueNoise3D(xCur, yCur, zCur, seed + 1);\n float zPos = zCur + ValueNoise3D(xCur, yCur, zCur, seed + 2);\n\n float xDist = xPos - x;\n float yDist = yPos - y;\n float zDist = zPos - z;\n\n dist = xDist * xDist + yDist * yDist + zDist * zDist;\n if (dist < minDist) \{\n // This seed point is closer to any others found so far, so record\n // this seed point.\n minDist = dist;\n xF2 = xF1;\n yF2 = yF1;\n xF2 = zF1;\n xF1 = xPos;\n yF1 = yPos;\n zF1 = zPos;\n \}\n \}\n \}\n \}\n\n float F1 = 0.0;\n float F2 = 0.0;\n if (distance) \{\n // Determine the distance to the nearest seed point.\n float xDist = xF1 - x;\n float yDist = yF1 - y;\n float zDist = zF1 - z;\n F1 = xDist*xDist + yDist*yDist + zDist*zDist;\n xDist = xF2 - x;\n yDist = yF2 - y;\n zDist = zF2 - z;\n F2 = xDist*xDist + yDist*yDist + zDist*zDist;\n \}\n value = F1;\n /*\n if ( type == 1 ) \{\n value = F2;\n \} else \{\n if ( type == 2 ) \{\n value = F1 * F2;\n \} else \{\n if ( type == 3 ) \{\n value = F2 - F1;\n \} else \{\n if ( type == 4 ) \{\n value = F1 + F2;\n \}\n \}\n \}\n \}\n */\n value += (displacement * (float)ValueNoise3D( (int)(floor(xF1)), (int)(floor(yF1)), (int)(floor(zF1)), seed)) + displacement;\n\n value = ((value - cell_size)*(1/cell_softness));\n\n if (invert) \{\n value = 1 - value;\n \}\n \} else \{\n value = 0.0f;\n \}\n for (int c = 0; c < dst.kComps; c++)\n dst(c) = value;\n \}\n\};\n\n"
- rebuild ""
- Worley3D_Offset {0.3249999881 -0.009999999776 -0.25}
- Worley3D_Frequency {{parent.Axis1.uniform_scale}}
- Worley3D_Seed 1
- Worley3D_Cellsoftness 0
- maxGPUMemory 53
- maxTileLines 15.5
- name BlinkScript1
- xpos 180
- ypos 80
- }
- push $N49470790
- Expression {
- channel0 rgb
- expr0 "\[value this.noiseType](r*axisScale.x*scale,g*axisScale.y*scale,b*axisScale.z*scale,octaves,lacunarity,gain)"
- channel1 {-rgba.red -rgba.green -rgba.blue none}
- channel2 {-rgba.red -rgba.green -rgba.blue none}
- name PToN_exp
- xpos -8
- ypos 38
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {20 endGroup n -1}
- addUserKnob {7 scale R 0.01 10}
- scale {{parent.Axis1.uniform_scale}}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- addUserKnob {3 octaves l Octaves}
- octaves 5
- addUserKnob {7 lacunarity l Lacunarity R 1 10}
- lacunarity 2
- addUserKnob {7 gain l Gain R 0.1 1}
- gain 0.1
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- addUserKnob {4 noiseType M {fBm turbulence worley "" ""}}
- noiseType worley
- }
- Switch {
- inputs 2
- which {{"parent.PToN_exp.noiseType == 2 "}}
- name Switch1
- xpos -8
- ypos 86
- }
- Invert {
- channels rgb
- mix {{parent.invert}}
- name Invert1
- xpos -8
- ypos 134
- }
- set N494711e0 [stack 0]
- push $N49470420
- Expression {
- temp_name0 dist
- temp_expr0 "sqrt( (r*axisScale.x-center.r)*(r*axisScale.x-center.r)+(g*axisScale.y-center.g)*(g*axisScale.y-center.g)+(b*axisScale.z-center.b)*(b*axisScale.z-center.b))"
- channel0 rgba
- expr0 1-dist/ringScale
- name radial_fromPointPos3
- xpos -260
- ypos 38
- addUserKnob {20 User}
- addUserKnob {13 axisScale}
- axisScale {{parent.Axis1.scaling.x} {parent.Axis1.scaling.y} {parent.Axis1.scaling.z}}
- addUserKnob {7 ringScale R 0.1 100}
- ringScale 27.5
- addUserKnob {18 center}
- center {{parent.position.x} {parent.position.y} {parent.position.z}}
- addUserKnob {6 center_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
- }
- ColorCorrect {
- inputs 1+1
- shadows.offset -0.48
- midtones.offset -0.009
- highlights.offset 0.0005
- lookup {shadow {curve 1 s0 x0.4069852531 0 s0}
- midtone {1-shadow-highlight}
- highlight {curve x0.4272058308 0 s0 x1 1 s0}}
- maskChannelMask rgba.red
- invert_mask true
- name ColorCorrect1
- xpos -260
- ypos 134
- }
- push $N494711e0
- Switch {
- inputs 2
- which {{parent.activate}}
- name Switch2
- xpos -8
- ypos 230
- }
- set N49427110 [stack 0]
- Output {
- name Output1
- xpos -8
- ypos 328
- }
- push $N49427110
- Viewer {
- input_process false
- name Viewer1
- xpos -260
- ypos 350
- }
- Input {
- inputs 0
- name Transform_3D
- xpos 180
- ypos -250
- number 1
- }
- Axis2 {
- translate {0 0 {curve l x101 0 x201 -5}}
- uniform_scale 0.32
- name Axis1
- xpos 190
- ypos -150
- }
- end_group
- Grade {
- channels rgba
- blackpoint 0.1
- white 1.14
- gamma 0.7
- name Grade10
- xpos 400
- ypos 472
- }
- ShuffleCopy {
- inputs 2
- in rgb
- red red
- green green
- out forward
- name ShuffleCopy3
- xpos 400
- ypos 518
- }
- Dot {
- name Dot4
- xpos 434
- ypos 570
- }
- set N49472d60 [stack 0]
- Dot {
- name Dot5
- xpos 324
- ypos 570
- }
- IDistort {
- channels rgba
- uv forward
- uv_scale 12.2
- name IDistort2
- xpos 290
- ypos 682
- }
- Blur {
- channels rgba
- size 5
- name Blur4
- xpos 290
- ypos 710
- }
- ColorLookup {
- lut {master {curve K x-0.1725826263 0 x0 0 S x0.8953607678 -0.007765769958 x1.044760942 1.911101222 s0}
- red {}
- green {}
- blue {}
- alpha {}}
- name ColorLookup2
- xpos 290
- ypos 736
- }
- push 0
- push $N49472d60
- Blur {
- channels rgba
- size 5
- name Blur8
- xpos 400
- ypos 614
- }
- set N49473e90 [stack 0]
- ColorLookup {
- lut {master {curve C 0 L x0.530856967 -0.006214966853 S x0.5530700684 0.1684975622 x0.6423245072 0.1684975622 L x0.6729414463 -0.006054009556}
- red {}
- green {}
- blue {}
- alpha {}}
- name ColorLookup7
- xpos 510
- ypos 614
- }
- Blur {
- channels rgba
- size 0.5
- name Blur10
- xpos 510
- ypos 638
- }
- IDistort {
- channels rgba
- uv forward
- uv_scale {4.5 5.5}
- name IDistort4
- xpos 510
- ypos 686
- }
- ColorLookup {
- lut {master {curve C x0.1212719381 0.008208930492 x0.1598684192 1}
- red {}
- green {}
- blue {}
- alpha {}}
- name ColorLookup6
- xpos 510
- ypos 734
- }
- push $N49473e90
- ColorLookup {
- lut {master {curve C 0 L x0.783757627 -0.003996809694 K x0.783757627 1.452235222 x0.8517802358 1.452235222 L x0.8517802358 -0.003838388943}
- red {}
- green {}
- blue {}
- alpha {}}
- name ColorLookup5
- xpos 400
- ypos 640
- }
- IDistort {
- channels rgba
- uv forward
- uv_scale {19 0}
- name IDistort3
- xpos 400
- ypos 686
- }
- Merge2 {
- inputs 3+1
- operation screen
- name Merge4
- xpos 400
- ypos 806
- }
- Grade {
- inputs 1+1
- white 0
- invert_mask true
- name Grade4
- xpos 400
- ypos 878
- }
- Merge2 {
- inputs 2
- operation multiply
- name Merge1
- xpos 400
- ypos 976
- }
- Merge2 {
- inputs 2
- operation max
- name Merge2
- xpos 400
- ypos 1002
- }
- IDistort {
- channels rgba
- uv forward
- uv_scale 31
- name IDistort1
- xpos 400
- ypos 1070
- }
- set N49476460 [stack 0]
- Glow2 {
- tolerance 0.355
- brightness 5
- saturation 0
- effect_only true
- size 612.5
- name Glow5
- xpos 510
- ypos 1094
- disable true
- }
- push $N49476460
- Glow2 {
- tolerance 0.805
- brightness 0.5
- size 300
- name Glow3
- xpos 400
- ypos 1094
- disable true
- }
- Grade {
- inputs 1+1
- white 0.66
- maskChannelMask rgba.red
- invert_mask true
- name Grade1
- xpos 400
- ypos 1142
- }
- set N49476eb0 [stack 0]
- Dot {
- name Dot6
- xpos 214
- ypos 1146
- }
- Grade {
- white {8.708999634 3.824805737 0.1413806975 0}
- name Grade2
- xpos 180
- ypos 1262
- }
- set N49477590 [stack 0]
- ColorCorrect {
- saturation 0.82
- name ColorCorrect2
- xpos 180
- ypos 1310
- }
- push $N495038a0
- push $N49477590
- push $N49502ae0
- push $N49476eb0
- Grade {
- inputs 1+1
- channels rgba
- white 0
- multiply 1.36
- black_clamp false
- maskChannelMask rgba.red
- invert_mask true
- name Grade29
- xpos 400
- ypos 1214
- }
- Merge2 {
- inputs 2+1
- operation screen
- name Merge3
- xpos 400
- ypos 1262
- }
- Merge2 {
- inputs 2+1
- operation screen
- maskChannelMask rgba.red
- name Merge6
- xpos 400
- ypos 1310
- }
- ShuffleCopy {
- inputs 2
- red red
- out alpha
- name ShuffleCopy2
- xpos 400
- ypos 1382
- }
- push $N49502ae0
- Grade {
- blackpoint -0.066
- whitepoint 0.012
- white {1 1 1 1}
- gamma 0.17
- black_clamp false
- name Grade7
- xpos 730
- ypos 1326
- }
- Grade {
- white {1 0.1884988546 0 1}
- white_clamp true
- name Grade8
- xpos 730
- ypos 1384
- }
- Blur {
- channels rgb
- size 5
- name Blur1
- xpos 730
- ypos 1410
- }
- Merge2 {
- inputs 2
- name Merge5
- xpos 400
- ypos 1408
- }
- set N49479110 [stack 0]
- Output {
- name Output1
- xpos 400
- ypos 1478
- }
- push $N49479110
- Viewer {
- frame 139
- colour_sample_bbox {0.7453125119 -0.5421875119 0.7458333373 -0.5416666865}
- samplepoints {{0.7453125119 -0.5421875119}
- }
- viewerProcess rec709
- input_process false
- name Viewer1
- selected true
- xpos 772
- ypos 1454
- }
- end_group
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement