This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Retime a tracked object to better fit a target curve | |
| # Select two Transform nodes: the first with a jerky tracked curve, the | |
| # second with a smooth target curve | |
| # Group effort by Lewis Saunders, Unai Martínez Barredo, Erwan Leroy | |
| # Make a function to calculate the distance between two points | |
| def distance(a, b): | |
| return pow((a[0]-b[0])**2 + (a[1]-b[1])**2, 0.5) | |
| # Find the closest point to p on the line ab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set cut_paste_input [stack 0] | |
| version 10.5 v3 | |
| push $cut_paste_input | |
| Tracker4 { | |
| tracks { { 1 31 1 } | |
| { { 5 1 20 enable e 1 } | |
| { 3 1 75 name name 1 } | |
| { 2 1 58 track_x track_x 1 } | |
| { 2 1 58 track_y track_y 1 } | |
| { 2 1 63 offset_x offset_x 1 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Creates perspective projection in a shader without UVs on the geo | |
| # Select the camera to project from, run this, two nodes appear in /mat | |
| # lewis@lewissaunders.com | |
| import hou, math | |
| cam = hou.selectedNodes()[0] | |
| world2cam = cam.worldTransform() | |
| world2camvex = str(world2cam).replace('[', '{').replace(']', '}') | |
| aspect = float(cam.evalParm('resx')) / float(cam.evalParm('resy')); | |
| haperture = cam.evalParm('aperture') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env python | |
| #****************************************************************************** | |
| # | |
| # Filename: hook.py | |
| # | |
| # Copyright (c) 2008 Autodesk Canada Co. | |
| # All rights reserved. | |
| # | |
| # Use of this software is subject to the terms of the Autodesk license | |
| # agreement provided at the time of installation or download, or which |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // based on https://www.shadertoy.com/view/4tSSzt by FabriceNeyret2 | |
| // using the base ray-marcher of Trisomie21: https://www.shadertoy.com/view/4tfGRB# | |
| vec3 adsk_getVertexPosition(); | |
| vec3 adsk_getCameraPosition(); | |
| vec3 adsk_getLightPosition(); | |
| vec3 adsk_getLightDirection(); | |
| vec3 adsk_getLightTangent(); | |
| vec3 adsk_getLightColour(); | |
| vec3 adsk_getDiffuseMapCoord(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uniform sampler2D source; | |
| uniform float adsk_time, zoom, offset, adsk_result_frameratio, rotation; | |
| uniform float Speed, pos_frq, pos_amp_x, pos_amp_y, zoom_amp, zoom_frq, rot_frq, rot_amp; | |
| uniform float adsk_result_w, adsk_result_h; | |
| vec2 resolution = vec2(adsk_result_w, adsk_result_h); | |
| uniform vec2 center; | |
| uniform bool enbl_zoom, enbl_position, enbl_rotation; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uniform float adsk_time; | |
| uniform float adsk_result_w, adsk_result_h; | |
| uniform sampler2D front, matte; | |
| float get(vec2 p) { | |
| return texture2D(matte, p).r; | |
| } | |
| void main(void) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Using Ashima's simplex noise | |
| // License : Copyright (C) 2011 Ashima Arts. All rights reserved. | |
| // Distributed under the MIT License. See LICENSE file. | |
| // https://github.com/ashima/webgl-noise | |
| vec3 mod289(vec3 x) { | |
| return x - floor(x * (1.0 / 289.0)) * 289.0; | |
| } | |
| vec2 mod289(vec2 x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // frameguide | |
| // Shader written by: Kyle Obley (kyle.obley@gmail.com), Miles Essmiller & Ivar Beer | |
| uniform sampler2D Source; | |
| uniform float adsk_result_w, adsk_result_h, adsk_Source_frameratio, adsk_time; | |
| uniform float ratio, let_blend, guide_blend, center_blend, size; | |
| vec2 resolution = vec2(adsk_result_w, adsk_result_h); | |
| float iGlobalTime = adsk_time; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np, matplotlib.pyplot as pp, mpl_toolkits.mplot3d as mp | |
| import scipy.interpolate as si, scipy.optimize as so, scipy.spatial.distance as ssd, scipy.integrate | |
| data = (1,2,3,4,5,6,7,8),(1,2.5,4,5.5,6.5,8.5,10,12.5),(1,2.5,4.5,6.5,8,8.5,10,12.5) | |
| p = 6.5,9.5,9 | |
| # Fit a spline to the data - s is the amount of smoothing, tck is the parameters of the resulting spline | |
| (tck, uu) = si.splprep(data, s=0) | |
| # Return distance from 3d point p to a point on the spline at spline parameter u |