Skip to content

Instantly share code, notes, and snippets.

View gist:55718655962dd09b6e7b4ba5f7de3e51
"csg" :
[
[
{
"type" : "cube"
"mode" : "add"
"rgb" : "153 204 255"
"round%": "0.25"
"r" : "1 0 0 0 1 0 0 0 1"
"t" : "0 0 256"
@RH2
RH2 / gist:956895379daa01a2b69679bb5dc05d21
Last active Sep 30, 2020
Vertex color from first material slot with baked cavity pass.
View gist:956895379daa01a2b69679bb5dc05d21
import bpy
import random
#matcol = bpy.data.materials["Material.001"].diffuse_color
#for m in bpy.context.object.material_slots:
for obj in bpy.context.selected_objects:
bpy.ops.object.mode_set(mode='OBJECT')
matname = bpy.context.selected_objects[0].material_slots[0].name
#specialColor = bpy.data.materials[matname].diffuse_color
specialColor = bpy.data.materials[matname].node_tree.nodes['Principled BSDF'].inputs[0].default_value
@RH2
RH2 / RGB_palletSnap.py
Created Sep 21, 2020
backup python files
View RGB_palletSnap.py
import PIL
from PIL import Image
import math
from datetime import datetime
#from skimage.color import rgb2hsv
#from skimage.color import hsv2rgb
import os
import colorsys
inputDirectory ='C:/Users/Reference/Desktop/raylib-live/games/pixel-runner/conversion-in' #specify a directory of source images
exitDirectory = 'C:/Users/Reference/Desktop/raylib-live/games/pixel-runner/conversion-out' #where to put output images
View gist:042904d8b98b67551b7d1b719d29674b
MIT License
Copyright (c) 2019 Richard Hale
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
View gist:b857bcf3697875a99df7d48434ac7a89
matrixA = [[3,2,1],[5,8,3],[2,4,7]]
matrixB = [[3,2,1],[5,8,3],[2,4,7]]
box = {x:3,y:4}
initialangle= Math.atan2(box.y,box.x)
function findh(x,y){return(Math.sqrt(Math.pow(x/2,2)+Math.pow(y/2,2)))}
function radtodeg(input){return((input/(Math.PI*2))*360)}
function degtorad(input){return((input/180)*Math.PI)}
angle = degtorad(30)
matrixRotateX = [[1,0,0],[0,Math.cos(angle),-Math.sin(angle)],[0,Math.sin(angle),Math.cos(angle)]]
matrixRotateY = [[Math.cos(angle),0,Math.sin(angle)],[0,1,0],[-Math.sin(angle),0,Math.cos(angle)]]
@RH2
RH2 / edge angle without hedges
Created Nov 2, 2019
(first attempt, not fully functional)
View edge angle without hedges
int pointArray = npoints(0);
int processedPoints[]={};
int edgeList[]; //ds: ai,at,bi,bt,ci,ct....
int faceList[]; //ds: aa,ab,ba,bb....
float edgeAngles[];
vector edgeMid[];
int pass;
//go through all points that have not been processed already
for(int i = 0 ; i<pointArray;i++){
int thispoint = i;
@RH2
RH2 / hea.vfl
Last active Nov 2, 2019
Half Edge Angle
View hea.vfl
int pass;
int pntPairs[] = expandedgegroup(0,"");
//printf("pntPairs: %f\\n",pntPairs);
for(int p=0; p<len(pntPairs);p=p+2){
int p1,p2;
p1 = pntPairs[p];
p2 = pntPairs[p+1];
int hedge1 = pointhedge(0, p1, p2);
View notes
APPLIED RESEARCH :: VOLUME 63 (AUG 2016)
TECHNICAL COMMUNICATION AS USER EXPERIENCE IN A BROADENING INDUSTRY LANDSCAPE
pg248. Designer, Developer, Architect, Manager, Researcher
pg249. Based on an analysis of 502 industry job postings, this article argues that technical communication work shares traits and competencies with the field of UX
pg249. This holistic approach to the user is captured in the interdisciplinarity of UX, which, as a field, combines communication, psychology, human-computer interaction (HCI), social science, design, technology, and other specialized knowledge areas in an attempt to better understand user practices and meet the needs of users within and across information products and interfaces.
pg252. 41+30 or 71% of tech communication jobs are located on the coasts.
pg253. strong correlation with IT / Service / Software jobs. (~40%) — ~10% in Advertising/Social ~15% industry unclear
pg253. 22% UX,Developer ::: 61% UX/UI/Interatction, Designer
pg254. Designer Developer and Architect ha
View mv_export.py
import hou
import os
from struct import *
node = hou.pwd()
geo = node.geometry()
FilePath = 'C:\Users\Reference\Desktop\MV\MVexport.txt'
outputString = "This is my first python string outputted to a file from houdini"
"VOX_"
View gist:076f41ea60366f31a728d03bb678b1f3
#ue4export header version 0.1
#last tested with b-v2.79 ue4export-v0.2.1
import bpy
import datetime
S_time = datetime.datetime.now()
print("---RUNNING-UE4 ::: "+str(S_time)+"---")
ActionList=['M4_ADS_RELOAD']
#ActionList=[