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 / blender-generate-mix-shader-example.py
Created Jun 24, 2019
Example on how to generate gloss diffuse shader via pyhon
View blender-generate-mix-shader-example.py
# for https://blender.stackexchange.com/q/143599/3710
import bpy
mat_name = "Material_Name"
# check whether the material already exists
if bpy.data.materials.get(mat_name):
mat = bpy.data.materials[mat_name]
else:
View blender28x-ObjectUIList.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
View blender28x-MaterialUIList.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
View blender-render-version.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
View blender-basic-ui-example-28x.py
# https://blender.stackexchange.com/q/57306/3710
bl_info = {
"name": "Add-on Template",
"description": "",
"author": "p2or",
"version": (0, 0, 2),
"blender": (2, 80, 0),
"location": "3D View > Tools",
"warning": "", # used for warning icon and text in addons panel
@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".
View blender28x-custom-object-uilist.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
View shot-utils.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.