Skip to content

Instantly share code, notes, and snippets.

@Dan-Piker
Dan-Piker / Moebius3d
Last active March 27, 2024 08:06
Moebius transformations in 3d
//Moebius transformations in 3d, by reverse stereographic projection to the 3-sphere,
//rotation in 4d space, and projection back.
//by Daniel Piker 09/08/20
//Feel free to use, adapt and reshare. I'd appreciate a mention if you post something using this.
//You can also now find this transformation as a component in Grasshopper/Rhino
//I first wrote about these transformations here:
//https://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/
//If you want to transform about a given circle. Points on the circle and its axis stay on those curves.
//You can skip these 2 lines if you want to always use the origin centred unit circle.
@jedypod
jedypod / CornerPinOffset
Created August 3, 2019 00:57
CornerPin node with offset controls for each corner. Useful for tweaking cornerpin after all keyframes are baked (e.g. , from a tracker), in case you need to cheat the perspective or something else.
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name CornerPinOffset
tile_color 0x9073adff
addUserKnob {20 PinControl}
addUserKnob {26 CornerPinControls l "" +STARTLINE T "<font size=5><b>Corner Pin Data</b></font>"}
addUserKnob {20 CornerPinData l "" +STARTLINE n 1}
addUserKnob {41 to1 T cpMaster.to1}
addUserKnob {41 enable1 -STARTLINE T cpMaster.enable1}
@DanMillerDev
DanMillerDev / MobileARShadow.shader
Created July 30, 2019 05:48
Shadows on transparent geometry shader for Unity
//This is based on a shader from https://alastaira.wordpress.com/2014/12/30/adding-shadows-to-a-unity-vertexfragment-shader-in-7-easy-steps/
Shader "Custom/MobileARShadow"
{
SubShader {
Pass {
// 1.) This will be the base forward rendering pass in which ambient, vertex, and
// main directional light will be applied. Additional lights will need additional passes
// using the "ForwardAdd" lightmode.
@jedypod
jedypod / DAILIES_CONFIG.yaml
Last active March 22, 2024 09:46
NOTE: if you stumbled here via google, this code has been moved to a proper git repo which is here: https://github.com/jedypod/generate-dailies - A tool to pipe openexr images, apply an ocio display, and output through a bash pipe to ffmpeg and encode to mov
globals:
# Path to the ocio config to use
ocioconfig: /path/to/config.ocio
# Default ocio profile to use if not specified on the commandline
ocio_default_transform: grade
###############################################
## Reformatting and Cropping
###############################################
# If debug is true, no encoding will be done and there will be debug prints
@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active April 4, 2024 13:42
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 23, 2024 20:53
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@paulhayes
paulhayes / Sun.cs
Last active February 25, 2024 19:06
Rotates a Unity directional light based on location and time. Includes time scale, and frame stepping for continuous use.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Entropedia
{
[RequireComponent(typeof(Light))]
[ExecuteInEditMode]
@cferdinandi
cferdinandi / metabox-single.php
Last active March 15, 2023 01:33
Create a metabox with a single field
<?php
/**
* Create a metabox with a single field.
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items
*/
//
// Create Metabox
//
# made in response to
# http://blender.stackexchange.com/q/44983/935
bl_info = {
"version": (1, 0),
"blender": (2, 75, 0),
"name": "testing play pause",
"description": """testing addon""" ,
"category": "test",
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the