<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
  <url>
    <loc>https://thevfxmentor.com/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/artist-advisory</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.9</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.9</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/blog/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/LOP/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/Pipeline/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/</loc>
    <lastmod>2026-05-07</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/cop-solver/</loc>
    <lastmod>2024-07-04</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=COP&amp;tip=cop-solver</video:thumbnail_loc>
      <video:title>Creating a Feedback Loop Solver
</video:title>
      <video:description>Creating a Feedback Loop Solver in COPs In Copernicus context, we can create a &quot;solver&quot; to iterate using a feedback loop. To set up a solver in COPs, follow these steps: - Create a Block Node: Lay down a 'block' node, which will automatically create a Block Start and Block End node pair. These nodes define the start and end points of our feedback loop. - Add an Invoke Node: The 'invoke' node is used to control the block. It will repeatedly execute the block of nodes defined between the Block Start and Block End nodes, allowing for iterative processing. - Specify Input and Output: You need to manually specify the input and output connections for the Block Start and Block End nodes. Ensure that these connections are consistent and correctly set up to allow data to flow through the loop. Set Inputs and Outputs on the Invoke Node: Select the Invoke node and click &quot;Set inputs and outputs from selected block.&quot; This action will automatically create corresponding input and output connections on the Invoke node that match those on the Block Start and Block End nodes. These connections must match for the feedback loop to function correctly. ***Adjust Iterations***: The number of iterations for the feedback loop can be controlled in the Invoke node settings. This allows you to specify how many times the block should be executed. By default is set to 1, you can set it to $F to behave similarly to a sop solver. By following these steps, you can create a feedback loop in the COP context, enabling iterative processing and solving. When creating solvers that utilise 2D vector field, you may be interested in some way of visualising them. Check out this node [here](https://thevfxmentor.com/quicktips/COP/#opencl-vector-vis)</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/cop-solver-1.webm</video:content_loc>
      <video:publication_date>2024-07-04T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/cop-instancing/</loc>
    <lastmod>2024-07-09</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=COP&amp;tip=cop-instancing</video:thumbnail_loc>
      <video:title>Instancing using geo points</video:title>
      <video:description>Copernicus also gives us ability to instance(stamp) input image based on geometry points. [stamppoint](https://www.sidefx.com/docs/houdini20.5/nodes/cop/stamppoint.html) takes same attributes as a copy sop in its &quot;standard&quot; instancing, but also can utilise sprite specific attributes like `spriterot`, `spritescale`, and `spriteuv`</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/cop-instancing-1.webm</video:content_loc>
      <video:publication_date>2024-07-09T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/cop_introduction/</loc>
    <lastmod>2024-06-16</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/cop-to-karma/</loc>
    <lastmod>2024-07-09</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/cop-to-sop/</loc>
    <lastmod>2024-07-09</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/COP/cop-spaces/</loc>
    <lastmod>2024-06-17</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/LOP/lop-assign-material/</loc>
    <lastmod>2024-10-16</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=LOP&amp;tip=lop-assign-material</video:thumbnail_loc>
      <video:title>Assigning materials from string attribute</video:title>
      <video:description>How to assign materials to objects in solaris from primitive attributes on meshes.</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/lop-assign-material-1.mp4</video:content_loc>
      <video:publication_date>2024-10-16T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=LOP&amp;tip=lop-assign-material</video:thumbnail_loc>
      <video:title>Assigning materials from string attribute</video:title>
      <video:description>How to assign materials to objects in solaris from primitive attributes on meshes.</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/lop-assign-material-2.mp4</video:content_loc>
      <video:publication_date>2024-10-16T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=LOP&amp;tip=lop-assign-material</video:thumbnail_loc>
      <video:title>Assigning materials from string attribute</video:title>
      <video:description>How to assign materials to objects in solaris from primitive attributes on meshes.</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/lop-assign-material-3.mp4</video:content_loc>
      <video:publication_date>2024-10-16T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/LOP/lop-decimate-curve/</loc>
    <lastmod>2024-07-30</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=LOP&amp;tip=lop-decimate-curve</video:thumbnail_loc>
      <video:title>Decimate curves</video:title>
      <video:description>Decimate curves in the lop context</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/lop-decimate-curve-1.webm</video:content_loc>
      <video:publication_date>2024-07-30T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/LOP/lop-frustum-cull/</loc>
    <lastmod>2024-07-30</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/LOP/lop-camera-pscale/</loc>
    <lastmod>2024-07-18</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/cop-opencl-spare/</loc>
    <lastmod>2024-06-15</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/ramp_ocl/</loc>
    <lastmod>2024-06-17</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/opencl-vector-vis/</loc>
    <lastmod>2024-07-04</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/fabric-patterns/</loc>
    <lastmod>2024-06-26</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/cop-opencl-intro/</loc>
    <lastmod>2024-06-15</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/opencl-noises/</loc>
    <lastmod>2024-06-25</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/cop-caustics/</loc>
    <lastmod>2024-07-09</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=cop-caustics</video:thumbnail_loc>
      <video:title>Procedural Caustics</video:title>
      <video:description>Procedural Caustics! Procedural caustics is an ongoing topic within the CG community. There have been many more and less sucessfull aproaches. Recently I stubled upon an interesting idea posted by [Oneleven](https://www.shadertoy.com/user/Oneleven) on the shadertoy site: 'Sample vector map in the neighborhood of each pixel, then pretend that you move these neighboring pixels according to vector map, then calculate how many of them lands in the current pixel, then normalize that value'. To verify same result, I have also re-implemented simplex noise and his `hacky derivative` calculation. Results are amazing and fast and seamless! We can use other noise types as well! Current implementation is using sampleBuffer (as I was matching to the reference), therefore it will be resolution dependent, but swapping it into a imageBuffer or textureBuffer should be very simple and resolution independent. For better explanation, you can also check out [sop caustics implementation](https://thevfxmentor.com/quicktips/SOP/#sop-caustics)</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/cop-caustics-1.webm</video:content_loc>
      <video:publication_date>2024-07-09T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=cop-caustics</video:thumbnail_loc>
      <video:title>Procedural Caustics</video:title>
      <video:description>Procedural Caustics! Procedural caustics is an ongoing topic within the CG community. There have been many more and less sucessfull aproaches. Recently I stubled upon an interesting idea posted by [Oneleven](https://www.shadertoy.com/user/Oneleven) on the shadertoy site: 'Sample vector map in the neighborhood of each pixel, then pretend that you move these neighboring pixels according to vector map, then calculate how many of them lands in the current pixel, then normalize that value'. To verify same result, I have also re-implemented simplex noise and his `hacky derivative` calculation. Results are amazing and fast and seamless! We can use other noise types as well! Current implementation is using sampleBuffer (as I was matching to the reference), therefore it will be resolution dependent, but swapping it into a imageBuffer or textureBuffer should be very simple and resolution independent. For better explanation, you can also check out [sop caustics implementation](https://thevfxmentor.com/quicktips/SOP/#sop-caustics)</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/cop-caustics-2.webm</video:content_loc>
      <video:publication_date>2024-07-09T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/opencl-random/</loc>
    <lastmod>2024-06-25</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/swirly-patterns/</loc>
    <lastmod>2024-06-24</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=swirly-patterns</video:thumbnail_loc>
      <video:title>Swirly patterns</video:title>
      <video:description>![swirly_patterns](swirly-patterns-1-dark.webp) ## Radial ripple To achieve the radial ripple effect, we calculate the sine of the distance from the centroid. The default domain is from -1 to 1. To add artistic control, we can introduce period and phase parameters. These can be promoted and linked to expressions like $T for animation. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm amplitude float #bind parm period float #bind parm phaze float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } float4 C = @amplitude * sin(length(uv)/@period+@phaze); @dst.set(C); } ``` ## Swirl The swirl pattern is created by calculating the radius and angle for each point, then modifying the angle based on the radius. This creates a spiral effect, with the swirl strength controlled by the period and phase parameters. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm amplitude float #bind parm phase float #bind parm period float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } // Calculate the radius and angle float radius = length(@P); float angle = atan2(uv.y, uv.x); // Create a swirl effect by modifying the angle based on the radius angle += @phase + @period * radius; // Convert back to Cartesian coordinates float out = (radius * cos(angle)) * @amplitude; @dst.set(out); } ``` ## Radial star The radial star pattern uses sine waves based on both the distance from the center and the angle around the center. By varying these parameters, we create a star-like pattern that can animate over time. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm time float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } float distance = length(@P); float angle = atan2(uv.y, uv.x); float star = sin(10.0 * distance - 5.0 * angle + @time); @dst.set(star); } ``` You can grab file with those examples,</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/swirly-patterns-1.webm</video:content_loc>
      <video:publication_date>2024-06-24T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=swirly-patterns</video:thumbnail_loc>
      <video:title>Swirly patterns</video:title>
      <video:description>![swirly_patterns](swirly-patterns-1-dark.webp) ## Radial ripple To achieve the radial ripple effect, we calculate the sine of the distance from the centroid. The default domain is from -1 to 1. To add artistic control, we can introduce period and phase parameters. These can be promoted and linked to expressions like $T for animation. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm amplitude float #bind parm period float #bind parm phaze float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } float4 C = @amplitude * sin(length(uv)/@period+@phaze); @dst.set(C); } ``` ## Swirl The swirl pattern is created by calculating the radius and angle for each point, then modifying the angle based on the radius. This creates a spiral effect, with the swirl strength controlled by the period and phase parameters. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm amplitude float #bind parm phase float #bind parm period float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } // Calculate the radius and angle float radius = length(@P); float angle = atan2(uv.y, uv.x); // Create a swirl effect by modifying the angle based on the radius angle += @phase + @period * radius; // Convert back to Cartesian coordinates float out = (radius * cos(angle)) * @amplitude; @dst.set(out); } ``` ## Radial star The radial star pattern uses sine waves based on both the distance from the center and the angle around the center. By varying these parameters, we create a star-like pattern that can animate over time. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm time float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } float distance = length(@P); float angle = atan2(uv.y, uv.x); float star = sin(10.0 * distance - 5.0 * angle + @time); @dst.set(star); } ``` You can grab file with those examples,</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/swirly-patterns-2.webm</video:content_loc>
      <video:publication_date>2024-06-24T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=swirly-patterns</video:thumbnail_loc>
      <video:title>Swirly patterns</video:title>
      <video:description>![swirly_patterns](swirly-patterns-1-dark.webp) ## Radial ripple To achieve the radial ripple effect, we calculate the sine of the distance from the centroid. The default domain is from -1 to 1. To add artistic control, we can introduce period and phase parameters. These can be promoted and linked to expressions like $T for animation. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm amplitude float #bind parm period float #bind parm phaze float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } float4 C = @amplitude * sin(length(uv)/@period+@phaze); @dst.set(C); } ``` ## Swirl The swirl pattern is created by calculating the radius and angle for each point, then modifying the angle based on the radius. This creates a spiral effect, with the swirl strength controlled by the period and phase parameters. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm amplitude float #bind parm phase float #bind parm period float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } // Calculate the radius and angle float radius = length(@P); float angle = atan2(uv.y, uv.x); // Create a swirl effect by modifying the angle based on the radius angle += @phase + @period * radius; // Convert back to Cartesian coordinates float out = (radius * cos(angle)) * @amplitude; @dst.set(out); } ``` ## Radial star The radial star pattern uses sine waves based on both the distance from the center and the angle around the center. By varying these parameters, we create a star-like pattern that can animate over time. ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm time float @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } float distance = length(@P); float angle = atan2(uv.y, uv.x); float star = sin(10.0 * distance - 5.0 * angle + @time); @dst.set(star); } ``` You can grab file with those examples,</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/swirly-patterns-3.webm</video:content_loc>
      <video:publication_date>2024-06-24T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/OpenCL/wavey-patterns/</loc>
    <lastmod>2024-06-25</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=wavey-patterns</video:thumbnail_loc>
      <video:title>Wavey patterns</video:title>
      <video:description>![wavey patterns](wavey-patterns-1.webp) ## Simple wave ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm scale float val=200 #bind parm phase float val=0 @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } // Create wave pattern float wave = sin(uv.x * @scale + @phase); @dst.set(wave); } ``` ## Rotated wave Vanilla OpenCL does not have many mathematical functions built in. SideFX team have build helping functions for matrix operations but for this, simple rotation we could just utilise simple `sin()` and `cos()` functions to apply rotations. ```opencl #bind layer uv? float2 #bind layer !&amp;dst float #bind parm scale float val=200 #bind parm phase float val=0 #bind parm rotation float val=45 // Function to create a wave pattern based on UV coordinates float wave(float2 uv, float scale, float phase, float rotation) { // Convert rotation to radians float rad = radians(rotation); // Calculate the rotated UVs float u = uv.x * cos(rad) - uv.y * sin(rad); float v = uv.x * sin(rad) + uv.y * cos(rad); // Create the wave pattern float wave = sin(u * scale + phase); return wave; } @KERNEL { float2 uv = @uv; if (!@uv.bound) { uv = @P; } float result = wave(uv, @scale, @phase, @rotation); @dst.set(result); } ``` ## Noised wave To make our wave more interesting, we could apply some noise. But, as I have mentioned above, vanilla opencl is quite bare and it does not provide any build-in noises like a common gradient noise [Perlin Noise](https://en.wikipedia.org/wiki/Perlin_noise). Implementing it on our own might be overwhelmin, therefore we could piggyback on SideFX pre-built functions from `mtlx_noise_internal.h` like ```help mx_perlin_noise_float_2(float2 p, int2 per) mx_perlin_noise_float_3(float3 p, int3 per) mx_perlin_noise_float3_2(float2 p, int2 per) mx_perlin_noise_float3_3(float3 p, int3 per) ``` ```opencl #bind layer uv? float2 #bind layer !&amp;dst float #bind parm scale float val=200 #bind parm phase float val=0 #bind parm rotation float val=45 #bind parm distortion float val=0.6 #import &quot;mtlx_noise_inte...</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/wavey-patterns-1.webm</video:content_loc>
      <video:publication_date>2024-06-25T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=wavey-patterns</video:thumbnail_loc>
      <video:title>Wavey patterns</video:title>
      <video:description>![wavey patterns](wavey-patterns-1.webp) ## Simple wave ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm scale float val=200 #bind parm phase float val=0 @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } // Create wave pattern float wave = sin(uv.x * @scale + @phase); @dst.set(wave); } ``` ## Rotated wave Vanilla OpenCL does not have many mathematical functions built in. SideFX team have build helping functions for matrix operations but for this, simple rotation we could just utilise simple `sin()` and `cos()` functions to apply rotations. ```opencl #bind layer uv? float2 #bind layer !&amp;dst float #bind parm scale float val=200 #bind parm phase float val=0 #bind parm rotation float val=45 // Function to create a wave pattern based on UV coordinates float wave(float2 uv, float scale, float phase, float rotation) { // Convert rotation to radians float rad = radians(rotation); // Calculate the rotated UVs float u = uv.x * cos(rad) - uv.y * sin(rad); float v = uv.x * sin(rad) + uv.y * cos(rad); // Create the wave pattern float wave = sin(u * scale + phase); return wave; } @KERNEL { float2 uv = @uv; if (!@uv.bound) { uv = @P; } float result = wave(uv, @scale, @phase, @rotation); @dst.set(result); } ``` ## Noised wave To make our wave more interesting, we could apply some noise. But, as I have mentioned above, vanilla opencl is quite bare and it does not provide any build-in noises like a common gradient noise [Perlin Noise](https://en.wikipedia.org/wiki/Perlin_noise). Implementing it on our own might be overwhelmin, therefore we could piggyback on SideFX pre-built functions from `mtlx_noise_internal.h` like ```help mx_perlin_noise_float_2(float2 p, int2 per) mx_perlin_noise_float_3(float3 p, int3 per) mx_perlin_noise_float3_2(float2 p, int2 per) mx_perlin_noise_float3_3(float3 p, int3 per) ``` ```opencl #bind layer uv? float2 #bind layer !&amp;dst float #bind parm scale float val=200 #bind parm phase float val=0 #bind parm rotation float val=45 #bind parm distortion float val=0.6 #import &quot;mtlx_noise_inte...</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/wavey-patterns-2.webm</video:content_loc>
      <video:publication_date>2024-06-25T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=OpenCL&amp;tip=wavey-patterns</video:thumbnail_loc>
      <video:title>Wavey patterns</video:title>
      <video:description>![wavey patterns](wavey-patterns-1.webp) ## Simple wave ```opencl #bind layer uv? float2 #bind layer !&amp;dst #bind parm scale float val=200 #bind parm phase float val=0 @KERNEL { float2 uv = @uv; if(!@uv.bound){ uv = @P; } // Create wave pattern float wave = sin(uv.x * @scale + @phase); @dst.set(wave); } ``` ## Rotated wave Vanilla OpenCL does not have many mathematical functions built in. SideFX team have build helping functions for matrix operations but for this, simple rotation we could just utilise simple `sin()` and `cos()` functions to apply rotations. ```opencl #bind layer uv? float2 #bind layer !&amp;dst float #bind parm scale float val=200 #bind parm phase float val=0 #bind parm rotation float val=45 // Function to create a wave pattern based on UV coordinates float wave(float2 uv, float scale, float phase, float rotation) { // Convert rotation to radians float rad = radians(rotation); // Calculate the rotated UVs float u = uv.x * cos(rad) - uv.y * sin(rad); float v = uv.x * sin(rad) + uv.y * cos(rad); // Create the wave pattern float wave = sin(u * scale + phase); return wave; } @KERNEL { float2 uv = @uv; if (!@uv.bound) { uv = @P; } float result = wave(uv, @scale, @phase, @rotation); @dst.set(result); } ``` ## Noised wave To make our wave more interesting, we could apply some noise. But, as I have mentioned above, vanilla opencl is quite bare and it does not provide any build-in noises like a common gradient noise [Perlin Noise](https://en.wikipedia.org/wiki/Perlin_noise). Implementing it on our own might be overwhelmin, therefore we could piggyback on SideFX pre-built functions from `mtlx_noise_internal.h` like ```help mx_perlin_noise_float_2(float2 p, int2 per) mx_perlin_noise_float_3(float3 p, int3 per) mx_perlin_noise_float3_2(float2 p, int2 per) mx_perlin_noise_float3_3(float3 p, int3 per) ``` ```opencl #bind layer uv? float2 #bind layer !&amp;dst float #bind parm scale float val=200 #bind parm phase float val=0 #bind parm rotation float val=45 #bind parm distortion float val=0.6 #import &quot;mtlx_noise_inte...</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/wavey-patterns-3.webm</video:content_loc>
      <video:publication_date>2024-06-25T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/Pipeline/optimus-system/</loc>
    <lastmod>2024-06-28</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/Pipeline/timeline_bookmark/</loc>
    <lastmod>2024-06-14</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/camera_frustum/</loc>
    <lastmod>2024-06-14</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/dihedral_function/</loc>
    <lastmod>2024-06-14</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/lights-in-vex/</loc>
    <lastmod>2024-07-12</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/limit-angle/</loc>
    <lastmod>2024-06-12</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/sop-camera-pscale/</loc>
    <lastmod>2024-07-18</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/sop-caustics/</loc>
    <lastmod>2024-07-12</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/sop-swirl/</loc>
    <lastmod>2024-07-19</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=SOP&amp;tip=sop-swirl</video:thumbnail_loc>
      <video:title>Swirl Effect on Geometry and Volumes</video:title>
      <video:description>Swirl effects are quite typical in the FX world. Whether you're new to Houdini or a seasoned pro, this guide will show you how to create a simple yet powerful swirl effect using VEX. We'll apply a rotational transformation to achieve this effect on both geometry and volume data. ###Swirling Geometry First, let's look at how to apply a swirl effect to geometry. We will use a rotation matrix to rotate the points around a specified center. Here's the VEX code you'll need: ```vex vector center = point(3, &quot;P&quot;, 0); float mask = chramp(&quot;mask_falloff&quot;, fit(length(center-v@P), 0, chf(&quot;max_dist&quot;), 1, 0)); matrix3 rot = ident(); float angle = chf(&quot;angle&quot;)*mask; rotate(rot, angle , chv(&quot;axis&quot;)); v@P -= center; v@P *= rot; v@P += center; ``` **Explanation**: - **Center Calculation**: We start by specifying the center of the swirl effect. - **Distance Mask**: A mask is created to control the intensity of the swirl based on the distance from the center. The chramp function allows for artistic control over the mask. - **Rotation Matrix**: A rotation matrix is created and the rotation angle is determined by the mask. The geometry is then rotated around the specified axis. - **Transform Geometry**: To apply the rotation correctly, we temporarily move the geometry to the origin, apply the rotation, and then move it back. ###Swirling Volumes The same setup can be utilized for volumes. However, since we cannot directly move voxels, we'll copy them into a new layer from a new position. of course, same setup could be utilised for other elements like volumes. One thing to note here - we cannot _move_ voxels (its like pixels in 3D space), but we can copy them into a new layer from a new position: ```vex vector center = point(3, &quot;P&quot;, 0); float mask = chramp(&quot;mask_falloff&quot;, fit(length(center-v@P), 0, chf(&quot;max_dist&quot;), 1, 0)); matrix3 rot = ident(); float angle = chf(&quot;angle&quot;)*mask; rotate(rot, angle , chv(&quot;axis&quot;)); vector pos = v@P; pos -= center; pos *= rot; pos+= center; f@density = volumesample(1, 0, pos); ``` **Explanation**: - **Cent...</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/sop-swirl-1.webm</video:content_loc>
      <video:publication_date>2024-07-19T00:00:00-05:00</video:publication_date>
    </video:video>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=SOP&amp;tip=sop-swirl</video:thumbnail_loc>
      <video:title>Swirl Effect on Geometry and Volumes</video:title>
      <video:description>Swirl effects are quite typical in the FX world. Whether you're new to Houdini or a seasoned pro, this guide will show you how to create a simple yet powerful swirl effect using VEX. We'll apply a rotational transformation to achieve this effect on both geometry and volume data. ###Swirling Geometry First, let's look at how to apply a swirl effect to geometry. We will use a rotation matrix to rotate the points around a specified center. Here's the VEX code you'll need: ```vex vector center = point(3, &quot;P&quot;, 0); float mask = chramp(&quot;mask_falloff&quot;, fit(length(center-v@P), 0, chf(&quot;max_dist&quot;), 1, 0)); matrix3 rot = ident(); float angle = chf(&quot;angle&quot;)*mask; rotate(rot, angle , chv(&quot;axis&quot;)); v@P -= center; v@P *= rot; v@P += center; ``` **Explanation**: - **Center Calculation**: We start by specifying the center of the swirl effect. - **Distance Mask**: A mask is created to control the intensity of the swirl based on the distance from the center. The chramp function allows for artistic control over the mask. - **Rotation Matrix**: A rotation matrix is created and the rotation angle is determined by the mask. The geometry is then rotated around the specified axis. - **Transform Geometry**: To apply the rotation correctly, we temporarily move the geometry to the origin, apply the rotation, and then move it back. ###Swirling Volumes The same setup can be utilized for volumes. However, since we cannot directly move voxels, we'll copy them into a new layer from a new position. of course, same setup could be utilised for other elements like volumes. One thing to note here - we cannot _move_ voxels (its like pixels in 3D space), but we can copy them into a new layer from a new position: ```vex vector center = point(3, &quot;P&quot;, 0); float mask = chramp(&quot;mask_falloff&quot;, fit(length(center-v@P), 0, chf(&quot;max_dist&quot;), 1, 0)); matrix3 rot = ident(); float angle = chf(&quot;angle&quot;)*mask; rotate(rot, angle , chv(&quot;axis&quot;)); vector pos = v@P; pos -= center; pos *= rot; pos+= center; f@density = volumesample(1, 0, pos); ``` **Explanation**: - **Cent...</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/sop-swirl-2.webm</video:content_loc>
      <video:publication_date>2024-07-19T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/SOP/sop-dot-projection/</loc>
    <lastmod>2024-07-18</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <video:video>
      <video:thumbnail_loc>https://thevfxmentor.com/quicktips/og-image.php?category=SOP&amp;tip=sop-dot-projection</video:thumbnail_loc>
      <video:title>Vector projections</video:title>
      <video:description>Vector projections sop-dot-projection Vector projection is a powerful tool in VFX and 3D graphics, allowing us to determine how much of one vector &quot;shadows&quot; or projects onto another vector. This can be useful in a variety of contexts, such as aligning objects, calculating forces, or understanding the relationship between different vectors in space. The formula for vector projection is: $$ \huge\mathbf{c} = (\mathbf{a} \cdot \hat{\mathbf{b}}) \hat{\mathbf{b}} $$ ```vex vector c = dot(a, normalize(b)) * normalize(b); ```</video:description>
      <video:content_loc>https://thevfxmentor.com/quicktips/media/videos/sop-dot-projection-1.webm</video:content_loc>
      <video:publication_date>2024-07-18T00:00:00-05:00</video:publication_date>
    </video:video>
  </url>
  <url>
    <loc>https://thevfxmentor.com/quicktips/VEX_Noises/vex-alligator-noise/</loc>
    <lastmod>2024-06-12</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/blog/2026/04/14/the-burnout-i-didnt-see-coming</loc>
    <lastmod>2026-04-16</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.7</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/blog/2026/01/18/rejection-isnt-the-problem-silence-is</loc>
    <lastmod>2026-04-16</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.7</priority>
  </url>
  <url>
    <loc>https://thevfxmentor.com/blog/2025/08/31/going_back</loc>
    <lastmod>2026-04-16</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.7</priority>
  </url>
</urlset>
