Skip to content

Instantly share code, notes, and snippets.

poor p2or

Block or report user

Report or block p2or

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@p2or
p2or / OpticalZDefocus.md
Created Jul 2, 2019 — forked from jedypod/OpticalZDefocus.md
OpticalZDefocus is a physically accurate ZDefocus, which controls circle of confusion (coc) size based on lens geometry using the depth of field equation. Set your lens and film-back characteristics, your focus distance, and adjust the size of your bokeh with the aperture size, just like a real lens.
View OpticalZDefocus.md

OpticalZDefocus

OpticalZDefocus is a physically accurate ZDefocus, which controls circle of confusion size based on lens geometry using the depth of field equation.

  1. Set your focal length and film-back characteristics to match the lens that shot your plate
  2. Animate your focus distance
  3. Adjust the f-stop to match the size of your bokeh to your plate

Just like a real lens! (And using the same math :P )

Features

@p2or
p2or / convert_anim.py
Created Nov 9, 2018 — forked from pink-vertex/convert_anim.py
Applies parent inverse matrix to the child's local matrix.
View convert_anim.py
import bpy
import mathutils
class Converter:
def __init__(self, ob, logging=False):
self.ob = ob
self.action = ob.animation_data.action
self.rot_mode = ob.rotation_mode
self.logging = logging
@p2or
p2or / mesh_to_pointcloud.md
Created Oct 15, 2018 — forked from keijiro/mesh_to_pointcloud.md
How to convert a mesh into a point cloud with Houdini.
View mesh_to_pointcloud.md

screenshot

  1. Import the source geometry.
  2. Append a Point Wrangle SOP and set the following snippet.
int vlist[] = pointvertices(0, @ptnum);
vector uv = vertex(0, "uv", vlist[0]);
@Cd = colormap("$HIP/TEXTURE_FILENAME.jpg", uv);
  1. Insert a Delete SOP. Change the pattern to "*". Enable "Keep Points".
@p2or
p2or / premult-exr-psd.nk
Last active Sep 18, 2017 — forked from julik/unpremult.jsx
Unpremultiply the selected Photoshop layer
View premult-exr-psd.nk
set cut_paste_input [stack 0]
version 11.0 v1
Read {
inputs 0
file Untitled-1.psd
format "3881 1081 0 0 3881 1081 1 "
origset true
name Read6
selected true
xpos 1335
@p2or
p2or / print_github_bitbucket.js
Created Jul 24, 2016 — forked from markov00/print_github_bitbucket.js
Github print styling bookmarlet
View print_github_bitbucket.js
javascript:void%20function(){(function(e,o,i,a,n,r,t,d){(!(n=e.jQuery)||i%3En.fn.jquery||a(n))%26%26(r=o.createElement(%22script%22),r.type=%22text/javascript%22,r.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+i+%22/jquery.min.js%22,r.onload=r.onreadystatechange=function(){t||(d=this.readyState)%26%26%22loaded%22!=d%26%26%22complete%22!=d||(a((n=e.jQuery).noConflict(1),t=1),n(r).remove())},o.documentElement.childNodes[0].appendChild(r))})(window,document,%221.3.2%22,function(e,o){e(%22%23header,%20.header,.gh-header-actions,.repo-nav,.site-footer,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%23wiki-rightbar%22).remove(),e(%22%23files,%20.file%22).css({background:%22none%22,border:%22none%22}),e(%22.aui-group,.aui-sidebar,.aui-header,%23wiki%20header,footer,.revision-date%22).css({display:%22none%22}),e(%22%23wiki%20.wiki-content%22).css({border:%22none%22,overflow:%22hidden%22}),e(%22.aui-page-panel%22).css({%22padding-left%22:0}),e(%22link%22).removeAttr(%22media%22
@p2or
p2or / numSpacesPerArea.py
Created Jan 31, 2016 — forked from satishgoda/numSpacesPerArea.py
The goal of this script is to print the number of Spaces in each area of the current screen in Blender (http://learningblender3dsoftware.blogspot.in)
View numSpacesPerArea.py
# http://www.blender.org/documentation/blender_python_api_2_65_3/bpy.types.Area.html
# http://www.blender.org/documentation/blender_python_api_2_65_3/bpy.types.Space.html
import bpy
template_Area = "Area: {0}\n"
template_Space = "\tSpace: {0} {1}\n"
for area in bpy.context.screen.areas:
print(template_Area.format(area.type))
View playPausePanel.py
# 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",
View vert2intersection.py
'''
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
@p2or
p2or / colorTempToRGB.js
Created Dec 18, 2015 — forked from paulkaplan/colorTempToRGB.js
Color Temperature to RGB
View colorTempToRGB.js
// From http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
// Start with a temperature, in Kelvin, somewhere between 1000 and 40000. (Other values may work,
// but I can't make any promises about the quality of the algorithm's estimates above 40000 K.)
function colorTemperatureToRGB(kelvin){
var temp = kelvin / 100;
View custom_pynode_in_cycles_tree.py
# ##### 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
You can’t perform that action at this time.